Skip to content

Commit f661509

Browse files
d-nettoKristofferC
authored andcommitted
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. (cherry picked from commit d6fdbf5)
1 parent 118bd2d commit f661509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gc.c

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

15431543
done:
15441544
if (re_use_page) {
1545+
gc_update_page_fragmentation_data(pg);
15451546
push_lf_back(allocd, pg);
15461547
}
15471548
else {
@@ -1555,7 +1556,6 @@ static void gc_sweep_page(gc_page_profiler_serializer_t *s, jl_gc_pool_t *p, jl_
15551556
}
15561557
}
15571558
gc_page_profile_write_to_file(s);
1558-
gc_update_page_fragmentation_data(pg);
15591559
gc_time_count_page(freedall, pg_skpd);
15601560
jl_ptls_t ptls = gc_all_tls_states[pg->thread_n];
15611561
jl_atomic_fetch_add(&ptls->gc_num.pool_live_bytes, GC_PAGE_SZ - GC_PAGE_OFFSET - nfree * osize);

0 commit comments

Comments
 (0)