From fc067a360d14db5f84fd4b58e0dee6cb04ee759b Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Wed, 23 Mar 2022 12:49:30 +0000 Subject: Introduce a flag to check if JITed code has instrumentation support Introduce a new flag to identify if JITed code was compiled with instrumentation support. We used to check if the runtime is java debuggable to check for instrumentation support of JITed code. We only set the java debuggable at runtime init and never changed it after. So this check was sufficient since we always JIT code with instrumentation support in debuggable runtimes. We want to be able to change the runtime to debuggable after the runtime has started. As a first step, introduce a new flag to explicitly check if JITed code was compiled with instrumentation support. Use this flag to check if code needs entry / exit stubs and to check if code is async deoptimizeable. Bug: 222479430 Test: art/test.py Change-Id: Ibcaeab869aa8ce153920a801dcc60988411c775b --- compiler/optimizing/code_generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 8bd4406332..d8fc3ba690 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -389,7 +389,8 @@ void CodeGenerator::Compile(CodeAllocator* allocator) { core_spill_mask_, fpu_spill_mask_, GetGraph()->GetNumberOfVRegs(), - GetGraph()->IsCompilingBaseline()); + GetGraph()->IsCompilingBaseline(), + GetGraph()->IsDebuggable()); size_t frame_start = GetAssembler()->CodeSize(); GenerateFrameEntry(); -- cgit v1.2.3-59-g8ed1b