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/stack_map_stream.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/stack_map_stream.h') diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index 27145a174c..1aaa6aee9e 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -64,7 +64,8 @@ class StackMapStream : public DeletableArenaObject { size_t core_spill_mask, size_t fp_spill_mask, uint32_t num_dex_registers, - bool baseline = false); + bool baseline, + bool debuggable); void EndMethod(size_t code_size); void BeginStackMapEntry(uint32_t dex_pc, @@ -125,6 +126,7 @@ class StackMapStream : public DeletableArenaObject { uint32_t fp_spill_mask_ = 0; uint32_t num_dex_registers_ = 0; bool baseline_; + bool debuggable_; BitTableBuilder stack_maps_; BitTableBuilder register_masks_; BitmapTableBuilder stack_masks_; -- cgit v1.2.3-59-g8ed1b