From fe94875d94ef8c06f6322021d501d58bd64c1606 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 23 Mar 2018 18:11:43 +0000 Subject: 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 --- compiler/optimizing/graph_visualizer.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/optimizing/graph_visualizer.cc') 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; -- cgit v1.2.3