tracing_cond_snapshot_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 from cond_snapshot.update β€” no cap. it takes the tr->max_lock lock, and the code calling cond_snapshot.update has 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 πŸ”₯

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