diff options
author | Sebastien Hertz <shertz@google.com> | 2013-12-17 10:42:03 +0100 |
---|---|---|
committer | Sebastien Hertz <shertz@google.com> | 2014-07-09 16:10:45 +0200 |
commit | bae182cbc6adc8796154162a87fc54ae804e0469 (patch) | |
tree | d5c1fdb048edab194e948e4e90bff66703c5f55e /runtime/instrumentation.cc | |
parent | 0c1734665c38b3116e38a90ad06c3f152d9316c5 (diff) | |
download | art-bae182cbc6adc8796154162a87fc54ae804e0469.zip art-bae182cbc6adc8796154162a87fc54ae804e0469.tar.gz art-bae182cbc6adc8796154162a87fc54ae804e0469.tar.bz2 |
Fix method tracing from command-line
Transitions current thread to the new kWaitingForMethodTracingStart thread
state when starting method tracing.
Ensures there is a current thread when method tracing is stopped due to runtime
shutdown. If the current thread has been detached, we now re-attach it.
Note: we only do this if method tracing has been activated from command-line.
Fixes instrumentation when forcing interpreter mode (-Xint) with method tracing
enabled.
Removes unused parameter from UnsafeLogFatalForThreadSuspendAllTimeout.
Bug: https://code.google.com/p/android/issues/detail?id=72094
Bug: 11683397
Change-Id: I70f000fb46ddd95d6ad51ea0a8eee77697a045e9
Diffstat (limited to 'runtime/instrumentation.cc')
-rw-r--r-- | runtime/instrumentation.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc index 8f5da83..f459b59 100644 --- a/runtime/instrumentation.cc +++ b/runtime/instrumentation.cc @@ -137,7 +137,8 @@ void Instrumentation::InstallStubsForMethod(mirror::ArtMethod* method) { new_quick_code = GetQuickResolutionTrampoline(class_linker); } } else { // !uninstall - if ((interpreter_stubs_installed_ || IsDeoptimized(method)) && !method->IsNative()) { + if ((interpreter_stubs_installed_ || forced_interpret_only_ || IsDeoptimized(method)) && + !method->IsNative()) { new_portable_code = GetPortableToInterpreterBridge(); new_quick_code = GetQuickToInterpreterBridge(); } else { @@ -150,7 +151,9 @@ void Instrumentation::InstallStubsForMethod(mirror::ArtMethod* method) { new_quick_code = class_linker->GetQuickOatCodeFor(method); DCHECK(new_quick_code != GetQuickToInterpreterBridgeTrampoline(class_linker)); if (entry_exit_stubs_installed_ && new_quick_code != GetQuickToInterpreterBridge()) { - DCHECK(new_portable_code != GetPortableToInterpreterBridge()); + // TODO: portable to quick bridge. Bug: 8196384. We cannot enable the check below as long + // as GetPortableToQuickBridge() == GetPortableToInterpreterBridge(). + // DCHECK(new_portable_code != GetPortableToInterpreterBridge()); new_portable_code = GetPortableToInterpreterBridge(); new_quick_code = GetQuickInstrumentationEntryPoint(); } |