diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 89498065bbf72..5f60b8172ae13 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -10056,7 +10056,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 3ec488605c1b3..379bf5003f9b2 100644 --- a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp +++ b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp @@ -749,10 +749,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