STRUCT AUXTRACE_BUFFER(9)
π struct auxtrace_buffer(9) π
okay so bestie, welcome to the Kernel API Manual β¨ and today's main character is struct auxtrace_buffer β literally the container that holds AUX area tracing data. yes, that AUX area. she's iconic, she's in ./tools/perf/util, and she's about to be explained in full. buckle up π
πΈ NAME πΈ
struct auxtrace_buffer β a buffer containing AUX area tracing data. that's it, that's the vibe π
β¨ SYNOPSIS β¨
struct auxtrace_buffer {
struct list_head list;
size_t size;
pid_t pid;
pid_t tid;
struct perf_cpu cpu;
void *data;
off_t data_offset;
void *mmap_addr;
size_t mmap_size;
bool data_needs_freeing;
bool consecutive;
u64 offset;
u64 reference;
u64 buffer_nr;
size_t use_size;
void *use_data;
};
look at her. sixteen fields. all of them important. no cap π₯
π¦ Members π¦
time for the roll call, and every single one of them is getting their moment, periodt:
listβ buffers get queued up in a list, and that list is held bystruct auxtrace_queue. it's giving group chat energy tbh π¬sizeβ the size of the buffer, in bytes. yes, bytes. keep up πpidβ in per-thread mode, the pid this buffer is associated withtidβ in per-thread mode, the tid this buffer is associated with. (yes, they're a package deal, iykyk)cpuβ in per-cpu mode, the cpu this buffer is associated withdataβ the actual buffer data. and listen: it can be null if the data has not been loaded yet π don't panic, that's legaldata_offsetβ the file offset at which the buffer can be readmmap_addrβ the mmap address at which the buffer can be readmmap_sizeβ the size of the mmap atmmap_addr. they match, bestie, it's a set πdata_needs_freeingβ the data wasmalloc'd, so free it when it is no longer needed. this is your reminder, don't ghost it πconsecutiveβ the original data was split up, and this buffer is consecutive to the previous buffer. so she's a sequel β¨offsetβ the offset as determined by theaux_head/aux_tailmembers ofstruct perf_event_mmap_pagereferenceβ an implementation-specific reference determined when the data is recorded. implementation-specific means it's giving mysterious. don't ask, she won't tell π«Άbuffer_nrβ used to number each buffer. everyone gets a number, no queue-jumping πuse_sizeβ the implementation actually only uses this number of bytesuse_dataβ the implementation actually only uses data starting at this address
girlie, note the pattern on the last two:use_sizeanduse_dataare the actual slice being used. the full buffer is bigger. don't get caught out π
π SEE ALSO π
Kernel file ./tools/perf/util/auxtrace.h
struct itrace_synth_opts(9)struct auxtrace_index_entry(9)struct auxtrace_index(9)struct auxtrace(9)struct auxtrace_queue(9)struct auxtrace_queues(9)struct auxtrace_heap_item(9)struct auxtrace_heap(9)struct auxtrace_mmap(9)struct auxtrace_mmap_params(9)struct auxtrace_record(9)struct addr_filter(9)struct addr_filters(9)
read them all, they're the extended universe π§ββοΈ
okay and that's the whole page, bestie! this one came from ./tools/perf/util, October 2026, and it's filed under struct auxtrace_buffer(9) β go forth and trace your AUX areas 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