annotated_d...date_samples(9)
π annotated_d...date_samples(9) π
okay so real talk β this is a page from the Kernel API Manual, and it's about one (1) little function that keeps a histogram looking fresh. bestie, it's giving bookkeeping main character energy and honestly? we stan. β¨
πΈ NAME πΈ
annotated_data_type__update_samples β update the histogram, that's literally it, that's the whole job π«Ά
β SYNOPSIS β
int annotated_data_type__update_samples (struct annotated_data_type *adt
, struct evsel *evsel , int offset , int nr_samples , u64 period );
like, yes, she's a int-returning icon and she takes five args. don't come for her formatting, she's been through a lot π
π ARGUMENTS π
adtβ the data type you're updating. the actual struct annotated_data_type in question πevselβ the event to update. she's the one getting the glow-up β¨offsetβ offset in the type. yes, in the type, keep up πnr_samplesβ how many samples are chilling at this offset π₯periodβ the event count at this offset. numbers. we love numbers π
π¦ DESCRIPTION π¦
so what she does is update the type histogram at ofs for evsel. periodt. π
and here's the part that lowkey matters: samples get aggregated before calling this function, which means it's totally fine to call her with more than one sample at a certain offset. she can handle it. she's built different. no cap π§
π SEE ALSO π
also the kernel file ./tools/perf/util/annotate-data.c β that's where the magic lives, iykyk π
and that's the page, bestie!! π this lil gem ships out of ./tools/perf/util and it's dated October 2026, so mark your calendars and go update some histograms πππ
π¦ 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