diff options
| author | 2016-03-24 21:51:05 +0000 | |
|---|---|---|
| committer | 2016-03-24 21:51:05 +0000 | |
| commit | af8e71d59b0ab5e79f53a608b62b3618e36e6a98 (patch) | |
| tree | 04b310ff63f1c4b84ec6fe3911f6a396816935a0 | |
| parent | ee91f081f4ea8aa9747893dfaba49dad498d1a4a (diff) | |
| parent | 17bda200dc7e36ba4178501274f10df4c82bea11 (diff) | |
Merge "ART: Ignore hotness updates if jit inactive"
| -rw-r--r-- | runtime/jit/jit_instrumentation.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/jit/jit_instrumentation.cc b/runtime/jit/jit_instrumentation.cc index cce2fb2edc..d8ec689051 100644 --- a/runtime/jit/jit_instrumentation.cc +++ b/runtime/jit/jit_instrumentation.cc @@ -132,11 +132,15 @@ void JitInstrumentationCache::DeleteThreadPool(Thread* self) { void JitInstrumentationCache::AddSamples(Thread* self, ArtMethod* method, uint16_t count) { // Since we don't have on-stack replacement, some methods can remain in the interpreter longer - // than we want resulting in samples even after the method is compiled. - if (method->IsClassInitializer() || method->IsNative()) { + // than we want resulting in samples even after the method is compiled. Also, if the + // jit is no longer interested in hotness samples because we're shutting down, just return. + if (method->IsClassInitializer() || method->IsNative() || (thread_pool_ == nullptr)) { + if (thread_pool_ == nullptr) { + // Should only see this when shutting down. + DCHECK(Runtime::Current()->IsShuttingDown(self)); + } return; } - DCHECK(thread_pool_ != nullptr); DCHECK_GT(warm_method_threshold_, 0); DCHECK_GT(hot_method_threshold_, warm_method_threshold_); DCHECK_GT(osr_method_threshold_, hot_method_threshold_); |