diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2025-02-13 10:08:22 +0100 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-02-18 14:04:32 -0800 |
commit | 5e838165d0c2d7eff5f515756e0414bf289d70b9 (patch) | |
tree | c5809c732080ec1d3963d4d474060acb4bb73fdf | |
parent | 257facfaf54295ae16446ab14060b1e84453383c (diff) |
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>
-rw-r--r-- | tools/perf/util/hist.h | 8 | ||||
-rw-r--r-- | tools/perf/util/sample.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 29d4c7a3d174..317d06cca8b8 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -239,16 +239,16 @@ struct hist_entry { u64 cgroup; u64 ip; u64 transaction; - s32 socket; - s32 cpu; - int parallelism; u64 code_page_size; u64 weight; u64 ins_lat; u64 p_stage_cyc; + s32 socket; + s32 cpu; + int parallelism; + int mem_type_off; u8 cpumode; u8 depth; - int mem_type_off; struct simd_flags simd_flags; /* We are added by hists__add_dummy_entry. */ diff --git a/tools/perf/util/sample.h b/tools/perf/util/sample.h index bbf71e6406c4..0e96240052e9 100644 --- a/tools/perf/util/sample.h +++ b/tools/perf/util/sample.h @@ -67,7 +67,7 @@ struct aux_sample { }; struct simd_flags { - u64 arch:1, /* architecture (isa) */ + u8 arch:1, /* architecture (isa) */ pred:2; /* predication */ }; |