tracing_map_add_sum_field(9)
π« tracing_map_add_sum_field(9) π«
ok so this is a page straight out of the Kernel API Manual bestie, and we're talking about one tiny little function that does one tiny little job and honestly? it ate. let's get into it π
β¨ NAME β¨
tracing_map_add_sum_field β bestie, this one adds a field that describes a tracing_map sum π
πΈ SYNOPSIS πΈ
int tracing_map_add_sum_field (struct tracing_map *map );
like, that's it. that's the whole vibe. one arg, one int back π¦
π«Ά ARGUMENTS π«Ά
- map β the
tracing_mapin question, the main character of this whole situation π
π DESCRIPTION π
okay so picture this: you're adding a sum field to the key, and the function hands you back the index that identifies it β both in the map and in the associated tracing_map_elts. that index is the whole point, iykyk.
and what do you even do with that index? so glad you asked:
- you use it, for instance, to update a sum for a particular
tracing_map_eltusingtracing_map_update_sum - or you can read it right back out via
tracing_map_read_sum
that's the whole tea. no cap, that's literally it ββ¨
π₯ RETURN π₯
- the index identifying the field in the map and the associated
tracing_map_eltsβ slay π - or
-EINVALon error π (it happens to the best of us)
π¦ SEE ALSO π¦
kernel file ./kernel/trace/tracing_map.c plus the whole friend group:
tracing_map_update_sum(9)tracing_map_read_sum(9)tracing_map_set_var(9)tracing_map_var_set(9)tracing_map_read_var(9)tracing_map_read_var_once(9)tracing_map_add_var(9)tracing_map_add_key_field(9)tracing_map_insert(9)tracing_map_lookup(9)tracing_map_destroy(9)tracing_map_clear(9)tracing_map_create(9)tracing_map_init(9)tracing_map_destroy_sort_entries(9)tracing_map_sort_entries(9)
ok that's the page!! huge shoutout to ./kernel/trace for being the source of this whole moment, to the Kernel API Manual for hosting, and to October 2026 for the timestamp β go forth and add your sum fields bestie, ily, bye!! ππ§β
π¦ 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