diff --git a/base/timing.jl b/base/timing.jl index a97e185b036cb..aa5ceef4f8466 100644 --- a/base/timing.jl +++ b/base/timing.jl @@ -20,6 +20,7 @@ struct GC_Num max_memory ::Int64 time_to_safepoint ::Int64 max_time_to_safepointp ::Int64 + total_time_to_safepoint ::Int64 sweep_time ::Int64 mark_time ::Int64 total_sweep_time ::Int64 diff --git a/src/gc.c b/src/gc.c index 5c4f838c6bd11..8cfd74df49809 100644 --- a/src/gc.c +++ b/src/gc.c @@ -3336,6 +3336,7 @@ JL_DLLEXPORT void jl_gc_collect(jl_gc_collection_t collection) if (duration > gc_num.max_time_to_safepoint) gc_num.max_time_to_safepoint = duration; gc_num.time_to_safepoint = duration; + gc_num.total_time_to_safepoint += duration; gc_invoke_callbacks(jl_gc_cb_pre_gc_t, gc_cblist_pre_gc, (collection)); diff --git a/src/gc.h b/src/gc.h index 00c3d48b52935..36a8f87c0b6c7 100644 --- a/src/gc.h +++ b/src/gc.h @@ -76,6 +76,7 @@ typedef struct { uint64_t max_memory; uint64_t time_to_safepoint; uint64_t max_time_to_safepoint; + uint64_t total_time_to_safepoint; uint64_t sweep_time; uint64_t mark_time; uint64_t total_sweep_time;