check_var_refs(9)
π check_var_refs β the "is anybody using my vars rn??" check
okay so bestie, welcome to the Kernel API Manual β¨ β this one's from the kernel tracing corner of things, and it's honestly such a useful little vibe check. Let's get into it π«Ά
β¨ NAME β¨
check_var_refs β checks if there's, like, any reference hanging around to any of a trigger's variables π
πΈ SYNOPSIS πΈ
bool check_var_refs (struct hist_trigger_data *hist_data );
π ARGUMENTS π
hist_dataβ the hist trigger in question. that's the one you're checking on, bestie π¦
π DESCRIPTION π
so here's the situation: a trigger can define one or more variables. and if any single one of those variables is currently being referenced by any other trigger, this function will determine that. literally its whole job π
typically it's used to figure out whether or not a trigger can be removed:
- if there are any references to a trigger's variables, it cannot be removed. periodt. π«
π₯ RETURN π₯
True if there is a reference to any of the trigger's variables π―
π§ SEE ALSO π§
- Kernel file
./kernel/trace/trace_events_hist.c check_field_for_var_ref(9)find_var_ref(9)find_any_var_ref(9)create_var_ref(9)create_field_var_hist(9)create_target_field_var(9)
so many little helpers, iykyk π
and that's the whole page!! π this lil icon lives over in ./kernel/trace, dated October 2026, and it answers to check_var_refs(9) β no cap, that's the sign-off bestie, mwah ππ
π¦ 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