trace_seq_used(9)
π 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 ofs->seq.lenif you need to pass the amount of data from the buffer to another buffer (userspace, or what not). Thes->seq.lenon 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 π
- Kernel file
./include/linux/trace_seq.h trace_seq_buffer_ptr(9)trace_seq_has_overflowed(9)trace_seq_pop(9)
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
- 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