Skip to content

Commit b38814f

Browse files
vchuravykpamnany
authored andcommitted
Merge pull request JuliaLang#48867 from JuliaLang/kp/add-gc-ttsp
Add GC stat: `total_time_to_safepoint`
1 parent b32623b commit b38814f

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

base/timing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct GC_Num
2020
max_memory ::Int64
2121
time_to_safepoint ::Int64
2222
max_time_to_safepoint ::Int64
23+
total_time_to_safepoint ::Int64
2324
sweep_time ::Int64
2425
mark_time ::Int64
2526
total_sweep_time ::Int64

src/gc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3698,6 +3698,7 @@ JL_DLLEXPORT void jl_gc_collect(jl_gc_collection_t collection)
36983698
if (duration > gc_num.max_time_to_safepoint)
36993699
gc_num.max_time_to_safepoint = duration;
37003700
gc_num.time_to_safepoint = duration;
3701+
gc_num.total_time_to_safepoint += duration;
37013702

37023703
gc_invoke_callbacks(jl_gc_cb_pre_gc_t,
37033704
gc_cblist_pre_gc, (collection));

src/gc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ typedef struct {
7777
uint64_t max_memory;
7878
uint64_t time_to_safepoint;
7979
uint64_t max_time_to_safepoint;
80+
uint64_t total_time_to_safepoint;
8081
uint64_t sweep_time;
8182
uint64_t mark_time;
8283
uint64_t total_sweep_time;

0 commit comments

Comments
 (0)