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