Skip to content

Commit d6fdbf5

Browse files
authored
only update fragmentation data for pages that are not lazily freed (#57907)
We are including data from lazily freed pages into this metric, which makes it inaccurate. Thanks @qinsoon for spotting it.
1 parent d9441ac commit d6fdbf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gc-stock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,7 @@ static void gc_sweep_page(gc_page_profiler_serializer_t *s, jl_gc_pool_t *p, jl_
948948

949949
done:
950950
if (re_use_page) {
951+
gc_update_page_fragmentation_data(pg);
951952
push_lf_back(allocd, pg);
952953
}
953954
else {
@@ -956,7 +957,6 @@ static void gc_sweep_page(gc_page_profiler_serializer_t *s, jl_gc_pool_t *p, jl_
956957
push_lf_back(&global_page_pool_lazily_freed, pg);
957958
}
958959
gc_page_profile_write_to_file(s);
959-
gc_update_page_fragmentation_data(pg);
960960
gc_time_count_page(freedall, pg_skpd);
961961
jl_ptls_t ptls = jl_current_task->ptls;
962962
// Note that we aggregate the `pool_live_bytes` over all threads before returning this

0 commit comments

Comments
 (0)