diff options
author | 2025-01-17 14:57:07 +0000 | |
---|---|---|
committer | 2025-01-28 01:46:34 -0800 | |
commit | babd7207698261b59894f8520dc464526e411b5c (patch) | |
tree | 33886f51a94f72751976636a69df9ccd00df775a /compiler/optimizing/code_generator.h | |
parent | b3ca9f3c87bc935ae56e7647c91e2158971fb47d (diff) |
Remove explicit dex_pc from RecordPcInfo
Special cases considered:
* Frame entry (hardcoded to be 0) or block entry.
* Native debuggable + slow paths, which is the only case where we
use the instruction's dex_pc.
Test: m test-art-host-gtest
Test: art/test/testrunner/testrunner.py --host --64 -b --optimizing
Change-Id: Ic5e0a6b5106395b891a9a45ea48da39dfb44a0a5
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 950bae5c8f..f242866412 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -339,12 +339,9 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { return GetFrameSize() - FrameEntrySpillSize() - kShouldDeoptimizeFlagSize; } - // Record native to dex mapping for a suspend point. Required by runtime. - void RecordPcInfo(HInstruction* instruction, - uint32_t dex_pc, - uint32_t native_pc, - SlowPathCode* slow_path = nullptr, - bool native_debug_info = false); + // For stack overflow checks and native-debug-info entries without dex register + // mapping i.e. start of basic block or at frame entry. + void RecordPcInfoForFrameOrBlockEntry(uint32_t dex_pc = 0); // Record native to dex mapping for a suspend point. // The native_pc is used from Assembler::CodePosition. @@ -352,7 +349,14 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { // Note: As Assembler::CodePosition is target dependent, it does not guarantee the exact native_pc // for the instruction. If the exact native_pc is required it must be provided explicitly. void RecordPcInfo(HInstruction* instruction, + SlowPathCode* slow_path = nullptr, + bool native_debug_info = false); + + // Record native to dex mapping for a suspend point. Required by runtime. + // Do not use directly. Use the method above. + void RecordPcInfo(HInstruction* instruction, uint32_t dex_pc, + uint32_t native_pc, SlowPathCode* slow_path = nullptr, bool native_debug_info = false); @@ -363,6 +367,7 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { // // ARM specific behaviour: The recorded native PC might be a branch over pools to instructions // corresponding the dex PC. + void MaybeRecordNativeDebugInfoForBlockEntry(uint32_t dex_pc); void MaybeRecordNativeDebugInfo(HInstruction* instruction, uint32_t dex_pc, SlowPathCode* slow_path = nullptr); @@ -672,6 +677,7 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { void SetDisassemblyInformation(DisassemblyInformation* info) { disasm_info_ = info; } DisassemblyInformation* GetDisassemblyInformation() const { return disasm_info_; } + // TODO(solanes): Remove `dex_pc` now that it is unused. virtual void InvokeRuntime(QuickEntrypointEnum entrypoint, HInstruction* instruction, uint32_t dex_pc, |