From ded55db3236ff9fd72fe7a0bf9e0fd179e7e85da Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 19:13:02 +0000 Subject: [PATCH 1/2] Remove dead LastReportedFuncletInfo and ReportFPBasedSlotsOnly code Co-authored-by: max-charlamb <44248479+max-charlamb@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/170e8a42-d696-415a-a397-af4f777ee568 --- src/coreclr/inc/eetwain.h | 3 --- src/coreclr/inc/gcinfodecoder.h | 9 ++------- src/coreclr/vm/exinfo.h | 7 ------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/coreclr/inc/eetwain.h b/src/coreclr/inc/eetwain.h index 040551270ea6c5..bbe47eebbdd550 100644 --- a/src/coreclr/inc/eetwain.h +++ b/src/coreclr/inc/eetwain.h @@ -92,9 +92,6 @@ enum ICodeManagerFlags // any untracked slots LightUnwind = 0x0100, // Unwind just enough to get return addresses - ReportFPBasedSlotsOnly - = 0x0200, // EnumGCRefs/EnumerateLiveSlots should only include - // slots that are based on the frame pointer }; //***************************************************************************** diff --git a/src/coreclr/inc/gcinfodecoder.h b/src/coreclr/inc/gcinfodecoder.h index 0836dfd0c54b68..de1ba8b286ecc5 100644 --- a/src/coreclr/inc/gcinfodecoder.h +++ b/src/coreclr/inc/gcinfodecoder.h @@ -189,9 +189,6 @@ enum ICodeManagerFlags NoReportUntracked = 0x0080, // EnumGCRefs/EnumerateLiveSlots should *not* include // any untracked slots - ReportFPBasedSlotsOnly - = 0x0200, // EnumGCRefs/EnumerateLiveSlots should only include - // slots that are based on the frame pointer }; #endif // !_strike_h @@ -742,12 +739,11 @@ class TGcInfoDecoder { _ASSERTE(slotIndex < slotDecoder.GetNumSlots()); const GcSlotDesc* pSlot = slotDecoder.GetSlotDesc(slotIndex); - bool reportFpBasedSlotsOnly = (inputFlags & ReportFPBasedSlotsOnly); if(slotIndex < slotDecoder.GetNumRegisters()) { UINT32 regNum = pSlot->Slot.RegisterNumber; - if( ( reportScratchSlots || !IsScratchRegister( regNum, pRD ) ) && !reportFpBasedSlotsOnly ) + if( reportScratchSlots || !IsScratchRegister( regNum, pRD ) ) { ReportRegisterToGC( regNum, @@ -768,8 +764,7 @@ class TGcInfoDecoder INT32 spOffset = pSlot->Slot.Stack.SpOffset; GcStackSlotBase spBase = pSlot->Slot.Stack.Base; - if( ( reportScratchSlots || !IsScratchStackSlot(spOffset, spBase, pRD) ) && - ( !reportFpBasedSlotsOnly || (GC_FRAMEREG_REL == spBase ) ) ) + if( reportScratchSlots || !IsScratchStackSlot(spOffset, spBase, pRD) ) { ReportStackSlotToGC( spOffset, diff --git a/src/coreclr/vm/exinfo.h b/src/coreclr/vm/exinfo.h index 302975c5d7ec04..e081faca1a8f8b 100644 --- a/src/coreclr/vm/exinfo.h +++ b/src/coreclr/vm/exinfo.h @@ -39,13 +39,6 @@ struct RhEHClause struct PAL_SEHException; -struct LastReportedFuncletInfo -{ - PCODE IP; - TADDR FP; - uint32_t Flags; -}; - struct ExInfo { friend struct ::cdac_data; From c88ce3379fd3af3c03ff797500128dc6a7fe6b6f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:44:19 +0000 Subject: [PATCH 2/2] Revert ReportFPBasedSlotsOnly removal; keep only LastReportedFuncletInfo deletion Co-authored-by: max-charlamb <44248479+max-charlamb@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/8fca3dc9-3d64-4bff-be2b-096e511c609f --- src/coreclr/inc/eetwain.h | 3 +++ src/coreclr/inc/gcinfodecoder.h | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/coreclr/inc/eetwain.h b/src/coreclr/inc/eetwain.h index bbe47eebbdd550..040551270ea6c5 100644 --- a/src/coreclr/inc/eetwain.h +++ b/src/coreclr/inc/eetwain.h @@ -92,6 +92,9 @@ enum ICodeManagerFlags // any untracked slots LightUnwind = 0x0100, // Unwind just enough to get return addresses + ReportFPBasedSlotsOnly + = 0x0200, // EnumGCRefs/EnumerateLiveSlots should only include + // slots that are based on the frame pointer }; //***************************************************************************** diff --git a/src/coreclr/inc/gcinfodecoder.h b/src/coreclr/inc/gcinfodecoder.h index de1ba8b286ecc5..0836dfd0c54b68 100644 --- a/src/coreclr/inc/gcinfodecoder.h +++ b/src/coreclr/inc/gcinfodecoder.h @@ -189,6 +189,9 @@ enum ICodeManagerFlags NoReportUntracked = 0x0080, // EnumGCRefs/EnumerateLiveSlots should *not* include // any untracked slots + ReportFPBasedSlotsOnly + = 0x0200, // EnumGCRefs/EnumerateLiveSlots should only include + // slots that are based on the frame pointer }; #endif // !_strike_h @@ -739,11 +742,12 @@ class TGcInfoDecoder { _ASSERTE(slotIndex < slotDecoder.GetNumSlots()); const GcSlotDesc* pSlot = slotDecoder.GetSlotDesc(slotIndex); + bool reportFpBasedSlotsOnly = (inputFlags & ReportFPBasedSlotsOnly); if(slotIndex < slotDecoder.GetNumRegisters()) { UINT32 regNum = pSlot->Slot.RegisterNumber; - if( reportScratchSlots || !IsScratchRegister( regNum, pRD ) ) + if( ( reportScratchSlots || !IsScratchRegister( regNum, pRD ) ) && !reportFpBasedSlotsOnly ) { ReportRegisterToGC( regNum, @@ -764,7 +768,8 @@ class TGcInfoDecoder INT32 spOffset = pSlot->Slot.Stack.SpOffset; GcStackSlotBase spBase = pSlot->Slot.Stack.Base; - if( reportScratchSlots || !IsScratchStackSlot(spOffset, spBase, pRD) ) + if( ( reportScratchSlots || !IsScratchStackSlot(spOffset, spBase, pRD) ) && + ( !reportFpBasedSlotsOnly || (GC_FRAMEREG_REL == spBase ) ) ) { ReportStackSlotToGC( spOffset,