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

Kiran's Add last_full_sweep to GC stats #18

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 @@ -25,6 +25,7 @@ struct GC_Num
mark_time ::Int64
total_sweep_time ::Int64
total_mark_time ::Int64
last_full_sweep ::Int64
end

gc_num() = ccall(:jl_gc_num, GC_Num, ())
Expand Down
2 changes: 2 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3278,6 +3278,8 @@ static int _jl_gc_collect(jl_ptls_t ptls, jl_gc_collection_t collection)
uint64_t sweep_time = gc_end_time - start_sweep_time;
gc_num.total_sweep_time += sweep_time;
gc_num.sweep_time = sweep_time;
if (sweep_full)
gc_num.last_full_sweep = gc_end_time;

// sweeping is over
// 6. if it is a quick sweep, put back the remembered objects in queued state
Expand Down
1 change: 1 addition & 0 deletions src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ typedef struct {
uint64_t mark_time;
uint64_t total_sweep_time;
uint64_t total_mark_time;
uint64_t last_full_sweep;
} jl_gc_num_t;

enum {
Expand Down