tracing_map_clear(9)
π tracing_map_clear(9) π
okay so bestie, welcome to the Kernel API Manual β this one's a lil' function called tracing_map_clear and honestly? she's the "start over, fresh slate" icon of the tracing world β¨
πΈ NAME πΈ
tracing_map_clear β literally just clears a tracing_map, that's the whole gig π
π SYNOPSIS π
void tracing_map_clear (struct tracing_map *map );
π¦ ARGUMENTS π¦
mapβ thetracing_mapyou want to clear out. yep. that's the one. go wipe her π
β¨ DESCRIPTION β¨
so what does it do? it resets the tracing map back to a cleared / initial state. like factory reset but make it kernel π
the tracing_map_elts all get cleared, and the array of struct tracing_map_entry gets reset to an initialized state. everything's back to how it started, no cap π―
β οΈ okay this part is important bestie, don't skip it: callers should make sure there are no writers actively inserting into the map before calling this. if someone's out here mid-insert while you're clearing, that's a bad vibe. check first, then clear. π«Ά
π SEE ALSO π
kernel file ./kernel/trace/tracing_map.c, plus the whole squad of related functions β they all match, so like, it's giving a full 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_sum_field(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_create(9)tracing_map_init(9)tracing_map_destroy_sort_entries(9)tracing_map_sort_entries(9)
and that's the page, bestie! π§ mwah π
sign-off vibes: this iconic lil' entry comes from ./kernel/trace, dated October 2026, and it's filed under tracing_map_clear(9) β remember her name πβ¨
π¦ 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