2 #ifndef __PERF_EVLIST_H 3 #define __PERF_EVLIST_H 1 5 #include <linux/compiler.h> 6 #include <linux/kernel.h> 7 #include <linux/refcount.h> 8 #include <linux/list.h> 9 #include <api/fd/array.h> 24 #define PERF_EVLIST__HLIST_BITS 8 25 #define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS) 80 struct perf_event_attr *attrs,
size_t nr_attrs);
82 #define perf_evlist__add_default_attrs(evlist, array) \ 83 __perf_evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array)) 88 const char *sys,
const char *
name,
void *handler);
91 enum perf_event_sample_format bit);
93 enum perf_event_sample_format bit);
95 #define perf_evlist__set_sample_bit(evlist, bit) \ 96 __perf_evlist__set_sample_bit(evlist, PERF_SAMPLE_##bit) 98 #define perf_evlist__reset_sample_bit(evlist, bit) \ 99 __perf_evlist__reset_sample_bit(evlist, PERF_SAMPLE_##bit) 113 int cpu,
int thread, u64
id);
149 const char *argv[],
bool pipe_output,
150 void (*exec_error)(
int signo, siginfo_t *info,
164 unsigned int auxtrace_pages,
165 bool auxtrace_overwrite);
208 struct list_head *list);
212 return list_empty(&evlist->
entries);
239 #define __evlist__for_each_entry(list, evsel) \ 240 list_for_each_entry(evsel, list, node) 247 #define evlist__for_each_entry(evlist, evsel) \ 248 __evlist__for_each_entry(&(evlist)->entries, evsel) 255 #define __evlist__for_each_entry_continue(list, evsel) \ 256 list_for_each_entry_continue(evsel, list, node) 263 #define evlist__for_each_entry_continue(evlist, evsel) \ 264 __evlist__for_each_entry_continue(&(evlist)->entries, evsel) 271 #define __evlist__for_each_entry_reverse(list, evsel) \ 272 list_for_each_entry_reverse(evsel, list, node) 279 #define evlist__for_each_entry_reverse(evlist, evsel) \ 280 __evlist__for_each_entry_reverse(&(evlist)->entries, evsel) 288 #define __evlist__for_each_entry_safe(list, tmp, evsel) \ 289 list_for_each_entry_safe(evsel, tmp, list, node) 297 #define evlist__for_each_entry_safe(evlist, tmp, evsel) \ 298 __evlist__for_each_entry_safe(&(evlist)->entries, tmp, evsel) size_t perf_evlist__mmap_size(unsigned long pages)
bool perf_can_record_switch_events(void)
void perf_evlist__close(struct perf_evlist *evlist)
void __perf_evlist__set_sample_bit(struct perf_evlist *evlist, enum perf_event_sample_format bit)
struct perf_evlist::@110 workload
int perf_evlist__apply_filters(struct perf_evlist *evlist, struct perf_evsel **err_evsel)
u64 perf_evlist__read_format(struct perf_evlist *evlist)
int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, unsigned int auxtrace_pages, bool auxtrace_overwrite)
int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *event, struct perf_sample *sample)
unsigned long perf_event_mlock_kb_in_pages(void)
int __perf_evlist__add_default_attrs(struct perf_evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs)
int perf_evlist__strerror_mmap(struct perf_evlist *evlist, int err, char *buf, size_t size)
int perf_evlist__add_dummy(struct perf_evlist *evlist)
void perf_evlist__force_leader(struct perf_evlist *evlist)
u64 perf_evlist__combined_sample_type(struct perf_evlist *evlist)
void __perf_evlist__reset_sample_bit(struct perf_evlist *evlist, enum perf_event_sample_format bit)
void perf_evlist__set_tracking_event(struct perf_evlist *evlist, struct perf_evsel *tracking_evsel)
int perf_evlist__alloc_pollfd(struct perf_evlist *evlist)
int perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd)
int perf_evlist__poll(struct perf_evlist *evlist, int timeout)
u64 perf_evlist__combined_branch_type(struct perf_evlist *evlist)
struct perf_evsel * perf_evlist__find_evsel_by_str(struct perf_evlist *evlist, const char *str)
struct perf_evlist * perf_evlist__new(void)
int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
int perf_evlist__open(struct perf_evlist *evlist)
void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, struct thread_map *threads)
int perf_evlist__prepare_workload(struct perf_evlist *evlist, struct target *target, const char *argv[], bool pipe_output, void(*exec_error)(int signo, siginfo_t *info, void *ucontext))
int perf_evlist__id_add_fd(struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu, int thread, int fd)
struct thread_map * threads
void __perf_evlist__set_leader(struct list_head *list)
bool perf_evlist__valid_sample_type(struct perf_evlist *evlist)
#define PERF_EVLIST__HLIST_SIZE
void perf_evlist__munmap(struct perf_evlist *evlist)
int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
u64 __perf_evlist__combined_sample_type(struct perf_evlist *evlist)
int record_opts__config(struct record_opts *opts)
u16 perf_evlist__id_hdr_size(struct perf_evlist *evlist)
struct perf_evlist * perf_evlist__new_default(void)
struct perf_mmap * overwrite_mmap
bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str)
struct perf_evsel * perf_evlist__find_tracepoint_by_name(struct perf_evlist *evlist, const char *name)
struct hlist_head heads[PERF_EVLIST__HLIST_SIZE]
void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus, struct thread_map *threads)
bool perf_evlist__valid_sample_id_all(struct perf_evlist *evlist)
void perf_event_attr__set_max_precise_ip(struct perf_event_attr *attr)
void perf_evlist__set_leader(struct perf_evlist *evlist)
void perf_evlist__delete(struct perf_evlist *evlist)
struct perf_evsel * perf_evlist__find_tracepoint_by_id(struct perf_evlist *evlist, int id)
static int entry(u64 ip, struct unwind_info *ui)
void perf_evlist__splice_list_tail(struct perf_evlist *evlist, struct list_head *list)
void perf_evlist__disable(struct perf_evlist *evlist)
bool perf_can_record_cpu_wide(void)
int perf_evlist__filter_pollfd(struct perf_evlist *evlist, short revents_and_mask)
int perf_evlist__add_newtp(struct perf_evlist *evlist, const char *sys, const char *name, void *handler)
static int str(yyscan_t scanner, int token)
int __perf_evlist__add_default(struct perf_evlist *evlist, bool precise)
int __perf_evlist__parse_mmap_pages(unsigned int *mmap_pages, const char *str)
int perf_evlist__enable_event_idx(struct perf_evlist *evlist, struct perf_evsel *evsel, int idx)
int perf_evlist__set_filter(struct perf_evlist *evlist, const char *filter)
void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts, struct callchain_param *callchain)
void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
bool perf_evlist__exclude_kernel(struct perf_evlist *evlist)
void perf_evlist__exit(struct perf_evlist *evlist)
void perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu, int thread, u64 id)
int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str, int unset)
void perf_evlist__remove(struct perf_evlist *evlist, struct perf_evsel *evsel)
void perf_evlist__set_id_pos(struct perf_evlist *evlist)
int perf_evlist__strerror_open(struct perf_evlist *evlist, int err, char *buf, size_t size)
struct strfilter * filter
struct perf_sample_id * perf_evlist__id2sid(struct perf_evlist *evlist, u64 id)
struct perf_evsel * selected
static struct perf_evsel * perf_evlist__first(struct perf_evlist *evlist)
enum bkw_mmap_state bkw_mmap_state
void perf_evlist__enable(struct perf_evlist *evlist)
int perf_evlist__parse_sample_timestamp(struct perf_evlist *evlist, union perf_event *event, u64 *timestamp)
int perf_evlist__set_filter_pids(struct perf_evlist *evlist, size_t npids, pid_t *pids)
int perf_evlist__set_filter_pid(struct perf_evlist *evlist, pid_t pid)
size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp)
struct perf_evsel * perf_evlist__event2evsel(struct perf_evlist *evlist, union perf_event *event)
bool perf_evlist__valid_read_format(struct perf_evlist *evlist)
int perf_evlist__start_workload(struct perf_evlist *evlist)
static struct perf_evsel * perf_evlist__last(struct perf_evlist *evlist)
struct perf_evlist * perf_evlist__new_dummy(void)
static bool perf_evlist__empty(struct perf_evlist *evlist)
void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist, enum bkw_mmap_state state)
static int perf_evlist__add_default(struct perf_evlist *evlist)
struct perf_evsel * perf_evlist__id2evsel_strict(struct perf_evlist *evlist, u64 id)
void perf_evlist__set_selected(struct perf_evlist *evlist, struct perf_evsel *evsel)
void perf_evlist__toggle_enable(struct perf_evlist *evlist)
struct perf_evsel * perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id)
bool perf_evlist__sample_id_all(struct perf_evlist *evlist)
void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry)
void perf_evlist__to_front(struct perf_evlist *evlist, struct perf_evsel *move_evsel)
bool perf_can_sample_identifier(void)