From 4a386978dd02976c2de9e60e9c77e3c3e9af5f21 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Thu, 25 Apr 2024 19:57:34 -0700 Subject: [PATCH] Fix compact time computation (#100599) --- src/coreclr/gc/gc.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index e43047cf6e113a..0861a15d274d7c 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -29966,7 +29966,7 @@ void gc_heap::mark_phase (int condemned_gen_number) #endif //MULTIPLE_HEAPS { #ifdef FEATURE_EVENT_TRACE - record_mark_time (gc_time_info[time_plan - 1], current_mark_time, last_mark_time); + record_mark_time (gc_time_info[time_mark_long_weak], current_mark_time, last_mark_time); gc_time_info[time_plan] = last_mark_time; #endif //FEATURE_EVENT_TRACE @@ -33964,26 +33964,12 @@ void gc_heap::plan_phase (int condemned_gen_number) if (gc_t_join.joined()) #endif //MULTIPLE_HEAPS { -#ifdef FEATURE_EVENT_TRACE - if (informational_event_enabled_p) - { - uint64_t current_time = GetHighPrecisionTimeStamp(); - gc_time_info[time_compact] = current_time - gc_time_info[time_compact]; - } -#endif //FEATURE_EVENT_TRACE - #ifdef MULTIPLE_HEAPS for (int i = 0; i < n_heaps; i++) { -#ifdef USE_REGIONS - g_heaps [i]->rearrange_uoh_segments(); -#endif //USE_REGIONS g_heaps [i]->rearrange_heap_segments (TRUE); } #else //MULTIPLE_HEAPS -#ifdef USE_REGIONS - rearrange_uoh_segments(); -#endif //USE_REGIONS rearrange_heap_segments (TRUE); #endif //MULTIPLE_HEAPS @@ -34018,7 +34004,7 @@ void gc_heap::plan_phase (int condemned_gen_number) #endif //MULTIPLE_HEAPS #ifdef FEATURE_EVENT_TRACE - if (informational_event_enabled_p && (condemned_gen_number < (max_generation -1))) + if (informational_event_enabled_p) { uint64_t current_time = GetHighPrecisionTimeStamp(); gc_time_info[time_compact] = current_time - gc_time_info[time_compact];