trace_seq_used(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– trace_seq_used(9) πŸ’–

okay bestie, you're looking at the Kernel API Manual page for trace_seq_used(9) β€” yes, the actual function name is right there in the title, and yes we're keeping it cute. This one is short and sweet, but the warning is lowkey important 🫢


🌸 NAME 🌸

trace_seq_used β€” amount of actual data written to buffer. That's the whole vibe: how much real data made it into the buffer ✨

πŸŽ€ SYNOPSIS πŸŽ€

int trace_seq_used (struct trace_seq *s );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • s β€” trace sequence descriptor. That's the little descriptor bestie you're checking on πŸ’…

✨ DESCRIPTION ✨

Returns the amount of data written to the buffer.

IMPORTANT! πŸ‘‘ Use this instead of s->seq.len if you need to pass the amount of data from the buffer to another buffer (userspace, or what not). The s->seq.len on overflow is bigger than the buffer size and using it can cause access to undefined memory. So like… do not play with that one, fr fr πŸ˜­πŸ’€

🌈 SEE ALSO 🌈


cute little sign-off: source is ./include/linux, date is October 2026, and this page stays iconic as trace_seq_used(9) πŸ’–βœ¨

πŸ“¦ where this page comes from