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 <asm/bitsperlong.h>
19 #include <asm/barrier.h>
30 struct perf_record_auxtrace_error;
31 struct perf_record_auxtrace_info;
35 enum auxtrace_error_type {
36 PERF_AUXTRACE_ERROR_ITRACE = 1,
37 PERF_AUXTRACE_ERROR_MAX
40 /* Auxtrace records must have the same alignment as perf event records */
41 #define PERF_AUXTRACE_RECORD_ALIGNMENT 8
44 PERF_AUXTRACE_UNKNOWN,
45 PERF_AUXTRACE_INTEL_PT,
46 PERF_AUXTRACE_INTEL_BTS,
48 PERF_AUXTRACE_ARM_SPE,
49 PERF_AUXTRACE_S390_CPUMSF,
52 enum itrace_period_type {
53 PERF_ITRACE_PERIOD_INSTRUCTIONS,
54 PERF_ITRACE_PERIOD_TICKS,
55 PERF_ITRACE_PERIOD_NANOSECS,
58 #define AUXTRACE_ERR_FLG_OVERFLOW (1 << ('o' - 'a'))
59 #define AUXTRACE_ERR_FLG_DATA_LOST (1 << ('l' - 'a'))
61 #define AUXTRACE_LOG_FLG_ALL_PERF_EVTS (1 << ('a' - 'a'))
64 * struct itrace_synth_opts - AUX area tracing synthesis options.
65 * @set: indicates whether or not options have been set
66 * @default_no_sample: Default to no sampling.
67 * @inject: indicates the event (not just the sample) must be fully synthesized
68 * because 'perf inject' will write it out
69 * @instructions: whether to synthesize 'instructions' events
70 * @branches: whether to synthesize 'branches' events
71 * (branch misses only for Arm SPE)
72 * @transactions: whether to synthesize events for transactions
73 * @ptwrites: whether to synthesize events for ptwrites
74 * @pwr_events: whether to synthesize power events
75 * @other_events: whether to synthesize other events recorded due to the use of
77 * @errors: whether to synthesize decoder error events
78 * @dont_decode: whether to skip decoding entirely
79 * @log: write a decoding log
80 * @calls: limit branch samples to calls (can be combined with @returns)
81 * @returns: limit branch samples to returns (can be combined with @calls)
82 * @callchain: add callchain to 'instructions' events
83 * @add_callchain: add callchain to existing event records
84 * @thread_stack: feed branches to the thread_stack
85 * @last_branch: add branch context to 'instruction' events
86 * @add_last_branch: add branch context to existing event records
87 * @flc: whether to synthesize first level cache events
88 * @llc: whether to synthesize last level cache events
89 * @tlb: whether to synthesize TLB events
90 * @remote_access: whether to synthesize remote access events
91 * @mem: whether to synthesize memory events
92 * @callchain_sz: maximum callchain size
93 * @last_branch_sz: branch context size
94 * @period: 'instructions' events period
95 * @period_type: 'instructions' events period type
96 * @initial_skip: skip N events at the beginning.
97 * @cpu_bitmap: CPUs for which to synthesize events, or NULL for all
98 * @ptime_range: time intervals to trace or NULL
99 * @range_num: number of time intervals to trace
100 * @error_plus_flags: flags to affect what errors are reported
101 * @error_minus_flags: flags to affect what errors are reported
102 * @log_plus_flags: flags to affect what is logged
103 * @log_minus_flags: flags to affect what is logged
104 * @quick: quicker (less detailed) decoding
106 struct itrace_synth_opts {
108 bool default_no_sample;
125 bool add_last_branch;
131 unsigned int callchain_sz;
132 unsigned int last_branch_sz;
133 unsigned long long period;
134 enum itrace_period_type period_type;
135 unsigned long initial_skip;
136 unsigned long *cpu_bitmap;
137 struct perf_time_interval *ptime_range;
139 unsigned int error_plus_flags;
140 unsigned int error_minus_flags;
141 unsigned int log_plus_flags;
142 unsigned int log_minus_flags;
147 * struct auxtrace_index_entry - indexes a AUX area tracing event within a
149 * @file_offset: offset within the perf.data file
150 * @sz: size of the event
152 struct auxtrace_index_entry {
157 #define PERF_AUXTRACE_INDEX_ENTRY_COUNT 256
160 * struct auxtrace_index - index of AUX area tracing events within a perf.data
162 * @list: linking a number of arrays of entries
163 * @nr: number of entries
164 * @entries: array of entries
166 struct auxtrace_index {
167 struct list_head list;
169 struct auxtrace_index_entry entries[PERF_AUXTRACE_INDEX_ENTRY_COUNT];
173 * struct auxtrace - session callbacks to allow AUX area data decoding.
174 * @process_event: lets the decoder see all session events
175 * @process_auxtrace_event: process a PERF_RECORD_AUXTRACE event
176 * @queue_data: queue an AUX sample or PERF_RECORD_AUXTRACE event for later
178 * @dump_auxtrace_sample: dump AUX area sample data
179 * @flush_events: process any remaining data
180 * @free_events: free resources associated with event processing
181 * @free: free resources associated with the session
184 int (*process_event)(struct perf_session *session,
185 union perf_event *event,
186 struct perf_sample *sample,
187 struct perf_tool *tool);
188 int (*process_auxtrace_event)(struct perf_session *session,
189 union perf_event *event,
190 struct perf_tool *tool);
191 int (*queue_data)(struct perf_session *session,
192 struct perf_sample *sample, union perf_event *event,
194 void (*dump_auxtrace_sample)(struct perf_session *session,
195 struct perf_sample *sample);
196 int (*flush_events)(struct perf_session *session,
197 struct perf_tool *tool);
198 void (*free_events)(struct perf_session *session);
199 void (*free)(struct perf_session *session);
200 bool (*evsel_is_auxtrace)(struct perf_session *session,
201 struct evsel *evsel);
205 * struct auxtrace_buffer - a buffer containing AUX area tracing data.
206 * @list: buffers are queued in a list held by struct auxtrace_queue
207 * @size: size of the buffer in bytes
208 * @pid: in per-thread mode, the pid this buffer is associated with
209 * @tid: in per-thread mode, the tid this buffer is associated with
210 * @cpu: in per-cpu mode, the cpu this buffer is associated with
211 * @data: actual buffer data (can be null if the data has not been loaded)
212 * @data_offset: file offset at which the buffer can be read
213 * @mmap_addr: mmap address at which the buffer can be read
214 * @mmap_size: size of the mmap at @mmap_addr
215 * @data_needs_freeing: @data was malloc'd so free it when it is no longer
217 * @consecutive: the original data was split up and this buffer is consecutive
218 * to the previous buffer
219 * @offset: offset as determined by aux_head / aux_tail members of struct
220 * perf_event_mmap_page
221 * @reference: an implementation-specific reference determined when the data is
223 * @buffer_nr: used to number each buffer
224 * @use_size: implementation actually only uses this number of bytes
225 * @use_data: implementation actually only uses data starting at this address
227 struct auxtrace_buffer {
228 struct list_head list;
237 bool data_needs_freeing;
247 * struct auxtrace_queue - a queue of AUX area tracing data buffers.
248 * @head: head of buffer list
249 * @tid: in per-thread mode, the tid this queue is associated with
250 * @cpu: in per-cpu mode, the cpu this queue is associated with
251 * @set: %true once this queue has been dedicated to a specific thread or cpu
252 * @priv: implementation-specific data
254 struct auxtrace_queue {
255 struct list_head head;
263 * struct auxtrace_queues - an array of AUX area tracing queues.
264 * @queue_array: array of queues
265 * @nr_queues: number of queues
266 * @new_data: set whenever new data is queued
267 * @populated: queues have been fully populated using the auxtrace_index
268 * @next_buffer_nr: used to number each buffer
270 struct auxtrace_queues {
271 struct auxtrace_queue *queue_array;
272 unsigned int nr_queues;
279 * struct auxtrace_heap_item - element of struct auxtrace_heap.
280 * @queue_nr: queue number
281 * @ordinal: value used for sorting (lowest ordinal is top of the heap) expected
284 struct auxtrace_heap_item {
285 unsigned int queue_nr;
290 * struct auxtrace_heap - a heap suitable for sorting AUX area tracing queues.
291 * @heap_array: the heap
292 * @heap_cnt: the number of elements in the heap
293 * @heap_sz: maximum number of elements (grows as needed)
295 struct auxtrace_heap {
296 struct auxtrace_heap_item *heap_array;
297 unsigned int heap_cnt;
298 unsigned int heap_sz;
302 * struct auxtrace_mmap - records an mmap of the auxtrace buffer.
303 * @base: address of mapped area
304 * @userpg: pointer to buffer's perf_event_mmap_page
305 * @mask: %0 if @len is not a power of two, otherwise (@len - %1)
306 * @len: size of mapped area
307 * @prev: previous aux_head
308 * @idx: index of this mmap
309 * @tid: tid for a per-thread mmap (also set if there is only 1 tid on a per-cpu
311 * @cpu: cpu number for a per-cpu mmap otherwise %-1
313 struct auxtrace_mmap {
325 * struct auxtrace_mmap_params - parameters to set up struct auxtrace_mmap.
326 * @mask: %0 if @len is not a power of two, otherwise (@len - %1)
327 * @offset: file offset of mapped area
328 * @len: size of mapped area
329 * @prot: mmap memory protection
330 * @idx: index of this mmap
331 * @tid: tid for a per-thread mmap (also set if there is only 1 tid on a per-cpu
333 * @cpu: cpu number for a per-cpu mmap otherwise %-1
335 struct auxtrace_mmap_params {
346 * struct auxtrace_record - callbacks for recording AUX area data.
347 * @recording_options: validate and process recording options
348 * @info_priv_size: return the size of the private data in auxtrace_info_event
349 * @info_fill: fill-in the private data in auxtrace_info_event
350 * @free: free this auxtrace record structure
351 * @snapshot_start: starting a snapshot
352 * @snapshot_finish: finishing a snapshot
353 * @find_snapshot: find data to snapshot within auxtrace mmap
354 * @parse_snapshot_options: parse snapshot options
355 * @reference: provide a 64-bit reference number for auxtrace_event
356 * @read_finish: called after reading from an auxtrace mmap
357 * @alignment: alignment (if any) for AUX area data
358 * @default_aux_sample_size: default sample size for --aux sample option
359 * @pmu: associated pmu
360 * @evlist: selected events list
362 struct auxtrace_record {
363 int (*recording_options)(struct auxtrace_record *itr,
364 struct evlist *evlist,
365 struct record_opts *opts);
366 size_t (*info_priv_size)(struct auxtrace_record *itr,
367 struct evlist *evlist);
368 int (*info_fill)(struct auxtrace_record *itr,
369 struct perf_session *session,
370 struct perf_record_auxtrace_info *auxtrace_info,
372 void (*free)(struct auxtrace_record *itr);
373 int (*snapshot_start)(struct auxtrace_record *itr);
374 int (*snapshot_finish)(struct auxtrace_record *itr);
375 int (*find_snapshot)(struct auxtrace_record *itr, int idx,
376 struct auxtrace_mmap *mm, unsigned char *data,
377 u64 *head, u64 *old);
378 int (*parse_snapshot_options)(struct auxtrace_record *itr,
379 struct record_opts *opts,
381 u64 (*reference)(struct auxtrace_record *itr);
382 int (*read_finish)(struct auxtrace_record *itr, int idx);
383 unsigned int alignment;
384 unsigned int default_aux_sample_size;
385 struct perf_pmu *pmu;
386 struct evlist *evlist;
390 * struct addr_filter - address filter.
392 * @range: true if it is a range filter
393 * @start: true if action is 'filter' or 'start'
394 * @action: 'filter', 'start' or 'stop' ('tracestop' is accepted but converted
396 * @sym_from: symbol name for the filter address
397 * @sym_to: symbol name that determines the filter size
398 * @sym_from_idx: selects n'th from symbols with the same name (0 means global
399 * and less than 0 means symbol must be unique)
400 * @sym_to_idx: same as @sym_from_idx but for @sym_to
401 * @addr: filter address
402 * @size: filter region size (for range filters)
403 * @filename: DSO file name or NULL for the kernel
404 * @str: allocated string that contains the other string members
407 struct list_head list;
411 const char *sym_from;
417 const char *filename;
422 * struct addr_filters - list of address filters.
423 * @head: list of address filters
424 * @cnt: number of address filters
426 struct addr_filters {
427 struct list_head head;
431 struct auxtrace_cache;
433 #ifdef HAVE_AUXTRACE_SUPPORT
436 * In snapshot mode the mmapped page is read-only which makes using
437 * __sync_val_compare_and_swap() problematic. However, snapshot mode expects
438 * the buffer is not updated while the snapshot is made (e.g. Intel PT disables
439 * the event) so there is not a race anyway.
441 static inline u64 auxtrace_mmap__read_snapshot_head(struct auxtrace_mmap *mm)
443 struct perf_event_mmap_page *pc = mm->userpg;
444 u64 head = READ_ONCE(pc->aux_head);
446 /* Ensure all reads are done after we read the head */
451 static inline u64 auxtrace_mmap__read_head(struct auxtrace_mmap *mm)
453 struct perf_event_mmap_page *pc = mm->userpg;
454 #if BITS_PER_LONG == 64 || !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
455 u64 head = READ_ONCE(pc->aux_head);
457 u64 head = __sync_val_compare_and_swap(&pc->aux_head, 0, 0);
460 /* Ensure all reads are done after we read the head */
465 static inline void auxtrace_mmap__write_tail(struct auxtrace_mmap *mm, u64 tail)
467 struct perf_event_mmap_page *pc = mm->userpg;
468 #if BITS_PER_LONG != 64 && defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
472 /* Ensure all reads are done before we write the tail out */
474 #if BITS_PER_LONG == 64 || !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
478 old_tail = __sync_val_compare_and_swap(&pc->aux_tail, 0, 0);
479 } while (!__sync_bool_compare_and_swap(&pc->aux_tail, old_tail, tail));
483 int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
484 struct auxtrace_mmap_params *mp,
485 void *userpg, int fd);
486 void auxtrace_mmap__munmap(struct auxtrace_mmap *mm);
487 void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
488 off_t auxtrace_offset,
489 unsigned int auxtrace_pages,
490 bool auxtrace_overwrite);
491 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
492 struct evlist *evlist, int idx,
495 typedef int (*process_auxtrace_t)(struct perf_tool *tool,
497 union perf_event *event, void *data1,
498 size_t len1, void *data2, size_t len2);
500 int auxtrace_mmap__read(struct mmap *map, struct auxtrace_record *itr,
501 struct perf_tool *tool, process_auxtrace_t fn);
503 int auxtrace_mmap__read_snapshot(struct mmap *map,
504 struct auxtrace_record *itr,
505 struct perf_tool *tool, process_auxtrace_t fn,
506 size_t snapshot_size);
508 int auxtrace_queues__init(struct auxtrace_queues *queues);
509 int auxtrace_queues__add_event(struct auxtrace_queues *queues,
510 struct perf_session *session,
511 union perf_event *event, off_t data_offset,
512 struct auxtrace_buffer **buffer_ptr);
513 struct auxtrace_queue *
514 auxtrace_queues__sample_queue(struct auxtrace_queues *queues,
515 struct perf_sample *sample,
516 struct perf_session *session);
517 int auxtrace_queues__add_sample(struct auxtrace_queues *queues,
518 struct perf_session *session,
519 struct perf_sample *sample, u64 data_offset,
521 void auxtrace_queues__free(struct auxtrace_queues *queues);
522 int auxtrace_queues__process_index(struct auxtrace_queues *queues,
523 struct perf_session *session);
524 int auxtrace_queue_data(struct perf_session *session, bool samples,
526 struct auxtrace_buffer *auxtrace_buffer__next(struct auxtrace_queue *queue,
527 struct auxtrace_buffer *buffer);
528 void *auxtrace_buffer__get_data(struct auxtrace_buffer *buffer, int fd);
529 void auxtrace_buffer__put_data(struct auxtrace_buffer *buffer);
530 void auxtrace_buffer__drop_data(struct auxtrace_buffer *buffer);
531 void auxtrace_buffer__free(struct auxtrace_buffer *buffer);
533 int auxtrace_heap__add(struct auxtrace_heap *heap, unsigned int queue_nr,
535 void auxtrace_heap__pop(struct auxtrace_heap *heap);
536 void auxtrace_heap__free(struct auxtrace_heap *heap);
538 struct auxtrace_cache_entry {
539 struct hlist_node hash;
543 struct auxtrace_cache *auxtrace_cache__new(unsigned int bits, size_t entry_size,
544 unsigned int limit_percent);
545 void auxtrace_cache__free(struct auxtrace_cache *auxtrace_cache);
546 void *auxtrace_cache__alloc_entry(struct auxtrace_cache *c);
547 void auxtrace_cache__free_entry(struct auxtrace_cache *c, void *entry);
548 int auxtrace_cache__add(struct auxtrace_cache *c, u32 key,
549 struct auxtrace_cache_entry *entry);
550 void auxtrace_cache__remove(struct auxtrace_cache *c, u32 key);
551 void *auxtrace_cache__lookup(struct auxtrace_cache *c, u32 key);
553 struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
556 int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
557 struct record_opts *opts,
559 int auxtrace_parse_sample_options(struct auxtrace_record *itr,
560 struct evlist *evlist,
561 struct record_opts *opts, const char *str);
562 void auxtrace_regroup_aux_output(struct evlist *evlist);
563 int auxtrace_record__options(struct auxtrace_record *itr,
564 struct evlist *evlist,
565 struct record_opts *opts);
566 size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
567 struct evlist *evlist);
568 int auxtrace_record__info_fill(struct auxtrace_record *itr,
569 struct perf_session *session,
570 struct perf_record_auxtrace_info *auxtrace_info,
572 void auxtrace_record__free(struct auxtrace_record *itr);
573 int auxtrace_record__snapshot_start(struct auxtrace_record *itr);
574 int auxtrace_record__snapshot_finish(struct auxtrace_record *itr, bool on_exit);
575 int auxtrace_record__find_snapshot(struct auxtrace_record *itr, int idx,
576 struct auxtrace_mmap *mm,
577 unsigned char *data, u64 *head, u64 *old);
578 u64 auxtrace_record__reference(struct auxtrace_record *itr);
579 int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx);
581 int auxtrace_index__auxtrace_event(struct list_head *head, union perf_event *event,
583 int auxtrace_index__write(int fd, struct list_head *head);
584 int auxtrace_index__process(int fd, u64 size, struct perf_session *session,
586 void auxtrace_index__free(struct list_head *head);
588 void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type,
589 int code, int cpu, pid_t pid, pid_t tid, u64 ip,
590 const char *msg, u64 timestamp);
592 int perf_event__process_auxtrace_info(struct perf_session *session,
593 union perf_event *event);
594 s64 perf_event__process_auxtrace(struct perf_session *session,
595 union perf_event *event);
596 int perf_event__process_auxtrace_error(struct perf_session *session,
597 union perf_event *event);
598 int itrace_parse_synth_opts(const struct option *opt, const char *str,
600 void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts,
603 size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp);
604 void perf_session__auxtrace_error_inc(struct perf_session *session,
605 union perf_event *event);
606 void events_stats__auxtrace_error_warn(const struct events_stats *stats);
608 void addr_filters__init(struct addr_filters *filts);
609 void addr_filters__exit(struct addr_filters *filts);
610 int addr_filters__parse_bare_filter(struct addr_filters *filts,
612 int auxtrace_parse_filters(struct evlist *evlist);
614 int auxtrace__process_event(struct perf_session *session, union perf_event *event,
615 struct perf_sample *sample, struct perf_tool *tool);
616 void auxtrace__dump_auxtrace_sample(struct perf_session *session,
617 struct perf_sample *sample);
618 int auxtrace__flush_events(struct perf_session *session, struct perf_tool *tool);
619 void auxtrace__free_events(struct perf_session *session);
620 void auxtrace__free(struct perf_session *session);
621 bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
622 struct evsel *evsel);
624 #define ITRACE_HELP \
625 " i[period]: synthesize instructions events\n" \
626 " b: synthesize branches events (branch misses for Arm SPE)\n" \
627 " c: synthesize branches events (calls only)\n" \
628 " r: synthesize branches events (returns only)\n" \
629 " x: synthesize transactions events\n" \
630 " w: synthesize ptwrite events\n" \
631 " p: synthesize power events\n" \
632 " o: synthesize other events recorded due to the use\n" \
633 " of aux-output (refer to perf record)\n" \
634 " e[flags]: synthesize error events\n" \
635 " each flag must be preceded by + or -\n" \
636 " error flags are: o (overflow)\n" \
638 " d[flags]: create a debug log\n" \
639 " each flag must be preceded by + or -\n" \
640 " log flags are: a (all perf events)\n" \
641 " f: synthesize first level cache events\n" \
642 " m: synthesize last level cache events\n" \
643 " t: synthesize TLB events\n" \
644 " a: synthesize remote access events\n" \
645 " g[len]: synthesize a call chain (use with i or x)\n" \
646 " G[len]: synthesize a call chain on existing event records\n" \
647 " l[len]: synthesize last branch entries (use with i or x)\n" \
648 " L[len]: synthesize last branch entries on existing event records\n" \
649 " sNUMBER: skip initial number of events\n" \
650 " q: quicker (less detailed) decoding\n" \
651 " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \
652 " concatenate multiple options. Default is ibxwpe or cewp\n"
655 void itrace_synth_opts__set_time_range(struct itrace_synth_opts *opts,
656 struct perf_time_interval *ptime_range,
659 opts->ptime_range = ptime_range;
660 opts->range_num = range_num;
664 void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts)
666 opts->ptime_range = NULL;
673 static inline struct auxtrace_record *
674 auxtrace_record__init(struct evlist *evlist __maybe_unused,
682 void auxtrace_record__free(struct auxtrace_record *itr __maybe_unused)
687 int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused,
688 struct evlist *evlist __maybe_unused,
689 struct record_opts *opts __maybe_unused)
694 #define perf_event__process_auxtrace_info 0
695 #define perf_event__process_auxtrace 0
696 #define perf_event__process_auxtrace_error 0
699 void perf_session__auxtrace_error_inc(struct perf_session *session
701 union perf_event *event
707 void events_stats__auxtrace_error_warn(const struct events_stats *stats
713 int itrace_parse_synth_opts(const struct option *opt __maybe_unused,
714 const char *str __maybe_unused,
715 int unset __maybe_unused)
717 pr_err("AUX area tracing not supported\n");
722 int auxtrace_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
723 struct record_opts *opts __maybe_unused,
728 pr_err("AUX area tracing not supported\n");
733 int auxtrace_parse_sample_options(struct auxtrace_record *itr __maybe_unused,
734 struct evlist *evlist __maybe_unused,
735 struct record_opts *opts __maybe_unused,
740 pr_err("AUX area tracing not supported\n");
745 void auxtrace_regroup_aux_output(struct evlist *evlist __maybe_unused)
750 int auxtrace__process_event(struct perf_session *session __maybe_unused,
751 union perf_event *event __maybe_unused,
752 struct perf_sample *sample __maybe_unused,
753 struct perf_tool *tool __maybe_unused)
759 void auxtrace__dump_auxtrace_sample(struct perf_session *session __maybe_unused,
760 struct perf_sample *sample __maybe_unused)
765 int auxtrace__flush_events(struct perf_session *session __maybe_unused,
766 struct perf_tool *tool __maybe_unused)
772 void auxtrace__free_events(struct perf_session *session __maybe_unused)
777 void auxtrace_cache__free(struct auxtrace_cache *auxtrace_cache __maybe_unused)
782 void auxtrace__free(struct perf_session *session __maybe_unused)
787 int auxtrace_index__write(int fd __maybe_unused,
788 struct list_head *head __maybe_unused)
794 int auxtrace_index__process(int fd __maybe_unused,
795 u64 size __maybe_unused,
796 struct perf_session *session __maybe_unused,
797 bool needs_swap __maybe_unused)
803 void auxtrace_index__free(struct list_head *head __maybe_unused)
808 bool auxtrace__evsel_is_auxtrace(struct perf_session *session __maybe_unused,
809 struct evsel *evsel __maybe_unused)
815 int auxtrace_parse_filters(struct evlist *evlist __maybe_unused)
820 int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
821 struct auxtrace_mmap_params *mp,
822 void *userpg, int fd);
823 void auxtrace_mmap__munmap(struct auxtrace_mmap *mm);
824 void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
825 off_t auxtrace_offset,
826 unsigned int auxtrace_pages,
827 bool auxtrace_overwrite);
828 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
829 struct evlist *evlist, int idx,
832 #define ITRACE_HELP ""
835 void itrace_synth_opts__set_time_range(struct itrace_synth_opts *opts
837 struct perf_time_interval *ptime_range
839 int range_num __maybe_unused)
844 void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts