diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2017-05-08 09:34:26 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-05-10 09:27:33 +0100 |
commit | 4e92c3ce7ef354620a785553bbada554fca83a67 (patch) | |
tree | 42029deff4d3ba7f89b5fdbf79ff410da575f431 /runtime/quick_exception_handler.cc | |
parent | 549844e9ccf432d1396b19af890eedb602b8ba04 (diff) |
Add runtime reasons for deopt.
Currently to help investigate. Also:
1) Log when deoptimization happens (which method and what reason)
2) Trace when deoptimization happens (to make it visible in systrace)
bug:37655083
Test: test-art-host test-art-target
Change-Id: I0c2d87b40db09e8e475cf97a7c784a034c585e97
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index b8669412fc..db10103c4b 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -530,7 +530,7 @@ void QuickExceptionHandler::DeoptimizeStack() { PrepareForLongJumpToInvokeStubOrInterpreterBridge(); } -void QuickExceptionHandler::DeoptimizeSingleFrame() { +void QuickExceptionHandler::DeoptimizeSingleFrame(DeoptimizationKind kind) { DCHECK(is_deoptimization_); if (VLOG_IS_ON(deopt) || kDebugExceptionDelivery) { @@ -544,6 +544,10 @@ void QuickExceptionHandler::DeoptimizeSingleFrame() { // Compiled code made an explicit deoptimization. ArtMethod* deopt_method = visitor.GetSingleFrameDeoptMethod(); DCHECK(deopt_method != nullptr); + LOG(INFO) << "Deoptimizing " + << deopt_method->PrettyMethod() + << " due to " + << GetDeoptimizationKindName(kind); if (Runtime::Current()->UseJitCompilation()) { Runtime::Current()->GetJit()->GetCodeCache()->InvalidateCompiledCodeFor( deopt_method, visitor.GetSingleFrameDeoptQuickMethodHeader()); |