Skip to content

Commit

Permalink
Fix compact time computation (#100599)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshung committed Apr 26, 2024
1 parent e1bda8a commit 264023e
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 264023e

Please sign in to comment.