OSDN Git Service

Revert "ART: Ignore hotness updates if jit inactive"
authorCalin Juravle <calin@google.com>
Fri, 25 Mar 2016 11:27:40 +0000 (11:27 +0000)
committerCalin Juravle <calin@google.com>
Fri, 25 Mar 2016 11:27:40 +0000 (11:27 +0000)
This reverts commit 17bda200dc7e36ba4178501274f10df4c82bea11.

runtime/jit/jit_instrumentation.cc

index d8ec689..cce2fb2 100644 (file)
@@ -132,15 +132,11 @@ 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.  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));
-    }
+  // than we want resulting in samples even after the method is compiled.
+  if (method->IsClassInitializer() || method->IsNative()) {
     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_);