diff options
author | Vladimir Marko <vmarko@google.com> | 2018-03-23 18:11:43 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2018-03-26 11:37:23 +0100 |
commit | fe94875d94ef8c06f6322021d501d58bd64c1606 (patch) | |
tree | 0376957503f936cd87411957cb08c5852041974e /compiler/optimizing/graph_visualizer.cc | |
parent | b87dcc1c0bcc819cf7b7109c6427cd98b84f6342 (diff) |
ART: Fix infinite recursion for deopt at dex pc 0.
Previously, the interpreter checked for dex pc 0 to see if
the method was just entered. If we deopt at dex pc 0, the
instrumentation would emit an erroneous MethodEnteredEvent
and the JIT would have received a MethodEntered() call. For
JIT-on-first-use, the method would be compiled the same way
as before, leading to the same deopt until stack overflow.
We fix this by using a new `from_deoptimize` flag passed
by the caller.
Test: 680-checker-deopt-dex-pc-0
Test: testrunner.py --host \
--jit --runtime-option=-Xjitthreshold:0
Bug: 62611253
Change-Id: I50b88f15484aeae16e1375a1d80f6563fb9066e7
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 5ff31cead5..719904d780 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -576,6 +576,11 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { } StartAttributeStream() << input_list; } + if (instruction->GetDexPc() != kNoDexPc) { + StartAttributeStream("dex_pc") << instruction->GetDexPc(); + } else { + StartAttributeStream("dex_pc") << "n/a"; + } instruction->Accept(this); if (instruction->HasEnvironment()) { StringList envs; |