STRUCT HIST_ENTRY(9)
π NAME π
struct hist_entry β the histogram entry, bestie. This is the kernel API manual, section 9, and we're about to get so into it. β¨
β¨ SYNOPSIS β¨
struct hist_entry {
struct rb_node rb_node_in;
struct rb_node rb_node;
union {
struct list_head node;
struct list_head head;
} pairs;
struct he_stat stat;
struct he_stat *stat_acc;
struct he_mem_stat *mem_stat;
struct map_symbol ms;
struct thread *thread;
struct comm *comm;
struct namespace_id cgroup_id;
u64 cgroup;
u64 ip;
u64 transaction;
u64 code_page_size;
u64 weight;
u64 ins_lat;
u64 weight3;
s32 socket;
s32 cpu;
int parallelism;
int mem_type_off;
u8 cpumode;
u8 depth;
struct simd_flags simd_flags;
bool dummy;
bool leaf;
char level;
filter_mask_t filtered;
u16 callchain_size;
union {
struct hist_entry_diff diff;
struct {
u16 row_offset;
u16 nr_rows;
bool init_have_children;
bool unfolded;
bool has_children;
bool has_no_entry;
};
};
char *srcline;
char *srcfile;
struct symbol *parent;
struct branch_info *branch_info;
long time;
struct hists *hists;
struct mem_info *mem_info;
struct block_info *block_info;
struct kvm_info *kvm_info;
void *raw_data;
u32 raw_size;
int num_res;
struct res_sample *res_samples;
void *trace_output;
struct perf_hpp_list *hpp_list;
struct hist_entry *parent_he;
struct hist_entry_ops *ops;
struct annotated_data_type *mem_type;
union {
struct {
struct rb_root_cached hroot_in;
struct rb_root_cached hroot_out;
};
struct rb_root sorted_chain;
};
struct callchain_root callchain[0];
};
Like, look at her. That's a lot of fields and honestly? She's carrying the whole histogram on her back. π
π«Ά Members π«Ά
Okay so here's the member-by-member breakdown, because we do not skip anything in this house:
weight3β on x86 this one holdsretire_lat, and on powerpc it holdsp_stage_cyc. Same field, different personality depending on the architecture. iykyk. π¦{unnamed_union}β anonymous. That's it, that's the whole note. She's mysterious. She doesn't need a name. π{unnamed_struct}β anonymous. Same energy. Iconic behaviour honestly. β¨{unnamed_union}β anonymous. (Yes, there's another one. We stay unbothered.) π{unnamed_struct}β anonymous. Fourth anonymous member, still serving looks. π
πΈ Description πΈ
Okay bestie, this is the part where the manpage actually explains the mystery anonymous stuff, and it's lowkey the best part:
row_offsetβ offset from the first callchain expanded to appear on screen. Think of it as "which row do we start showing you from". πnr_rowsβ rows expanded in callchain, and it gets recalculated on folding/unfolding. So every time you collapse or expand stuff, this number gets a fresh little glow-up. π
That's literally the whole Description section β no cap, no filler. π«Ά
π SEE ALSO π
Kernel file ./tools/perf/util/hist.h β go read the header, it's right there, it's giving source-of-truth energy. π
Heads up bestie: this page is short and sweet, so don't go inventing extra behaviour for any of these fields. Everything you need is above. π
Mwah π β signed off from ./tools/perf/util , dated October 2026. Struct hist_entry, section 9, out. π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms