summaryrefslogtreecommitdiff
path: root/src/vm/gcinfodecoder.cpp
diff options
context:
space:
mode:
authorPeter Kukol <pkukol@users.noreply.github.com>2017-02-23 09:13:34 -0700
committerGitHub <noreply@github.com>2017-02-23 09:13:34 -0700
commitd7509df9635ca92c1a3cf75dc2516ae51b0e03d6 (patch)
tree12dc5cb574fd2f419ba2681ffda6b74c6f121385 /src/vm/gcinfodecoder.cpp
parent08581d8e9515ef1a348e7509785ea29195a9de37 (diff)
downloadcoreclr-d7509df9635ca92c1a3cf75dc2516ae51b0e03d6.tar.gz
coreclr-d7509df9635ca92c1a3cf75dc2516ae51b0e03d6.tar.bz2
coreclr-d7509df9635ca92c1a3cf75dc2516ae51b0e03d6.zip
Simplified MinOpts GC ref tracking. (#9231)
Simplified MinOpts GC ref tracking - when a method is compiled with MinOpts for targets with the 64-bit GC info encoder we mark all GC slots as untracked and we omit encoding call sites with no live tracked GC refs explicitly in the GC tables; this can be controlled using the new COMPlus_JitMinOptsTrackGCrefs environment flag.
Diffstat (limited to 'src/vm/gcinfodecoder.cpp')
-rw-r--r--src/vm/gcinfodecoder.cpp55
1 files changed, 33 insertions, 22 deletions
diff --git a/src/vm/gcinfodecoder.cpp b/src/vm/gcinfodecoder.cpp
index 89f470499e..5dd52b9fe3 100644
--- a/src/vm/gcinfodecoder.cpp
+++ b/src/vm/gcinfodecoder.cpp
@@ -628,6 +628,8 @@ bool GcInfoDecoder::EnumerateLiveSlots(
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ bool noTrackedRefs = false;
+
if(m_SafePointIndex < m_NumSafePoints && !executionAborted)
{
// Skip interruptibility information
@@ -648,33 +650,40 @@ bool GcInfoDecoder::EnumerateLiveSlots(
//
if(!executionAborted)
{
- _ASSERTE(m_NumInterruptibleRanges);
+ if(m_NumInterruptibleRanges == 0)
+ {
+ // No ranges and no explicit safepoint - must be MinOpts with untracked refs.
+ noTrackedRefs = true;
+ }
}
- int countIntersections = 0;
- UINT32 lastNormStop = 0;
- for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ if(m_NumInterruptibleRanges != 0)
{
- UINT32 normStartDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
- UINT32 normStopDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE ) + 1;
+ int countIntersections = 0;
+ UINT32 lastNormStop = 0;
+ for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ {
+ UINT32 normStartDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
+ UINT32 normStopDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE ) + 1;
- UINT32 normStart = lastNormStop + normStartDelta;
- UINT32 normStop = normStart + normStopDelta;
- if(normBreakOffset >= normStart && normBreakOffset < normStop)
+ UINT32 normStart = lastNormStop + normStartDelta;
+ UINT32 normStop = normStart + normStopDelta;
+ if(normBreakOffset >= normStart && normBreakOffset < normStop)
+ {
+ _ASSERTE(pseudoBreakOffset == 0);
+ countIntersections++;
+ pseudoBreakOffset = numInterruptibleLength + normBreakOffset - normStart;
+ }
+ numInterruptibleLength += normStopDelta;
+ lastNormStop = normStop;
+ }
+ _ASSERTE(countIntersections <= 1);
+ if(countIntersections == 0)
{
- _ASSERTE(pseudoBreakOffset == 0);
- countIntersections++;
- pseudoBreakOffset = numInterruptibleLength + normBreakOffset - normStart;
+ _ASSERTE(executionAborted);
+ LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it is aborted and not fully interruptible.\n"));
+ goto ExitSuccess;
}
- numInterruptibleLength += normStopDelta;
- lastNormStop = normStop;
- }
- _ASSERTE(countIntersections <= 1);
- if(countIntersections == 0)
- {
- _ASSERTE(executionAborted);
- LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it is aborted and not fully interruptible.\n"));
- goto ExitSuccess;
}
}
#else // !PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
@@ -718,7 +727,7 @@ bool GcInfoDecoder::EnumerateLiveSlots(
if(executionAborted)
{
- _ASSERTE(m_NumSafePoints == 0);
+ // Skip over safepoint info (if any is present).
m_Reader.Skip(m_NumSafePoints * numSlots);
}
else if( m_SafePointIndex != m_NumSafePoints )
@@ -787,6 +796,8 @@ bool GcInfoDecoder::EnumerateLiveSlots(
else
{
m_Reader.Skip(m_NumSafePoints * numSlots);
+ if(noTrackedRefs)
+ goto ReportUntracked;
}
#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED