1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * auxtrace.h: AUX area trace support
4 * Copyright (c) 2013-2015, Intel Corporation.
7 #ifndef __PERF_AUXTRACE_H
8 #define __PERF_AUXTRACE_H
10 #include <sys/types.h>
14 #include <stdio.h> // FILE
15 #include <linux/list.h>
16 #include <linux/perf_event.h>
17 #include <linux/types.h>
18 #include <internal/cpumap.h>
19 #include <asm/bitsperlong.h>
20 #include <asm/barrier.h>
31 struct perf_record_auxtrace_error;
32 struct perf_record_auxtrace_info;
36 enum auxtrace_error_type {
37 PERF_AUXTRACE_ERROR_ITRACE = 1,
38 PERF_AUXTRACE_ERROR_MAX
41 /* Auxtrace records must have the same alignment as perf event records */
42 #define PERF_AUXTRACE_RECORD_ALIGNMENT 8
45 PERF_AUXTRACE_UNKNOWN,
46 PERF_AUXTRACE_INTEL_PT,
47 PERF_AUXTRACE_INTEL_BTS,
49 PERF_AUXTRACE_ARM_SPE,
50 PERF_AUXTRACE_S390_CPUMSF,
53 enum itrace_period_type {
54 PERF_ITRACE_PERIOD_INSTRUCTIONS,
55 PERF_ITRACE_PERIOD_TICKS,
56 PERF_ITRACE_PERIOD_NANOSECS,
59 #define AUXTRACE_ERR_FLG_OVERFLOW (1 << ('o' - 'a'))
60 #define AUXTRACE_ERR_FLG_DATA_LOST (1 << ('l' - 'a'))
62 #define AUXTRACE_LOG_FLG_ALL_PERF_EVTS (1 << ('a' - 'a'))
63 #define AUXTRACE_LOG_FLG_USE_STDOUT (1 << ('o' - 'a'))
66 * struct itrace_synth_opts - AUX area tracing synthesis options.
67 * @set: indicates whether or not options have been set
68 * @default_no_sample: Default to no sampling.
69 * @inject: indicates the event (not just the sample) must be fully synthesized
70 * because 'perf inject' will write it out
71 * @instructions: whether to synthesize 'instructions' events
72 * @branches: whether to synthesize 'branches' events
73 * (branch misses only for Arm SPE)
74 * @transactions: whether to synthesize events for transactions
75 * @ptwrites: whether to synthesize events for ptwrites
76 * @pwr_events: whether to synthesize power events
77 * @other_events: whether to synthesize other events recorded due to the use of
79 * @errors: whether to synthesize decoder error events
80 * @dont_decode: whether to skip decoding entirely
81 * @log: write a decoding log
82 * @calls: limit branch samples to calls (can be combined with @returns)
83 * @returns: limit branch samples to returns (can be combined with @calls)
84 * @callchain: add callchain to 'instructions' events
85 * @add_callchain: add callchain to existing event records
86 * @thread_stack: feed branches to the thread_stack
87 * @last_branch: add branch context to 'instruction' events
88 * @add_last_branch: add branch context to existing event records
89 * @approx_ipc: approximate IPC
90 * @flc: whether to synthesize first level cache events
91 * @llc: whether to synthesize last level cache events
92 * @tlb: whether to synthesize TLB events
93 * @remote_access: whether to synthesize remote access events
94 * @mem: whether to synthesize memory events
95 * @timeless_decoding: prefer "timeless" decoding i.e. ignore timestamps
96 * @vm_time_correlation: perform VM Time Correlation
97 * @vm_tm_corr_dry_run: VM Time Correlation dry-run
98 * @vm_tm_corr_args: VM Time Correlation implementation-specific arguments
99 * @callchain_sz: maximum callchain size
100 * @last_branch_sz: branch context size
101 * @period: 'instructions' events period
102 * @period_type: 'instructions' events period type
103 * @initial_skip: skip N events at the beginning.
104 * @cpu_bitmap: CPUs for which to synthesize events, or NULL for all
105 * @ptime_range: time intervals to trace or NULL
106 * @range_num: number of time intervals to trace
107 * @error_plus_flags: flags to affect what errors are reported
108 * @error_minus_flags: flags to affect what errors are reported
109 * @log_plus_flags: flags to affect what is logged
110 * @log_minus_flags: flags to affect what is logged
111 * @quick: quicker (less detailed) decoding
113 struct itrace_synth_opts {
115 bool default_no_sample;
132 bool add_last_branch;
139 bool timeless_decoding;
140 bool vm_time_correlation;
141 bool vm_tm_corr_dry_run;
142 char *vm_tm_corr_args;
143 unsigned int callchain_sz;
144 unsigned int last_branch_sz;
145 unsigned long long period;
146 enum itrace_period_type period_type;
147 unsigned long initial_skip;
148 unsigned long *cpu_bitmap;
149 struct perf_time_interval *ptime_range;
151 unsigned int error_plus_flags;
152 unsigned int error_minus_flags;
153 unsigned int log_plus_flags;
154 unsigned int log_minus_flags;
159 * struct auxtrace_index_entry - indexes a AUX area tracing event within a
161 * @file_offset: offset within the perf.data file
162 * @sz: size of the event
164 struct auxtrace_index_entry {
169 #define PERF_AUXTRACE_INDEX_ENTRY_COUNT 256
172 * struct auxtrace_index - index of AUX area tracing events within a perf.data
174 * @list: linking a number of arrays of entries
175 * @nr: number of entries
176 * @entries: array of entries
178 struct auxtrace_index {
179 struct list_head list;
181 struct auxtrace_index_entry entries[PERF_AUXTRACE_INDEX_ENTRY_COUNT];
185 * struct auxtrace - session callbacks to allow AUX area data decoding.
186 * @process_event: lets the decoder see all session events
187 * @process_auxtrace_event: process a PERF_RECORD_AUXTRACE event
188 * @queue_data: queue an AUX sample or PERF_RECORD_AUXTRACE event for later
190 * @dump_auxtrace_sample: dump AUX area sample data
191 * @flush_events: process any remaining data
192 * @free_events: free resources associated with event processing
193 * @free: free resources associated with the session
196 int (*process_event)(struct perf_session *session,
197 union perf_event *event,
198 struct perf_sample *sample,
199 struct perf_tool *tool);
200 int (*process_auxtrace_event)(struct perf_session *session,
201 union perf_event *event,
202 struct perf_tool *tool);
203 int (*queue_data)(struct perf_session *session,
204 struct perf_sample *sample, union perf_event *event,
206 void (*dump_auxtrace_sample)(struct perf_session *session,
207 struct perf_sample *sample);
208 int (*flush_events)(struct perf_session *session,
209 struct perf_tool *tool);
210 void (*free_events)(struct perf_session *session);
211 void (*free)(struct perf_session *session);
212 bool (*evsel_is_auxtrace)(struct perf_session *session,
213 struct evsel *evsel);
217 * struct auxtrace_buffer - a buffer containing AUX area tracing data.
218 * @list: buffers are queued in a list held by struct auxtrace_queue
219 * @size: size of the buffer in bytes
220 * @pid: in per-thread mode, the pid this buffer is associated with
221 * @tid: in per-thread mode, the tid this buffer is associated with
222 * @cpu: in per-cpu mode, the cpu this buffer is associated with
223 * @data: actual buffer data (can be null if the data has not been loaded)
224 * @data_offset: file offset at which the buffer can be read
225 * @mmap_addr: mmap address at which the buffer can be read
226 * @mmap_size: size of the mmap at @mmap_addr
227 * @data_needs_freeing: @data was malloc'd so free it when it is no longer
229 * @consecutive: the original data was split up and this buffer is consecutive
230 * to the previous buffer
231 * @offset: offset as determined by aux_head / aux_tail members of struct
232 * perf_event_mmap_page
233 * @reference: an implementation-specific reference determined when the data is
235 * @buffer_nr: used to number each buffer
236 * @use_size: implementation actually only uses this number of bytes
237 * @use_data: implementation actually only uses data starting at this address
239 struct auxtrace_buffer {
240 struct list_head list;
249 bool data_needs_freeing;
259 * struct auxtrace_queue - a queue of AUX area tracing data buffers.
260 * @head: head of buffer list
261 * @tid: in per-thread mode, the tid this queue is associated with
262 * @cpu: in per-cpu mode, the cpu this queue is associated with
263 * @set: %true once this queue has been dedicated to a specific thread or cpu
264 * @priv: implementation-specific data
266 struct auxtrace_queue {
267 struct list_head head;
275 * struct auxtrace_queues - an array of AUX area tracing queues.
276 * @queue_array: array of queues
277 * @nr_queues: number of queues
278 * @new_data: set whenever new data is queued
279 * @populated: queues have been fully populated using the auxtrace_index
280 * @next_buffer_nr: used to number each buffer
282 struct auxtrace_queues {
283 struct auxtrace_queue *queue_array;
284 unsigned int nr_queues;
291 * struct auxtrace_heap_item - element of struct auxtrace_heap.
292 * @queue_nr: queue number
293 * @ordinal: value used for sorting (lowest ordinal is top of the heap) expected
296 struct auxtrace_heap_item {
297 unsigned int queue_nr;
302 * struct auxtrace_heap - a heap suitable for sorting AUX area tracing queues.
303 * @heap_array: the heap
304 * @heap_cnt: the number of elements in the heap
305 * @heap_sz: maximum number of elements (grows as needed)
307 struct auxtrace_heap {
308 struct auxtrace_heap_item *heap_array;
309 unsigned int heap_cnt;
310 unsigned int heap_sz;
314 * struct auxtrace_mmap - records an mmap of the auxtrace buffer.
315 * @base: address of mapped area
316 * @userpg: pointer to buffer's perf_event_mmap_page
317 * @mask: %0 if @len is not a power of two, otherwise (@len - %1)
318 * @len: size of mapped area
319 * @prev: previous aux_head
320 * @idx: index of this mmap
321 * @tid: tid for a per-thread mmap (also set if there is only 1 tid on a per-cpu
323 * @cpu: cpu number for a per-cpu mmap otherwise %-1
325 struct auxtrace_mmap {
337 * struct auxtrace_mmap_params - parameters to set up struct auxtrace_mmap.
338 * @mask: %0 if @len is not a power of two, otherwise (@len - %1)
339 * @offset: file offset of mapped area
340 * @len: size of mapped area
341 * @prot: mmap memory protection
342 * @idx: index of this mmap
343 * @tid: tid for a per-thread mmap (also set if there is only 1 tid on a per-cpu
345 * @cpu: cpu number for a per-cpu mmap otherwise %-1
347 struct auxtrace_mmap_params {
358 * struct auxtrace_record - callbacks for recording AUX area data.
359 * @recording_options: validate and process recording options
360 * @info_priv_size: return the size of the private data in auxtrace_info_event
361 * @info_fill: fill-in the private data in auxtrace_info_event
362 * @free: free this auxtrace record structure
363 * @snapshot_start: starting a snapshot
364 * @snapshot_finish: finishing a snapshot
365 * @find_snapshot: find data to snapshot within auxtrace mmap
366 * @parse_snapshot_options: parse snapshot options
367 * @reference: provide a 64-bit reference number for auxtrace_event
368 * @read_finish: called after reading from an auxtrace mmap
369 * @alignment: alignment (if any) for AUX area data
370 * @default_aux_sample_size: default sample size for --aux sample option
371 * @pmu: associated pmu
372 * @evlist: selected events list
374 struct auxtrace_record {
375 int (*recording_options)(struct auxtrace_record *itr,
376 struct evlist *evlist,
377 struct record_opts *opts);
378 size_t (*info_priv_size)(struct auxtrace_record *itr,
379 struct evlist *evlist);
380 int (*info_fill)(struct auxtrace_record *itr,
381 struct perf_session *session,
382 struct perf_record_auxtrace_info *auxtrace_info,
384 void (*free)(struct auxtrace_record *itr);
385 int (*snapshot_start)(struct auxtrace_record *itr);
386 int (*snapshot_finish)(struct auxtrace_record *itr);
387 int (*find_snapshot)(struct auxtrace_record *itr, int idx,
388 struct auxtrace_mmap *mm, unsigned char *data,
389 u64 *head, u64 *old);
390 int (*parse_snapshot_options)(struct auxtrace_record *itr,
391 struct record_opts *opts,
393 u64 (*reference)(struct auxtrace_record *itr);
394 int (*read_finish)(struct auxtrace_record *itr, int idx);
395 unsigned int alignment;
396 unsigned int default_aux_sample_size;
397 struct perf_pmu *pmu;
398 struct evlist *evlist;
402 * struct addr_filter - address filter.
404 * @range: true if it is a range filter
405 * @start: true if action is 'filter' or 'start'
406 * @action: 'filter', 'start' or 'stop' ('tracestop' is accepted but converted
408 * @sym_from: symbol name for the filter address
409 * @sym_to: symbol name that determines the filter size
410 * @sym_from_idx: selects n'th from symbols with the same name (0 means global
411 * and less than 0 means symbol must be unique)
412 * @sym_to_idx: same as @sym_from_idx but for @sym_to
413 * @addr: filter address
414 * @size: filter region size (for range filters)
415 * @filename: DSO file name or NULL for the kernel
416 * @str: allocated string that contains the other string members
419 struct list_head list;
423 const char *sym_from;
429 const char *filename;
434 * struct addr_filters - list of address filters.
435 * @head: list of address filters
436 * @cnt: number of address filters
438 struct addr_filters {
439 struct list_head head;
443 struct auxtrace_cache;
445 #ifdef HAVE_AUXTRACE_SUPPORT
447 u64 compat_auxtrace_mmap__read_head(struct auxtrace_mmap *mm);
448 int compat_auxtrace_mmap__write_tail(struct auxtrace_mmap *mm, u64 tail);
450 static inline u64 auxtrace_mmap__read_head(struct auxtrace_mmap *mm,
451 int kernel_is_64_bit __maybe_unused)
453 struct perf_event_mmap_page *pc = mm->userpg;
456 #if BITS_PER_LONG == 32
457 if (kernel_is_64_bit)
458 return compat_auxtrace_mmap__read_head(mm);
460 head = READ_ONCE(pc->aux_head);
462 /* Ensure all reads are done after we read the head */
467 static inline int auxtrace_mmap__write_tail(struct auxtrace_mmap *mm, u64 tail,
468 int kernel_is_64_bit __maybe_unused)
470 struct perf_event_mmap_page *pc = mm->userpg;
472 #if BITS_PER_LONG == 32
473 if (kernel_is_64_bit)
474 return compat_auxtrace_mmap__write_tail(mm, tail);
476 /* Ensure all reads are done before we write the tail out */
478 WRITE_ONCE(pc->aux_tail, tail);
482 int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
483 struct auxtrace_mmap_params *mp,
484 void *userpg, int fd);
485 void auxtrace_mmap__munmap(struct auxtrace_mmap *mm);
486 void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
487 off_t auxtrace_offset,
488 unsigned int auxtrace_pages,
489 bool auxtrace_overwrite);
490 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
491 struct evlist *evlist, int idx,
494 typedef int (*process_auxtrace_t)(struct perf_tool *tool,
496 union perf_event *event, void *data1,
497 size_t len1, void *data2, size_t len2);
499 int auxtrace_mmap__read(struct mmap *map, struct auxtrace_record *itr,
500 struct perf_tool *tool, process_auxtrace_t fn);
502 int auxtrace_mmap__read_snapshot(struct mmap *map,
503 struct auxtrace_record *itr,
504 struct perf_tool *tool, process_auxtrace_t fn,
505 size_t snapshot_size);
507 int auxtrace_queues__init(struct auxtrace_queues *queues);
508 int auxtrace_queues__add_event(struct auxtrace_queues *queues,
509 struct perf_session *session,
510 union perf_event *event, off_t data_offset,
511 struct auxtrace_buffer **buffer_ptr);
512 struct auxtrace_queue *
513 auxtrace_queues__sample_queue(struct auxtrace_queues *queues,
514 struct perf_sample *sample,
515 struct perf_session *session);
516 int auxtrace_queues__add_sample(struct auxtrace_queues *queues,
517 struct perf_session *session,
518 struct perf_sample *sample, u64 data_offset,
520 void auxtrace_queues__free(struct auxtrace_queues *queues);
521 int auxtrace_queues__process_index(struct auxtrace_queues *queues,
522 struct perf_session *session);
523 int auxtrace_queue_data(struct perf_session *session, bool samples,
525 struct auxtrace_buffer *auxtrace_buffer__next(struct auxtrace_queue *queue,
526 struct auxtrace_buffer *buffer);
527 void *auxtrace_buffer__get_data_rw(struct auxtrace_buffer *buffer, int fd, bool rw);
528 static inline void *auxtrace_buffer__get_data(struct auxtrace_buffer *buffer, int fd)
530 return auxtrace_buffer__get_data_rw(buffer, fd, false);
532 void auxtrace_buffer__put_data(struct auxtrace_buffer *buffer);
533 void auxtrace_buffer__drop_data(struct auxtrace_buffer *buffer);
534 void auxtrace_buffer__free(struct auxtrace_buffer *buffer);
536 int auxtrace_heap__add(struct auxtrace_heap *heap, unsigned int queue_nr,
538 void auxtrace_heap__pop(struct auxtrace_heap *heap);
539 void auxtrace_heap__free(struct auxtrace_heap *heap);
541 struct auxtrace_cache_entry {
542 struct hlist_node hash;
546 struct auxtrace_cache *auxtrace_cache__new(unsigned int bits, size_t entry_size,
547 unsigned int limit_percent);
548 void auxtrace_cache__free(struct auxtrace_cache *auxtrace_cache);
549 void *auxtrace_cache__alloc_entry(struct auxtrace_cache *c);
550 void auxtrace_cache__free_entry(struct auxtrace_cache *c, void *entry);
551 int auxtrace_cache__add(struct auxtrace_cache *c, u32 key,
552 struct auxtrace_cache_entry *entry);
553 void auxtrace_cache__remove(struct auxtrace_cache *c, u32 key);
554 void *auxtrace_cache__lookup(struct auxtrace_cache *c, u32 key);
556 struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
559 int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
560 struct record_opts *opts,
562 int auxtrace_parse_sample_options(struct auxtrace_record *itr,
563 struct evlist *evlist,
564 struct record_opts *opts, const char *str);
565 void auxtrace_regroup_aux_output(struct evlist *evlist);
566 int auxtrace_record__options(struct auxtrace_record *itr,
567 struct evlist *evlist,
568 struct record_opts *opts);
569 size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
570 struct evlist *evlist);
571 int auxtrace_record__info_fill(struct auxtrace_record *itr,
572 struct perf_session *session,
573 struct perf_record_auxtrace_info *auxtrace_info,
575 void auxtrace_record__free(struct auxtrace_record *itr);
576 int auxtrace_record__snapshot_start(struct auxtrace_record *itr);
577 int auxtrace_record__snapshot_finish(struct auxtrace_record *itr, bool on_exit);
578 int auxtrace_record__find_snapshot(struct auxtrace_record *itr, int idx,
579 struct auxtrace_mmap *mm,
580 unsigned char *data, u64 *head, u64 *old);
581 u64 auxtrace_record__reference(struct auxtrace_record *itr);
582 int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx);
584 int auxtrace_index__auxtrace_event(struct list_head *head, union perf_event *event,
586 int auxtrace_index__write(int fd, struct list_head *head);
587 int auxtrace_index__process(int fd, u64 size, struct perf_session *session,
589 void auxtrace_index__free(struct list_head *head);
591 void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type,
592 int code, int cpu, pid_t pid, pid_t tid, u64 ip,
593 const char *msg, u64 timestamp);
595 int perf_event__process_auxtrace_info(struct perf_session *session,
596 union perf_event *event);
597 s64 perf_event__process_auxtrace(struct perf_session *session,
598 union perf_event *event);
599 int perf_event__process_auxtrace_error(struct perf_session *session,
600 union perf_event *event);
601 int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts,
602 const char *str, int unset);
603 int itrace_parse_synth_opts(const struct option *opt, const char *str,
605 void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts,
608 size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp);
609 void perf_session__auxtrace_error_inc(struct perf_session *session,
610 union perf_event *event);
611 void events_stats__auxtrace_error_warn(const struct events_stats *stats);
613 void addr_filters__init(struct addr_filters *filts);
614 void addr_filters__exit(struct addr_filters *filts);
615 int addr_filters__parse_bare_filter(struct addr_filters *filts,
617 int auxtrace_parse_filters(struct evlist *evlist);
619 int auxtrace__process_event(struct perf_session *session, union perf_event *event,
620 struct perf_sample *sample, struct perf_tool *tool);
621 void auxtrace__dump_auxtrace_sample(struct perf_session *session,
622 struct perf_sample *sample);
623 int auxtrace__flush_events(struct perf_session *session, struct perf_tool *tool);
624 void auxtrace__free_events(struct perf_session *session);
625 void auxtrace__free(struct perf_session *session);
626 bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
627 struct evsel *evsel);
629 #define ITRACE_HELP \
630 " i[period]: synthesize instructions events\n" \
631 " b: synthesize branches events (branch misses for Arm SPE)\n" \
632 " c: synthesize branches events (calls only)\n" \
633 " r: synthesize branches events (returns only)\n" \
634 " x: synthesize transactions events\n" \
635 " w: synthesize ptwrite events\n" \
636 " p: synthesize power events\n" \
637 " o: synthesize other events recorded due to the use\n" \
638 " of aux-output (refer to perf record)\n" \
639 " e[flags]: synthesize error events\n" \
640 " each flag must be preceded by + or -\n" \
641 " error flags are: o (overflow)\n" \
643 " d[flags]: create a debug log\n" \
644 " each flag must be preceded by + or -\n" \
645 " log flags are: a (all perf events)\n" \
646 " o (output to stdout)\n" \
647 " f: synthesize first level cache events\n" \
648 " m: synthesize last level cache events\n" \
649 " t: synthesize TLB events\n" \
650 " a: synthesize remote access events\n" \
651 " g[len]: synthesize a call chain (use with i or x)\n" \
652 " G[len]: synthesize a call chain on existing event records\n" \
653 " l[len]: synthesize last branch entries (use with i or x)\n" \
654 " L[len]: synthesize last branch entries on existing event records\n" \
655 " sNUMBER: skip initial number of events\n" \
656 " q: quicker (less detailed) decoding\n" \
657 " A: approximate IPC\n" \
658 " Z: prefer to ignore timestamps (so-called \"timeless\" decoding)\n" \
659 " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \
660 " concatenate multiple options. Default is ibxwpe or cewp\n"
663 void itrace_synth_opts__set_time_range(struct itrace_synth_opts *opts,
664 struct perf_time_interval *ptime_range,
667 opts->ptime_range = ptime_range;
668 opts->range_num = range_num;
672 void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts)
674 opts->ptime_range = NULL;
681 static inline struct auxtrace_record *
682 auxtrace_record__init(struct evlist *evlist __maybe_unused,
690 void auxtrace_record__free(struct auxtrace_record *itr __maybe_unused)
695 int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused,
696 struct evlist *evlist __maybe_unused,
697 struct record_opts *opts __maybe_unused)
703 int perf_event__process_auxtrace_info(struct perf_session *session __maybe_unused,
704 union perf_event *event __maybe_unused)
710 s64 perf_event__process_auxtrace(struct perf_session *session __maybe_unused,
711 union perf_event *event __maybe_unused)
717 int perf_event__process_auxtrace_error(struct perf_session *session __maybe_unused,
718 union perf_event *event __maybe_unused)
724 void perf_session__auxtrace_error_inc(struct perf_session *session
726 union perf_event *event
732 void events_stats__auxtrace_error_warn(const struct events_stats *stats
738 int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts __maybe_unused,
739 const char *str __maybe_unused, int unset __maybe_unused)
741 pr_err("AUX area tracing not supported\n");
746 int itrace_parse_synth_opts(const struct option *opt __maybe_unused,
747 const char *str __maybe_unused,
748 int unset __maybe_unused)
750 pr_err("AUX area tracing not supported\n");
755 int auxtrace_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
756 struct record_opts *opts __maybe_unused,
761 pr_err("AUX area tracing not supported\n");
766 int auxtrace_parse_sample_options(struct auxtrace_record *itr __maybe_unused,
767 struct evlist *evlist __maybe_unused,
768 struct record_opts *opts __maybe_unused,
773 pr_err("AUX area tracing not supported\n");
778 void auxtrace_regroup_aux_output(struct evlist *evlist __maybe_unused)
783 int auxtrace__process_event(struct perf_session *session __maybe_unused,
784 union perf_event *event __maybe_unused,
785 struct perf_sample *sample __maybe_unused,
786 struct perf_tool *tool __maybe_unused)
792 void auxtrace__dump_auxtrace_sample(struct perf_session *session __maybe_unused,
793 struct perf_sample *sample __maybe_unused)
798 int auxtrace__flush_events(struct perf_session *session __maybe_unused,
799 struct perf_tool *tool __maybe_unused)
805 void auxtrace__free_events(struct perf_session *session __maybe_unused)
810 void auxtrace_cache__free(struct auxtrace_cache *auxtrace_cache __maybe_unused)
815 void auxtrace__free(struct perf_session *session __maybe_unused)
820 int auxtrace_index__write(int fd __maybe_unused,
821 struct list_head *head __maybe_unused)
827 int auxtrace_index__process(int fd __maybe_unused,
828 u64 size __maybe_unused,
829 struct perf_session *session __maybe_unused,
830 bool needs_swap __maybe_unused)
836 void auxtrace_index__free(struct list_head *head __maybe_unused)
841 bool auxtrace__evsel_is_auxtrace(struct perf_session *session __maybe_unused,
842 struct evsel *evsel __maybe_unused)
848 int auxtrace_parse_filters(struct evlist *evlist __maybe_unused)
853 int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
854 struct auxtrace_mmap_params *mp,
855 void *userpg, int fd);
856 void auxtrace_mmap__munmap(struct auxtrace_mmap *mm);
857 void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
858 off_t auxtrace_offset,
859 unsigned int auxtrace_pages,
860 bool auxtrace_overwrite);
861 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
862 struct evlist *evlist, int idx,
865 #define ITRACE_HELP ""
868 void itrace_synth_opts__set_time_range(struct itrace_synth_opts *opts
870 struct perf_time_interval *ptime_range
872 int range_num __maybe_unused)
877 void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts