File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,9 @@ enum ICodeManagerFlags
9292 // any untracked slots
9393
9494 LightUnwind = 0x0100 , // Unwind just enough to get return addresses
95+ ReportFPBasedSlotsOnly
96+ = 0x0200 , // EnumGCRefs/EnumerateLiveSlots should only include
97+ // slots that are based on the frame pointer
9598};
9699
97100// *****************************************************************************
Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ enum ICodeManagerFlags
189189 NoReportUntracked
190190 = 0x0080 , // EnumGCRefs/EnumerateLiveSlots should *not* include
191191 // any untracked slots
192+ ReportFPBasedSlotsOnly
193+ = 0x0200 , // EnumGCRefs/EnumerateLiveSlots should only include
194+ // slots that are based on the frame pointer
192195};
193196
194197#endif // !_strike_h
@@ -739,11 +742,12 @@ class TGcInfoDecoder
739742 {
740743 _ASSERTE (slotIndex < slotDecoder.GetNumSlots ());
741744 const GcSlotDesc* pSlot = slotDecoder.GetSlotDesc (slotIndex);
745+ bool reportFpBasedSlotsOnly = (inputFlags & ReportFPBasedSlotsOnly);
742746
743747 if (slotIndex < slotDecoder.GetNumRegisters ())
744748 {
745749 UINT32 regNum = pSlot->Slot .RegisterNumber ;
746- if ( reportScratchSlots || !IsScratchRegister ( regNum, pRD ) )
750+ if ( ( reportScratchSlots || !IsScratchRegister ( regNum, pRD ) ) && !reportFpBasedSlotsOnly )
747751 {
748752 ReportRegisterToGC (
749753 regNum,
@@ -764,7 +768,8 @@ class TGcInfoDecoder
764768 INT32 spOffset = pSlot->Slot .Stack .SpOffset ;
765769 GcStackSlotBase spBase = pSlot->Slot .Stack .Base ;
766770
767- if ( reportScratchSlots || !IsScratchStackSlot (spOffset, spBase, pRD) )
771+ if ( ( reportScratchSlots || !IsScratchStackSlot (spOffset, spBase, pRD) ) &&
772+ ( !reportFpBasedSlotsOnly || (GC_FRAMEREG_REL == spBase ) ) )
768773 {
769774 ReportStackSlotToGC (
770775 spOffset,
You can’t perform that action at this time.
0 commit comments