From 9e598907f28277b0f0e3dcd725d6ed9d71f8a958 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 19 Nov 2021 14:53:07 +0000 Subject: Simplify hotness count in baseline compiled code. - Always require the current ArtMethod, which also removes the need to handle empty frames. - Remove the use of some temporary registers. - Require a profiling info when compiling baseline. - Add a slow path for requiring an optimized compilation. - Make the counter decrement instead of increment. A next CL will make the hotness configurable through --jittreshold. Test: test.py Bug: 146423102 Change-Id: I1485f66401d6ed218456fe2849eb05fa77479668 --- compiler/optimizing/code_generator.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index ced94f43f0..27eabafb8f 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -1081,6 +1081,11 @@ CodeGenerator::CodeGenerator(HGraph* graph, } } } + if (GetGraph()->IsCompilingBaseline()) { + // We need the current method in case we reach the hotness threshold. As a + // side effect this makes the frame non-empty. + SetRequiresCurrentMethod(); + } } CodeGenerator::~CodeGenerator() {} -- cgit v1.2.3-59-g8ed1b