Skip to content

Commit

Permalink
Merge pull request JuliaLang#48867 from JuliaLang/kp/add-gc-ttsp
Browse files Browse the repository at this point in the history
Add GC stat: `total_time_to_safepoint`
  • Loading branch information
vchuravy authored and kpamnany committed Jul 6, 2023
1 parent 4c806b9 commit 1404700
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/timing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct GC_Num
max_memory ::Int64
time_to_safepoint ::Int64
max_time_to_safepoint ::Int64
total_time_to_safepoint ::Int64
sweep_time ::Int64
mark_time ::Int64
total_sweep_time ::Int64
Expand Down
1 change: 1 addition & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3697,6 +3697,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));
Expand Down
1 change: 1 addition & 0 deletions src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,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;
Expand Down

0 comments on commit 1404700

Please sign in to comment.