diff options
| author | 2021-11-02 14:52:30 +0000 | |
|---|---|---|
| committer | 2021-11-09 14:22:50 +0000 | |
| commit | 5097f83c4719a76fdfab1044ab745273841aca45 (patch) | |
| tree | adca5e53b3ef1807aa7dd9c3465ac3305fedc4fd /runtime/stack.cc | |
| parent | d1e6bea2c502a72dc5d0c3d16deb591ba61c9d76 (diff) | |
Revert^2 "Add support for calling entry / exit hooks directly from JIT code""
This reverts commit 72be14ed06b76cd0e83392145cec9025ff43d174.
Reason for revert: A reland of
commit 2d4feeb67912d64b9e980e6687794826a5c22f9d with a fix for no-image
tests
Change-Id: I79f719f0d4d9b903db301a1636fde5689da35a29
Diffstat (limited to 'runtime/stack.cc')
| -rw-r--r-- | runtime/stack.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index 233106eb0a..eb0fe5692d 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -800,6 +800,21 @@ QuickMethodFrameInfo StackVisitor::GetCurrentQuickFrameInfo() const { return RuntimeCalleeSaveFrame::GetMethodFrameInfo(CalleeSaveType::kSaveRefsAndArgs); } +uint8_t* StackVisitor::GetShouldDeoptimizeFlagAddr() const REQUIRES_SHARED(Locks::mutator_lock_) { + DCHECK(GetCurrentOatQuickMethodHeader()->HasShouldDeoptimizeFlag()); + QuickMethodFrameInfo frame_info = GetCurrentQuickFrameInfo(); + size_t frame_size = frame_info.FrameSizeInBytes(); + uint8_t* sp = reinterpret_cast<uint8_t*>(GetCurrentQuickFrame()); + size_t core_spill_size = + POPCOUNT(frame_info.CoreSpillMask()) * GetBytesPerGprSpillLocation(kRuntimeISA); + size_t fpu_spill_size = + POPCOUNT(frame_info.FpSpillMask()) * GetBytesPerFprSpillLocation(kRuntimeISA); + size_t offset = frame_size - core_spill_size - fpu_spill_size - kShouldDeoptimizeFlagSize; + uint8_t* should_deoptimize_addr = sp + offset; + DCHECK_EQ(*should_deoptimize_addr & ~static_cast<uint8_t>(DeoptimizeFlagValue::kAll), 0); + return should_deoptimize_addr; +} + template <StackVisitor::CountTransitions kCount> void StackVisitor::WalkStack(bool include_transitions) { if (check_suspended_) { |