Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track total time spent in the GC waits #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_safepointp ::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 @@ -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));
Expand Down
1 change: 1 addition & 0 deletions src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down