OSDN Git Service

Revert "Fix bogus interaction between code cache and instrumentation."
authorNicolas Geoffray <ngeoffray@google.com>
Tue, 1 Mar 2016 22:16:35 +0000 (22:16 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Tue, 1 Mar 2016 22:16:35 +0000 (22:16 +0000)
hits a DCHECK when testing libcore:
    art F 11973 12675 art/runtime/jit/jit_code_cache.cc:644] Check failed: it.second->GetProfilingInfo(sizeof(void*)) != nullptr

This reverts commit e9924b7d4fcafe7261233d2c16ebb73d7bb5e8e8.

Change-Id: I37d05991b9506a53a7c76738a7e4a6def1010958

runtime/jit/jit_code_cache.cc
runtime/jit/jit_instrumentation.cc

index 9aaef65..4500dbd 100644 (file)
@@ -622,10 +622,7 @@ void JitCodeCache::GarbageCollectCache(Thread* self) {
     bool next_collection_will_be_full = ShouldDoFullCollection();
 
     // Start polling the liveness of compiled code to prepare for the next full collection.
-    // We avoid doing this if exit stubs are installed to not mess with the instrumentation.
-    // TODO(ngeoffray): Clean up instrumentation and code cache interactions.
-    if (!Runtime::Current()->GetInstrumentation()->AreExitStubsInstalled() &&
-        next_collection_will_be_full) {
+    if (next_collection_will_be_full) {
       // Save the entry point of methods we have compiled, and update the entry
       // point of those methods to the interpreter. If the method is invoked, the
       // interpreter will update its entry point to the compiled code and call it.
index f2ced18..86761e4 100644 (file)
@@ -184,13 +184,9 @@ void JitInstrumentationListener::MethodEntered(Thread* thread,
   }
 
   ProfilingInfo* profiling_info = method->GetProfilingInfo(sizeof(void*));
-  // Update the entrypoint if the ProfilingInfo has one. The interpreter will call it
-  // instead of interpreting the method.
-  // We avoid doing this if exit stubs are installed to not mess with the instrumentation.
-  // TODO(ngeoffray): Clean up instrumentation and code cache interactions.
-  if ((profiling_info != nullptr) &&
-      (profiling_info->GetSavedEntryPoint() != nullptr) &&
-      !Runtime::Current()->GetInstrumentation()->AreExitStubsInstalled()) {
+  if ((profiling_info != nullptr) && (profiling_info->GetSavedEntryPoint() != nullptr)) {
+    // Update the entrypoint if the ProfilingInfo has one. The interpreter will call it
+    // instead of interpreting the method.
     method->SetEntryPointFromQuickCompiledCode(profiling_info->GetSavedEntryPoint());
   } else {
     instrumentation_cache_->AddSamples(thread, method, 1);