Skip to content

Commit dc47727

Browse files
committed
[CorProfiler] Invoke newly exposed IGCHeap apis
1 parent 6d72ef0 commit dc47727

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/coreclr/vm/proftoeeinterfaceimpl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7662,14 +7662,16 @@ HRESULT ProfToEEInterfaceImpl::EnumerateGCHeapObjects(object_callback callback,
76627662
ThreadSuspend::SuspendEE(ThreadSuspend::SUSPEND_REASON::SUSPEND_FOR_PROFILER);
76637663
}
76647664

7665+
IGCHeap *hp = GCHeapUtilities::GetGCHeap();
76657666
// Prepare to walk the GC Heap by fixing allocation contexts
7667+
hp->FixAllocContexts(FALSE);
76667668

76677669
// Walk the GC Heap
7668-
IGCHeap *hp = GCHeapUtilities::GetGCHeap();
76697670
unsigned max_generation = hp->GetMaxGeneration();
76707671
hp->DiagWalkHeap((walk_fn)callback, callbackState, max_generation, TRUE);
76717672

76727673
// Repair the allocation contexts that were fixed before walking the GC Heap
7674+
hp->RepairAllocContexts(TRUE);
76737675

76747676
// ResumeEE
76757677
ThreadSuspend::RestartEE(FALSE /* bFinishedGC */, TRUE /* SuspendSucceeded */);

0 commit comments

Comments
 (0)