STRUCT AUXTRACE_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 by struct 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 with
  • tid β€” 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 with
  • data β€” the actual buffer data. and listen: it can be null if the data has not been loaded yet πŸ™ˆ don't panic, that's legal
  • data_offset β€” the file offset at which the buffer can be read
  • mmap_addr β€” the mmap address at which the buffer can be read
  • mmap_size β€” the size of the mmap at mmap_addr. they match, bestie, it's a set πŸ’œ
  • data_needs_freeing β€” the data was malloc'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 the aux_head / aux_tail members of struct perf_event_mmap_page
  • reference β€” 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 bytes
  • use_data β€” the implementation actually only uses data starting at this address
girlie, note the pattern on the last two: use_size and use_data are 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