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/exception_test.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compiler/exception_test.cc') diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc index 4471b93f17..a49c6c630e 100644 --- a/compiler/exception_test.cc +++ b/compiler/exception_test.cc @@ -78,7 +78,12 @@ class ExceptionTest : public CommonRuntimeTest { ArenaStack arena_stack(&pool); ScopedArenaAllocator allocator(&arena_stack); StackMapStream stack_maps(&allocator, kRuntimeISA); - stack_maps.BeginMethod(4 * sizeof(void*), 0u, 0u, 0u); + stack_maps.BeginMethod(/* frame_size_in_bytes= */ 4 * sizeof(void*), + /* core_spill_mask= */ 0u, + /* fp_spill_mask= */ 0u, + /* num_dex_registers= */ 0u, + /* baseline= */ false, + /* debuggable= */ false); stack_maps.BeginStackMapEntry(kDexPc, native_pc_offset); stack_maps.EndStackMapEntry(); stack_maps.EndMethod(code_size); -- cgit v1.2.3-59-g8ed1b