tracing_cond_snapshot_data(9)
π tracing_cond_snapshot_data(9) π
okay so hi bestie!! welcome to the tracing_cond_snapshot_data page from the Kernel API Manual β yes it's a whole section 9 function and yes it's lowkey iconic. grab a strawberry π and let's get into it.
β¨ NAME β¨
tracing_cond_snapshot_data β the little accessor that gets you the user data hanging out with a snapshot π«Ά
π SYNOPSIS π
void * tracing_cond_snapshot_data (struct trace_array *tr );
that's it. that's the whole vibe check. π
πΈ ARGUMENTS πΈ
trβ the tracing instance, bestie. the trace array. the main character of this whole function. π
π¦ DESCRIPTION π¦
okay so picture this: the user enables a conditional snapshot using tracing_snapshot_cond_enable, right? and when they do that, their user-defined cond_data gets saved right along with the snapshot. literally packaged up together. π
this accessor? it's the thing you call to retrieve that cond_data. that's its whole job. it ate, honestly.
β οΈ do NOT call this fromcond_snapshot.updateβ no cap. it takes thetr->max_locklock, and the code callingcond_snapshot.updatehas already taken that lock. so you'd be doubling up on it and it's giving π deadlock energy. just don't.
and what does it hand back? the cond_data associated with the trace array's snapshot. periodt. β¨
π₯ SEE ALSO π₯
- kernel file
./kernel/trace/trace_snapshot.cβ that's where the magic lives π§ tracing_snapshot_cond(9)tracing_snapshot_alloc(9)tracing_snapshot_cond_enable(9)tracing_snapshot_cond_disable(9)update_max_tr(9)update_max_tr_single(9)
all of these are sisters, read them together iykyk ππ
and that's the page!! π this one lives in ./kernel/trace, dated October 2026 β bye bestie, go take some snapshots responsibly πβ
π¦ 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