From 00f1e0c94a3853f65d153179c1981d5b3f01c5e6 Mon Sep 17 00:00:00 2001 From: yowl Date: Mon, 23 Oct 2023 12:16:00 -0500 Subject: [PATCH] #ifdef out code that requires FEATURE_EVENT_TRACE (#91895) --- src/coreclr/gc/gc.cpp | 1 - src/coreclr/nativeaot/Runtime/gcrhenv.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 59bd152828672..473f25fdab28e 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -10097,7 +10097,6 @@ void gc_heap::update_ro_segment (heap_segment* seg, uint8_t* allocated, uint8_t* { enter_spin_lock (&gc_heap::gc_lock); - assert (use_frozen_segments_p); assert (heap_segment_read_only_p (seg)); assert (allocated <= committed); assert (committed <= heap_segment_reserved (seg)); diff --git a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp index 6fa14327affef..09280870510c9 100644 --- a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp +++ b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp @@ -732,10 +732,12 @@ void GCToEEInterface::DiagGCEnd(size_t index, int gen, int reason, bool fConcurr UNREFERENCED_PARAMETER(gen); UNREFERENCED_PARAMETER(reason); +#ifdef FEATURE_EVENT_TRACE if (!fConcurrent) { ETW::GCLog::WalkHeap(); } +#endif // FEATURE_EVENT_TRACE } // Note on last parameter: when calling this for bgc, only ETW