Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf hist: Shrink struct hist_entry size

Reorder the struct fields by size to reduce paddings and reduce
struct simd_flags size from 8 to 1 byte.

This reduces struct hist_entry size by 8 bytes (592->584),
and leaves a single more usable 6 byte padding hole.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/r/7c1cb1c8f9901e945162701ba7269d0f9c70be89.1739437531.git.dvyukov@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Dmitry Vyukov and committed by
Namhyung Kim
5e838165 257facfa

+5 -5
+4 -4
tools/perf/util/hist.h
··· 239 239 u64 cgroup; 240 240 u64 ip; 241 241 u64 transaction; 242 - s32 socket; 243 - s32 cpu; 244 - int parallelism; 245 242 u64 code_page_size; 246 243 u64 weight; 247 244 u64 ins_lat; 248 245 u64 p_stage_cyc; 246 + s32 socket; 247 + s32 cpu; 248 + int parallelism; 249 + int mem_type_off; 249 250 u8 cpumode; 250 251 u8 depth; 251 - int mem_type_off; 252 252 struct simd_flags simd_flags; 253 253 254 254 /* We are added by hists__add_dummy_entry. */
+1 -1
tools/perf/util/sample.h
··· 67 67 }; 68 68 69 69 struct simd_flags { 70 - u64 arch:1, /* architecture (isa) */ 70 + u8 arch:1, /* architecture (isa) */ 71 71 pred:2; /* predication */ 72 72 }; 73 73