Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few optimizations for the gcinfodecoder construction #96150

Merged
merged 13 commits into from
Dec 28, 2023
Prev Previous commit
undo unnecessary change.
  • Loading branch information
VSadov committed Dec 28, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 53e523742622281623720648ae1e58fdd9ad8164
3 changes: 2 additions & 1 deletion src/coreclr/vm/gcinfodecoder.cpp
Original file line number Diff line number Diff line change
@@ -415,9 +415,10 @@ bool GcInfoDecoder::IsSafePoint(UINT32 codeOffset)
if(m_NumSafePoints == 0)
return false;

#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// Safepoints are encoded with a -1 adjustment
codeOffset--;

#endif
size_t savedPos = m_Reader.GetCurrentPos();
UINT32 safePointIndex = FindSafePoint(codeOffset);
m_Reader.SetCurrentPos(savedPos);