Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gcinfo/gcinfodumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on th

#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
UINT32 safePointOffset = offset;
#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM_)
#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM_) || defined(_TARGET_ARM64_)
safePointOffset++;
#endif
if(safePointDecoder.IsSafePoint(safePointOffset))
Expand Down
10 changes: 8 additions & 2 deletions src/vm/gcinfodecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ bool GcInfoDecoder::IsSafePoint(UINT32 codeOffset)
if(m_NumSafePoints == 0)
return false;

#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM_)
#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM_) || defined(_TARGET_ARM64_)
// Safepoints are encoded with a -1 adjustment
codeOffset--;
#endif
Expand All @@ -394,7 +394,7 @@ UINT32 GcInfoDecoder::FindSafePoint(UINT32 breakOffset)
const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
UINT32 result = m_NumSafePoints;

#if defined(_TARGET_ARM_)
#if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_)
// Safepoints are encoded with a -1 adjustment
// but normalizing them masks off the low order bit
// Thus only bother looking if the address is odd
Expand Down Expand Up @@ -440,6 +440,12 @@ void GcInfoDecoder::EnumerateSafePoints(EnumerateSafePointsCallback *pCallback,
{
UINT32 normOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
UINT32 offset = DENORMALIZE_CODE_OFFSET(normOffset) + 2;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnumerateSafepoints() is currently not used on the AMD64 GCStress path.

#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM_) || defined(_TARGET_ARM64_)
// Safepoints are encoded with a -1 adjustment
offset--;
#endif

pCallback(offset, hCallback);
}
}
Expand Down