STRUCT AUXTRACE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct auxtrace(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct auxtrace, and honestly? it's giving backstage-pass energy. no cap.


✨ NAME ✨

struct auxtrace β€” session callbacks that let AUX area data get decoded πŸ’…

like, they're the little hook functions the decoder calls so it can actually make sense of your AUX data. iconic behavior tbh.


🌸 SYNOPSIS 🌸

here's the whole struct, character for character, no edits from me (i would never):

struct auxtrace {
    int (*process_event)(struct perf_session *session, union perf_event *event, struct perf_sample *sample, const struct perf_tool *tool);
    int (*process_auxtrace_event)(struct perf_session *session, union perf_event *event, const struct perf_tool *tool);
    int (*queue_data)(struct perf_session *session, struct perf_sample *sample, union perf_event *event, u64 data_offset);
    void (*dump_auxtrace_sample)(struct perf_session *session, struct perf_sample *sample);
    int (*flush_events)(struct perf_session *session, const struct perf_tool *tool);
    void (*free_events)(struct perf_session *session);
    void (*free)(struct perf_session *session);
    bool (*evsel_is_auxtrace)(struct perf_session *session, struct evsel *evsel);
};

πŸ’– Members πŸ’–

  • process_event β€” lets the decoder see all the session events πŸ‘€ every single one. it's nosy but make it useful.
  • process_auxtrace_event β€” handles a PERF_RECORD_AUXTRACE event. that's literally its whole job and it ate.
  • queue_data β€” queues an AUX sample or a PERF_RECORD_AUXTRACE event so it can be processed later πŸŽ€ (yes, there's a u64 data_offset in there, keep it).
  • dump_auxtrace_sample β€” dumps out the AUX area sample data. dump it, queen πŸ’…
  • flush_events β€” processes whatever data is still hanging around at the end. cleanup era ✨
  • free_events β€” frees the resources tied to event processing. bye bestie 🫢
  • free β€” frees the resources tied to the session itself. also bye 🫢
real talk: the struct also declares evsel_is_auxtrace (it returns a bool, takes a struct perf_session *session and a struct evsel *evsel) β€” but the Members list doesn't describe it, so i'm not gonna make up a description, that's not the vibe πŸ™ˆ

🌈 SEE ALSO 🌈

kernel file ./tools/perf/util/auxtrace.h, plus this whole little friend group right here:

  • struct itrace_synth_opts(9)
  • struct auxtrace_index_entry(9)
  • struct auxtrace_index(9)
  • struct auxtrace_buffer(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)

and that's the whole page, bestie πŸŽ€ it lives at ./tools/perf/util, dated October 2026, and yes it's still called struct auxtrace(9) β€” go decode some AUX data, you've got this πŸ’œπŸ”₯

πŸ“¦ where this page comes from