Skip to content

Commit 9ee1ecb

Browse files
vchuravyRAI CI (GitHub Action Automation)
authored andcommitted
Merge pull request JuliaLang#48867 from JuliaLang/kp/add-gc-ttsp
Add GC stat: `total_time_to_safepoint`
1 parent 8426491 commit 9ee1ecb

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
@@ -3704,6 +3704,7 @@ JL_DLLEXPORT void jl_gc_collect(jl_gc_collection_t collection)
37043704
if (duration > gc_num.max_time_to_safepoint)
37053705
gc_num.max_time_to_safepoint = duration;
37063706
gc_num.time_to_safepoint = duration;
3707+
gc_num.total_time_to_safepoint += duration;
37073708

37083709
gc_invoke_callbacks(jl_gc_cb_pre_gc_t,
37093710
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)