From e62aa478c79865242363d3531fc58c4c7f65a1b4 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Tue, 28 Mar 2023 20:09:41 -0700 Subject: Rearrange the bools in prof_tdata_t to save some bytes. This lowered the sizeof(prof_tdata_t) from 200 to 192 which is a round size class. Afterwards the tdata_t size remain unchanged with the last commit, which effectively inlined the storage of thread names for free. --- include/jemalloc/internal/prof_structs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/jemalloc/internal/prof_structs.h b/include/jemalloc/internal/prof_structs.h index da3cf8d5..49061f02 100644 --- a/include/jemalloc/internal/prof_structs.h +++ b/include/jemalloc/internal/prof_structs.h @@ -156,9 +156,6 @@ struct prof_tdata_s { */ uint64_t thr_discrim; - bool attached; - bool expired; - rb_node(prof_tdata_t) tdata_link; /* @@ -198,6 +195,9 @@ struct prof_tdata_s { */ bool active; + bool attached; + bool expired; + /* Temporary storage for summation during dump. */ prof_cnt_t cnt_summed; -- cgit v1.2.1