Home
last modified time | relevance | path

Searched refs:evsel (Results 1 – 25 of 200) sorted by relevance

12345678

/linux/tools/perf/util/
H A Devsel.h10 #include <internal/evsel.h>
11 #include <perf/evsel.h>
29 /** struct evsel - event selector
31 * @evlist - evlist this evsel is in, if it is in one.
32 * @core - libperf evsel object
44 struct evsel {
93 * references to other metric (evsel).
95 struct evsel **metric_events;
96 struct evsel *metric_leader;
127 * For reporting purposes, an evsel sampl
59 struct evsel { global() struct
60 coreevsel global() argument
69 sample_sizeevsel global() argument
72 __anon6347bf940108evsel global() argument
111 metric_eventsevsel global() argument
112 metric_leaderevsel global() argument
118 statsevsel global() argument
139 privevsel global() argument
143 side_bandevsel global() argument
149 synth_sample_typeevsel global() argument
161 br_cntr_idxevsel global() argument
162 br_cntr_nrevsel global() argument
163 abbr_nameevsel global() argument
170 bpf_counter_opsevsel global() argument
172 bpf_counter_listevsel global() argument
173 bpf_filtersevsel global() argument
176 bperf_leader_prog_fdevsel global() argument
177 bperf_leader_link_fdevsel global() argument
178 __anon6347bf94030aevsel global() argument
183 open_flagsevsel global() argument
184 precise_ip_originalevsel global() argument
187 pmuevsel global() argument
191 __anon6347bf94040aevsel global() argument
201 pid_statevsel global() argument
232 evsel__cpus(struct evsel * evsel) evsel__cpus() argument
237 evsel__nr_cpus(struct evsel * evsel) evsel__nr_cpus() argument
297 evsel__is_bpf(struct evsel * evsel) evsel__is_bpf() argument
302 evsel__is_bperf(struct evsel * evsel) evsel__is_bperf() argument
323 evsel__is_tool(const struct evsel * evsel) evsel__is_tool() argument
328 evsel__is_retire_lat(const struct evsel * evsel) evsel__is_retire_lat() argument
333 evsel__tool_event(const struct evsel * evsel) evsel__tool_event() argument
344 evsel__set_sample_bit(evsel,bit) global() argument
347 evsel__reset_sample_bit(evsel,bit) global() argument
383 evsel__strval(struct evsel * evsel,struct perf_sample * sample,const char * name) evsel__strval() argument
396 __evsel__match(const struct evsel * evsel,u32 type,u64 config) __evsel__match() argument
408 evsel__match(evsel,t,c) global() argument
427 evsel__read_on_cpu(struct evsel * evsel,int cpu_map_idx,int thread) evsel__read_on_cpu() argument
439 evsel__read_on_cpu_scaled(struct evsel * evsel,int cpu_map_idx,int thread) evsel__read_on_cpu_scaled() argument
452 evsel__next(struct evsel * evsel) evsel__next() argument
457 evsel__prev(struct evsel * evsel) evsel__prev() argument
469 evsel__is_group_leader(const struct evsel * evsel) evsel__is_group_leader() argument
482 evsel__is_group_event(struct evsel * evsel) evsel__is_group_event() argument
492 evsel__is_bpf_output(struct evsel * evsel) evsel__is_bpf_output() argument
497 evsel__is_clock(const struct evsel * evsel) evsel__is_clock() argument
508 evsel__group_idx(struct evsel * evsel) evsel__group_idx() argument
533 evsel__has_branch_callstack(const struct evsel * evsel) evsel__has_branch_callstack() argument
538 evsel__has_branch_hw_idx(const struct evsel * evsel) evsel__has_branch_hw_idx() argument
543 evsel__has_callchain(const struct evsel * evsel) evsel__has_callchain() argument
553 evsel__has_br_stack(const struct evsel * evsel) evsel__has_br_stack() argument
563 evsel__is_dummy_event(struct evsel * evsel) evsel__is_dummy_event() argument
[all...]
H A Devsel.c81 static int evsel__no_extra_init(struct evsel *evsel __maybe_unused) in evsel__no_extra_init()
204 static void evsel__no_extra_fini(struct evsel *evsel __maybe_unused) in evsel__no_extra_fini()
210 int (*init)(struct evsel *evsel);
211 void (*fini)(struct evsel *evsel);
213 .size = sizeof(struct evsel),
218 int evsel__object_config(size_t object_size, int (*init)(struct evsel *evsel), in evsel__object_config() argument
219 void (*fini)(struct evsel *evsel)) in evsel__object_config() argument
318 void evsel__calc_id_pos(struct evsel *evsel) in evsel__calc_id_pos() argument
320 evsel->id_pos = __perf_evsel__calc_id_pos(evsel->core.attr.sample_type); in evsel__calc_id_pos()
321 evsel->is_pos = __perf_evsel__calc_is_pos(evsel->core.attr.sample_type); in evsel__calc_id_pos()
[all …]
H A Dstat.c15 #include "evsel.h"
80 static void evsel__reset_aggr_stats(struct evsel *evsel) in evsel__reset_aggr_stats() argument
82 struct perf_stat_evsel *ps = evsel->stats; in evsel__reset_aggr_stats()
89 static void evsel__reset_stat_priv(struct evsel *evsel) in evsel__reset_stat_priv() argument
91 struct perf_stat_evsel *ps = evsel->stats; in evsel__reset_stat_priv()
94 evsel__reset_aggr_stats(evsel); in evsel__reset_stat_priv()
97 static int evsel__alloc_aggr_stats(struct evsel *evsel, in argument
114 struct evsel *evsel; evlist__alloc_aggr_stats() local
123 evsel__alloc_stat_priv(struct evsel * evsel,int nr_aggr) evsel__alloc_stat_priv() argument
143 evsel__free_stat_priv(struct evsel * evsel) evsel__free_stat_priv() argument
154 evsel__alloc_prev_raw_counts(struct evsel * evsel) evsel__alloc_prev_raw_counts() argument
167 evsel__free_prev_raw_counts(struct evsel * evsel) evsel__free_prev_raw_counts() argument
173 evsel__reset_prev_raw_counts(struct evsel * evsel) evsel__reset_prev_raw_counts() argument
179 evsel__alloc_stats(struct evsel * evsel,int nr_aggr,bool alloc_raw) evsel__alloc_stats() argument
192 struct evsel *evsel; evlist__alloc_stats() local
212 struct evsel *evsel; evlist__free_stats() local
223 struct evsel *evsel; evlist__reset_stats() local
233 struct evsel *evsel; evlist__reset_aggr_stats() local
241 struct evsel *evsel; evlist__reset_prev_raw_counts() local
247 evsel__copy_prev_raw_counts(struct evsel * evsel) evsel__copy_prev_raw_counts() argument
261 struct evsel *evsel; evlist__copy_prev_raw_counts() local
267 evsel__copy_res_stats(struct evsel * evsel) evsel__copy_res_stats() argument
280 struct evsel *evsel; evlist__copy_res_stats() local
366 evsel__count_has_error(struct evsel * evsel,struct perf_counts_values * count,struct perf_stat_config * config) evsel__count_has_error() argument
386 process_counter_values(struct perf_stat_config * config,struct evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) process_counter_values() argument
511 evsel__merge_aggr_counters(struct evsel * evsel,struct evsel * alias) evsel__merge_aggr_counters() argument
559 evsel__merge_aliases(struct evsel * evsel) evsel__merge_aliases() argument
574 evsel__should_merge_hybrid(const struct evsel * evsel,const struct perf_stat_config * config) evsel__should_merge_hybrid() argument
580 evsel__merge_stats(struct evsel * evsel,struct perf_stat_config * config) evsel__merge_stats() argument
593 struct evsel *evsel; perf_stat_merge_counters() local
602 evsel__update_percore_stats(struct evsel * evsel,struct aggr_cpu_id * core_id) evsel__update_percore_stats() argument
640 evsel__process_percore(struct evsel * evsel) evsel__process_percore() argument
664 struct evsel *evsel; perf_stat_process_percore() local
745 create_perf_stat_counter(struct evsel * evsel,struct perf_stat_config * config,struct target * target,int cpu_map_idx) create_perf_stat_counter() argument
[all...]
H A Dbpf_counter.c19 #include "evsel.h"
48 static int bpf_program_profiler__destroy(struct evsel *evsel) in bpf_program_profiler__destroy() argument
53 &evsel->bpf_counter_list, list) { in bpf_program_profiler__destroy()
58 assert(list_empty(&evsel->bpf_counter_list)); in bpf_program_profiler__destroy()
102 static int bpf_program_profiler_load_one(struct evsel *evsel, u32 prog_id) in bpf_program_profiler_load_one() argument
128 skel->rodata->num_cpu = evsel__nr_cpus(evsel); in bpf_program_profiler_load_one()
130 bpf_map__set_max_entries(skel->maps.events, evsel__nr_cpus(evsel)); in bpf_program_profiler_load_one()
157 list_add(&counter->list, &evsel in bpf_program_profiler_load_one()
169 bpf_program_profiler__load(struct evsel * evsel,struct target * target) bpf_program_profiler__load() argument
201 bpf_program_profiler__enable(struct evsel * evsel) bpf_program_profiler__enable() argument
217 bpf_program_profiler__disable(struct evsel * evsel) bpf_program_profiler__disable() argument
228 bpf_program_profiler__read(struct evsel * evsel) bpf_program_profiler__read() argument
276 bpf_program_profiler__install_pe(struct evsel * evsel,int cpu_map_idx,int fd) bpf_program_profiler__install_pe() argument
365 bperf_check_target(struct evsel * evsel,struct target * target,enum bperf_filter_type * filter_type,__u32 * filter_entry_cnt) bperf_check_target() argument
398 bperf_reload_leader_program(struct evsel * evsel,int attr_map_fd,struct perf_event_attr_map_entry * entry) bperf_reload_leader_program() argument
447 bperf__load(struct evsel * evsel,struct target * target) bperf__load() argument
577 bperf__install_pe(struct evsel * evsel,int cpu_map_idx,int fd) bperf__install_pe() argument
589 bperf_sync_counters(struct evsel * evsel) bperf_sync_counters() argument
601 bperf__enable(struct evsel * evsel) bperf__enable() argument
607 bperf__disable(struct evsel * evsel) bperf__disable() argument
613 bperf__read(struct evsel * evsel) bperf__read() argument
673 bperf__destroy(struct evsel * evsel) bperf__destroy() argument
767 bpf_counter_skip(struct evsel * evsel) bpf_counter_skip() argument
772 bpf_counter__install_pe(struct evsel * evsel,int cpu_map_idx,int fd) bpf_counter__install_pe() argument
779 bpf_counter__load(struct evsel * evsel,struct target * target) bpf_counter__load() argument
794 bpf_counter__enable(struct evsel * evsel) bpf_counter__enable() argument
801 bpf_counter__disable(struct evsel * evsel) bpf_counter__disable() argument
808 bpf_counter__read(struct evsel * evsel) bpf_counter__read() argument
815 bpf_counter__destroy(struct evsel * evsel) bpf_counter__destroy() argument
[all...]
H A Dstat-shadow.c4 #include "evsel.h"
56 static int evsel_context(const struct evsel *evsel) in evsel_context()
60 if (evsel->core.attr.exclude_kernel) in evsel_context()
62 if (evsel->core.attr.exclude_user) in evsel_context()
64 if (evsel->core.attr.exclude_hv) in evsel_context()
66 if (evsel->core.attr.exclude_host) in evsel_context()
68 if (evsel->core.attr.exclude_idle) in evsel_context()
80 static enum stat_type evsel__stat_type(struct evsel *evsel) in evsel__stat_type()
55 evsel_context(const struct evsel * evsel) evsel_context() argument
79 evsel__stat_type(const struct evsel * evsel) evsel__stat_type() argument
153 find_stat(const struct evsel * evsel,int aggr_idx,enum stat_type type) find_stat() argument
195 print_ratio(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double numerator,struct perf_stat_output_ctx * out,enum stat_type denominator_type,const double color_ratios[3],const char * unit) print_ratio() argument
212 print_stalled_cycles_front(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double stalled,struct perf_stat_output_ctx * out) print_stalled_cycles_front() argument
223 print_stalled_cycles_back(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double stalled,struct perf_stat_output_ctx * out) print_stalled_cycles_back() argument
234 print_branch_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_branch_miss() argument
245 print_l1d_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_l1d_miss() argument
256 print_l1i_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_l1i_miss() argument
267 print_ll_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_ll_miss() argument
278 print_dtlb_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_dtlb_miss() argument
289 print_itlb_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_itlb_miss() argument
300 print_cache_miss(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double misses,struct perf_stat_output_ctx * out) print_cache_miss() argument
311 print_instructions(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double instructions,struct perf_stat_output_ctx * out) print_instructions() argument
335 print_cycles(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx,double cycles,struct perf_stat_output_ctx * out) print_cycles() argument
350 print_nsecs(struct perf_stat_config * config,const struct evsel * evsel,int aggr_idx __maybe_unused,double nsecs,struct perf_stat_output_ctx * out) print_nsecs() argument
366 prepare_metric(const struct metric_expr * mexp,const struct evsel * evsel,struct expr_parse_ctx * pctx,int aggr_idx) prepare_metric() argument
471 generic_metric(struct perf_stat_config * config,struct metric_expr * mexp,struct evsel * evsel,int aggr_idx,struct perf_stat_output_ctx * out) generic_metric() argument
569 perf_stat__print_metricgroup_header(struct perf_stat_config * config,struct evsel * evsel,void * ctxp,const char * name,struct perf_stat_output_ctx * out) perf_stat__print_metricgroup_header() argument
616 perf_stat__print_shadow_stats_metricgroup(struct perf_stat_config * config,struct evsel * evsel,int aggr_idx,int * num,void * from,struct perf_stat_output_ctx * out,struct rblist * metric_events) perf_stat__print_shadow_stats_metricgroup() argument
666 perf_stat__print_shadow_stats(struct perf_stat_config * config,struct evsel * evsel,double avg,int aggr_idx,struct perf_stat_output_ctx * out,struct rblist * metric_events) perf_stat__print_shadow_stats() argument
728 perf_stat__skip_metric_event(struct evsel * evsel,struct rblist * metric_events,u64 ena,u64 run) perf_stat__skip_metric_event() argument
[all...]
H A Dbpf_counter.h14 struct evsel;
18 typedef int (*bpf_counter_evsel_op)(struct evsel *evsel);
19 typedef int (*bpf_counter_evsel_target_op)(struct evsel *evsel,
21 typedef int (*bpf_counter_evsel_install_pe_op)(struct evsel *evsel,
41 int bpf_counter__load(struct evsel *evsel, struct target *target);
42 int bpf_counter__enable(struct evsel *evsel);
43 int bpf_counter__disable(struct evsel *evsel);
44 int bpf_counter__read(struct evsel *evsel);
45 void bpf_counter__destroy(struct evsel *evsel);
46 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd);
[all …]
H A Dbpf_counter_cgroup.c39 static struct evsel *cgrp_switch;
47 struct evsel *evsel; in bperf_load_program() local
112 evlist__for_each_entry(evlist, evsel) { in bperf_load_program()
113 if (cgrp == NULL || evsel->cgrp == leader_cgrp) { in bperf_load_program()
114 leader_cgrp = evsel->cgrp; in bperf_load_program()
115 evsel->cgrp = NULL; in bperf_load_program()
118 err = evsel__open_per_cpu(evsel, evsel->core.cpus, -1); in bperf_load_program()
120 evsel->supported = true; in bperf_load_program()
123 perf_cpu_map__for_each_cpu(cpu, j, evsel->core.cpus) { in bperf_load_program()
124 int fd = FD(evsel, j); in bperf_load_program()
[all …]
H A Devlist.c17 #include "evsel.h"
61 #include <perf/evsel.h>
114 struct evsel *evsel; in evlist__new_default()
116 evlist__for_each_entry(evlist, evsel) in evlist__new_default()
117 evsel__set_sample_id(evsel, /*can_sample_identifier=*/false); in evlist__new_default()
144 struct evsel *first = evlist__first(evlist); in evlist__set_id_pos()
152 struct evsel *evsel; in evlist__update_id_pos()
154 evlist__for_each_entry(evlist, evsel) in evlist__update_id_pos()
113 struct evsel *evsel; evlist__new_default() local
151 struct evsel *evsel; evlist__update_id_pos() local
204 evlist__remove(struct evlist * evlist,struct evsel * evsel) evlist__remove() argument
213 struct evsel *evsel, *temp, *leader = NULL; evlist__splice_list_tail() local
239 struct evsel *evsel = evlist__find_tracepoint_by_name(evlist, assocs[i].name); __evlist__set_tracepoints_handlers() local
275 struct evsel *evsel = evlist__dummy_event(evlist); evlist__add_dummy() local
286 struct evsel *evsel = evlist__dummy_event(evlist); evlist__add_aux_dummy() local
305 struct evsel *evsel = evsel__newtp_idx("sched", "sched_switch", 0, evlist__add_sched_switch() local
324 struct evsel *evsel, *n; evlist__add_attrs() local
367 struct evsel *evsel; evlist__find_tracepoint_by_id() local
380 struct evsel *evsel; evlist__find_tracepoint_by_name() local
394 struct evsel *evsel = evsel__newtp(sys, name); evlist__add_newtp() local
843 struct evsel *evsel = container_of(_evsel, struct evsel, core); perf_evlist__mmap_cb_idx() local
1096 struct evsel *evsel; evlist__apply_filters() local
1129 struct evsel *evsel; evlist__set_tp_filter() local
1149 struct evsel *evsel; evlist__append_tp_filter() local
1242 struct evsel *evsel; __evlist__combined_sample_type() local
1261 struct evsel *evsel; evlist__combined_branch_type() local
1317 struct evsel *evsel, *dup; evlist__update_br_cntr() local
1382 evlist__set_selected(struct evlist * evlist,struct evsel * evsel) evlist__set_selected() argument
1389 struct evsel *evsel; evlist__close() local
1453 struct evsel *evsel; evlist__open() local
1622 struct evsel *evsel = evlist__event2evsel(evlist, event); evlist__parse_sample() local
1643 struct evsel *evsel = evlist__event2evsel(evlist, event); evlist__parse_sample_timestamp() local
1736 struct evsel *evsel, *n; evlist__to_front() local
1752 struct evsel *evsel; evlist__get_tracking_event() local
1764 struct evsel *evsel; evlist__set_tracking_event() local
1779 struct evsel *evsel; evlist__findnew_tracking_event() local
1797 struct evsel *evsel; evlist__find_evsel_by_str() local
1868 struct evsel *evsel; evlist__exclude_kernel() local
1893 evlist__reset_weak_group(struct evlist * evsel_list,struct evsel * evsel,bool close) evlist__reset_weak_group() argument
2158 struct evsel *evsel; evlist__ctlfd_enable() local
2199 struct evsel *evsel; evlist__ctlfd_list() local
2509 struct evsel *evsel; evlist__find_evsel() local
2520 struct evsel *evsel; evlist__scnprintf_evsels() local
2539 struct evsel *leader, *evsel, *pos; evlist__check_mem_load_aux() local
2633 struct evsel *evsel; evlist__has_bpf_output() local
[all...]
H A Drecord.c4 #include "evsel.h"
26 static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) in evsel__read_sampler() argument
28 struct evsel *leader = evsel__leader(evsel); in evsel__read_sampler()
32 evlist__for_each_entry(evlist, evsel) { in evsel__read_sampler()
33 if (evsel__leader(evsel) == leader && evsel != evsel__leader(evsel)) in evsel__read_sampler()
41 evsel__config_term_mask(struct evsel * evsel) evsel__config_term_mask() argument
53 evsel__config_leader_sampling(struct evsel * evsel,struct evlist * evlist) evsel__config_leader_sampling() argument
97 struct evsel *evsel; evlist__config() local
224 struct evsel *evsel; evlist__can_select_event() local
[all...]
H A Devlist.h11 #include <internal/evsel.h>
14 #include "evsel.h"
69 struct evsel *selected;
102 void evlist__add(struct evlist *evlist, struct evsel *entry);
103 void evlist__remove(struct evlist *evlist, struct evsel *evsel);
105 int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs);
108 struct evsel *evlist__add_aux_dummy(struct evlist *evlist, bool system_wide);
109 static inline struct evsel *evlist__add_dummy_on_all_cpu
243 struct perf_evsel *evsel = perf_evlist__first(&evlist->core); evlist__first() local
250 struct perf_evsel *evsel = perf_evlist__last(&evlist->core); evlist__last() local
271 __evlist__for_each_entry(list,evsel) global() argument
279 evlist__for_each_entry(evlist,evsel) global() argument
287 __evlist__for_each_entry_continue(list,evsel) global() argument
295 evlist__for_each_entry_continue(evlist,evsel) global() argument
303 __evlist__for_each_entry_from(list,evsel) global() argument
311 evlist__for_each_entry_from(evlist,evsel) global() argument
319 __evlist__for_each_entry_reverse(list,evsel) global() argument
327 evlist__for_each_entry_reverse(evlist,evsel) global() argument
336 __evlist__for_each_entry_safe(list,tmp,evsel) global() argument
345 evlist__for_each_entry_safe(evlist,tmp,evsel) global() argument
353 struct evsel *evsel; global() member
[all...]
H A Dperf_api_probe.c12 typedef void (*setup_probe_fn_t)(struct evsel *evsel);
17 struct evsel *evsel; in perf_do_probe_api() local
29 evsel = evlist__first(evlist); in perf_do_probe_api()
32 fd = sys_perf_event_open(&evsel->core.attr, pid, cpu.cpu, -1, flags); in perf_do_probe_api()
44 fn(evsel); in perf_do_probe_api()
46 fd = sys_perf_event_open(&evsel->core.attr, pid, cpu.cpu, -1, flags); in perf_do_probe_api()
82 static void perf_probe_sample_identifier(struct evsel *evsel) in perf_probe_sample_identifier() argument
84 evsel->core.attr.sample_type |= PERF_SAMPLE_IDENTIFIER; in perf_probe_sample_identifier()
87 static void perf_probe_comm_exec(struct evsel *evsel) in perf_probe_comm_exec() argument
89 evsel->core.attr.comm_exec = 1; in perf_probe_comm_exec()
[all …]
H A Dsideband_evlist.c18 struct evsel *evsel; in evlist__add_sb_event() local
25 evsel = evsel__new_idx(attr, evlist->core.nr_entries); in evlist__add_sb_event()
26 if (!evsel) in evlist__add_sb_event()
29 evsel->side_band.cb = cb; in evlist__add_sb_event()
30 evsel->side_band.data = data; in evlist__add_sb_event()
31 evlist__add(evlist, evsel); in evlist__add_sb_event()
65 struct evsel *evsel = evlist__event2evsel(evlist, event); in perf_evlist__poll_thread() local
67 if (evsel && evsel->side_band.cb) in perf_evlist__poll_thread()
68 evsel->side_band.cb(event, evsel->side_band.data); in perf_evlist__poll_thread()
86 struct evsel *evsel; in evlist__set_cb() local
[all …]
/linux/tools/perf/tests/
H A Dparse-events.c3 #include "evsel.h"
37 static bool test_config(const struct evsel *evsel, __u64 expected_config) in test_config() argument
39 __u32 type = evsel->core.attr.type; in test_config()
40 __u64 config = evsel->core.attr.config; in test_config()
52 static bool test_perf_config(const struct perf_evsel *evsel, __u64 expected_config) in test_perf_config() argument
54 return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_perf_config()
87 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint() local
91 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel in test__checkevent_tracepoint()
100 struct evsel *evsel; test__checkevent_tracepoint_multi() local
119 struct perf_evsel *evsel; test__checkevent_raw() local
157 struct evsel *evsel = evlist__first(evlist); test__checkevent_numeric() local
166 assert_hw(struct perf_evsel * evsel,enum perf_hw_id id,const char * name) assert_hw() argument
183 struct perf_evsel *evsel; test__checkevent_symbolic_name() local
199 struct perf_evsel *evsel; test__checkevent_symbolic_name_config() local
221 struct evsel *evsel = evlist__first(evlist); test__checkevent_symbolic_alias() local
231 struct perf_evsel *evsel; test__checkevent_genhw() local
244 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint() local
258 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_x() local
271 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_r() local
286 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_w() local
301 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_rw() local
317 struct evsel *evsel = evlist__first(evlist); test__checkevent_tracepoint_modifier() local
330 struct perf_evsel *evsel; test__checkevent_tracepoint_multi_modifier() local
347 struct perf_evsel *evsel; test__checkevent_raw_modifier() local
360 struct perf_evsel *evsel; test__checkevent_numeric_modifier() local
373 struct perf_evsel *evsel; test__checkevent_symbolic_name_modifier() local
389 struct perf_evsel *evsel; test__checkevent_exclude_host_modifier() local
400 struct perf_evsel *evsel; test__checkevent_exclude_guest_modifier() local
411 struct evsel *evsel = evlist__first(evlist); test__checkevent_symbolic_alias_modifier() local
423 struct perf_evsel *evsel; test__checkevent_genhw_modifier() local
436 struct evsel *evsel = evlist__first(evlist); test__checkevent_exclude_idle_modifier() local
451 struct evsel *evsel = evlist__first(evlist); test__checkevent_exclude_idle_modifier_1() local
466 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_modifier() local
480 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_x_modifier() local
493 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_r_modifier() local
506 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_w_modifier() local
519 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_rw_modifier() local
532 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_modifier_name() local
545 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_x_modifier_name() local
558 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_r_modifier_name() local
571 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_w_modifier_name() local
584 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_rw_modifier_name() local
597 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_2_events() local
615 struct evsel *evsel = evlist__first(evlist); test__checkevent_pmu() local
635 struct evsel *evsel = evlist__first(evlist); test__checkevent_list() local
678 struct evsel *evsel = evlist__first(evlist); test__checkevent_pmu_name() local
698 struct evsel *evsel = evlist__first(evlist); test__checkevent_pmu_partial_time_callgraph() local
729 struct evsel *evsel = evlist__first(evlist); test__checkevent_pmu_events() local
749 struct evsel *evsel = NULL; test__checkevent_pmu_events_mix() local
865 struct evsel *evsel, *leader; test__group1() local
914 struct evsel *evsel, *leader = NULL; test__group2() local
978 struct evsel *evsel, *group1_leader = NULL, *group2_leader = NULL; test__group3() local
1087 struct evsel *evsel, *leader; test__group4() local
1138 struct evsel *evsel = NULL, *leader; test__group5() local
1235 struct evsel *evsel = NULL, *leader; test__group_gh1() local
1282 struct evsel *evsel = NULL, *leader; test__group_gh2() local
1329 struct evsel *evsel = NULL, *leader; test__group_gh3() local
1376 struct evsel *evsel = NULL, *leader; test__group_gh4() local
1423 struct evsel *evsel = NULL, *leader; test__leader_sample1() local
1483 struct evsel *evsel = NULL, *leader; test__leader_sample2() local
1528 struct evsel *evsel = NULL; test__checkevent_pinned_modifier() local
1546 struct evsel *evsel = NULL, *leader; test__pinned_group() local
1587 struct evsel *evsel = evlist__first(evlist); test__checkevent_exclusive_modifier() local
1600 struct evsel *evsel = NULL, *leader; test__exclusive_group() local
1640 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_len() local
1655 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_len_w() local
1671 struct evsel *evsel = evlist__first(evlist); test__checkevent_breakpoint_len_rw_modifier() local
1683 struct evsel *evsel = evlist__first(evlist); test__checkevent_precise_max_modifier() local
1694 struct evsel *evsel = evlist__first(evlist); test__checkevent_config_symbol() local
1702 struct evsel *evsel = evlist__first(evlist); test__checkevent_config_raw() local
1710 struct evsel *evsel = evlist__first(evlist); test__checkevent_config_num() local
1718 struct evsel *evsel = evlist__first(evlist); test__checkevent_config_cache() local
1746 struct evsel *evsel = evlist__first(evlist); test__intel_pt() local
1754 struct evsel *evsel = evlist__first(evlist); test__checkevent_complex_name() local
1764 struct evsel *evsel = evlist__first(evlist); test__checkevent_raw_pmu() local
1774 struct evsel *evsel = evlist__first(evlist); test__sym_event_slash() local
1786 struct evsel *evsel = evlist__first(evlist); test__sym_event_dc() local
1798 struct evsel *evsel = evlist__first(evlist); test__term_equal_term() local
1810 struct evsel *evsel = evlist__first(evlist); test__term_equal_legacy() local
[all...]
H A Devsel-tp-sched.c4 #include "evsel.h"
8 static int evsel__test_field(struct evsel *evsel, const char *name, int size, bool should_be_signed) in evsel__test_field() argument
10 struct tep_format_field *field = evsel__field(evsel, name); in evsel__test_field()
15 pr_debug("%s: \"%s\" field not found!\n", evsel->name, name); in evsel__test_field()
22 evsel->name, name, is_signed, should_be_signed); in evsel__test_field()
28 evsel->name, name, field->size, size); in evsel__test_field()
38 struct evsel *evsel = evsel__newtp("sched", "sched_switch"); in test__perf_evsel__tp_sched_test() local
41 if (IS_ERR(evsel)) { in test__perf_evsel__tp_sched_test()
[all...]
H A Devent-times.c11 #include "evsel.h"
19 struct evsel *evsel = evlist__last(evlist); in attach__enable_on_exec() local
41 evsel->core.attr.enable_on_exec = 1; in attach__enable_on_exec()
61 struct evsel *evsel = evlist__last(evlist); in attach__current_disabled() local
73 evsel->core.attr.disabled = 1; in attach__current_disabled()
75 err = evsel__open_per_thread(evsel, threads); in attach__current_disabled()
82 return evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL; in attach__current_disabled()
87 struct evsel *evse in attach__current_enabled() local
107 struct evsel *evsel = evlist__last(evlist); detach__disable() local
114 struct evsel *evsel = evlist__last(evlist); attach__cpu_disabled() local
143 struct evsel *evsel = evlist__last(evlist); attach__cpu_enabled() local
168 struct evsel *evsel; test_times() local
[all...]
/linux/tools/perf/arch/x86/tests/
H A Dhybrid.c10 static bool test_config(const struct evsel *evsel, __u64 expected_config) in test_config() argument
12 return (evsel->core.attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_config()
15 static bool test_perf_config(const struct perf_evsel *evsel, __u64 expected_config) in test_perf_config() argument
17 return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_perf_config()
20 static bool test_hybrid_type(const struct evsel *evsel, __u64 expected_config) in test_hybrid_type() argument
22 return (evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT) == expected_config; in test_hybrid_type()
27 struct evsel *evsel = evlist__first(evlist); in test__hybrid_hw_event_with_pmu() local
30 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_event_with_pmu()
31 TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW)); in test__hybrid_hw_event_with_pmu()
32 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__hybrid_hw_event_with_pmu()
[all …]
/linux/tools/lib/perf/
H A Devsel.c5 #include <perf/evsel.h>
10 #include <internal/evsel.h>
23 void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr, in perf_evsel__init()
26 INIT_LIST_HEAD(&evsel->node); in perf_evsel__init()
27 INIT_LIST_HEAD(&evsel->per_stream_periods); in perf_evsel__init()
28 evsel->attr = *attr; in perf_evsel__init()
29 evsel->idx = idx; in perf_evsel__init()
30 evsel->leader = evsel;
35 struct perf_evsel *evsel in perf_evsel__new()
22 perf_evsel__init(struct perf_evsel * evsel,struct perf_event_attr * attr,int idx) perf_evsel__init() argument
33 struct perf_evsel *evsel = zalloc(sizeof(*evsel)); perf_evsel__new() local
41 perf_evsel__delete(struct perf_evsel * evsel) perf_evsel__delete() argument
52 perf_evsel__alloc_fd(struct perf_evsel * evsel,int ncpus,int nthreads) perf_evsel__alloc_fd() argument
72 perf_evsel__alloc_mmap(struct perf_evsel * evsel,int ncpus,int nthreads) perf_evsel__alloc_mmap() argument
87 get_group_fd(struct perf_evsel * evsel,int cpu_map_idx,int thread,int * group_fd) get_group_fd() argument
113 perf_evsel__open(struct perf_evsel * evsel,struct perf_cpu_map * cpus,struct perf_thread_map * threads) perf_evsel__open() argument
180 perf_evsel__close_fd_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__close_fd_cpu() argument
194 perf_evsel__close_fd(struct perf_evsel * evsel) perf_evsel__close_fd() argument
200 perf_evsel__free_fd(struct perf_evsel * evsel) perf_evsel__free_fd() argument
206 perf_evsel__close(struct perf_evsel * evsel) perf_evsel__close() argument
215 perf_evsel__close_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__close_cpu() argument
223 perf_evsel__munmap(struct perf_evsel * evsel) perf_evsel__munmap() argument
245 perf_evsel__mmap(struct perf_evsel * evsel,int pages) perf_evsel__mmap() argument
282 perf_evsel__mmap_base(struct perf_evsel * evsel,int cpu_map_idx,int thread) perf_evsel__mmap_base() argument
292 perf_evsel__read_size(struct perf_evsel * evsel) perf_evsel__read_size() argument
321 perf_evsel__read_group(struct perf_evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) perf_evsel__read_group() argument
366 perf_evsel__adjust_values(struct perf_evsel * evsel,u64 * buf,struct perf_counts_values * count) perf_evsel__adjust_values() argument
387 perf_evsel__read(struct perf_evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) perf_evsel__read() argument
415 perf_evsel__ioctl(struct perf_evsel * evsel,int ioc,void * arg,int cpu_map_idx,int thread) perf_evsel__ioctl() argument
426 perf_evsel__run_ioctl(struct perf_evsel * evsel,int ioc,void * arg,int cpu_map_idx) perf_evsel__run_ioctl() argument
442 perf_evsel__enable_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__enable_cpu() argument
447 perf_evsel__enable_thread(struct perf_evsel * evsel,int thread) perf_evsel__enable_thread() argument
462 perf_evsel__enable(struct perf_evsel * evsel) perf_evsel__enable() argument
472 perf_evsel__disable_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__disable_cpu() argument
477 perf_evsel__disable(struct perf_evsel * evsel) perf_evsel__disable() argument
487 perf_evsel__apply_filter(struct perf_evsel * evsel,const char * filter) perf_evsel__apply_filter() argument
498 perf_evsel__cpus(struct perf_evsel * evsel) perf_evsel__cpus() argument
503 perf_evsel__threads(struct perf_evsel * evsel) perf_evsel__threads() argument
508 perf_evsel__attr(struct perf_evsel * evsel) perf_evsel__attr() argument
513 perf_evsel__alloc_id(struct perf_evsel * evsel,int ncpus,int nthreads) perf_evsel__alloc_id() argument
532 perf_evsel__free_id(struct perf_evsel * evsel) perf_evsel__free_id() argument
[all...]
H A Devlist.c37 struct perf_evsel *evsel) in __perf_evlist__propagate_maps() argument
39 if (evsel->system_wide) { in __perf_evlist__propagate_maps()
41 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
42 evsel->cpus = perf_cpu_map__new_online_cpus(); in __perf_evlist__propagate_maps()
43 } else if (evlist->has_user_cpus && evsel->is_pmu_core) { in __perf_evlist__propagate_maps()
48 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
49 evsel->cpus = perf_cpu_map__intersect(evlist->user_requested_cpus, evsel->own_cpus); in __perf_evlist__propagate_maps()
55 if (perf_cpu_map__is_empty(evsel->cpus)) { in __perf_evlist__propagate_maps()
56 struct perf_evsel *next = perf_evlist__next(evlist, evsel); in __perf_evlist__propagate_maps()
58 perf_evlist__remove(evlist, evsel); in __perf_evlist__propagate_maps()
[all …]
/linux/tools/perf/arch/x86/util/
H A Devsel.c4 #include "util/evsel.h"
10 #include "evsel.h"
17 void arch_evsel__set_sample_weight(struct evsel *evsel) in arch_evsel__set_sample_weight()
19 evsel__set_sample_bit(evsel, WEIGHT_STRUCT); in arch_evsel__set_sample_weight()
22 /* Check whether the evsel's PMU supports the perf metrics */ in evsel__sys_has_perf_metrics() argument
23 bool evsel__sys_has_perf_metrics(const struct evsel *evsel) in evsel__sys_has_perf_metrics()
26 u32 type = evsel->core.attr.type; in evsel__sys_has_perf_metrics()
40 type = evsel in evsel__sys_has_perf_metrics()
16 arch_evsel__set_sample_weight(struct evsel * evsel) arch_evsel__set_sample_weight() argument
41 arch_evsel__must_be_in_group(const struct evsel * evsel) arch_evsel__must_be_in_group() argument
50 arch_evsel__hw_name(struct evsel * evsel,char * bf,size_t size) arch_evsel__hw_name() argument
77 arch__post_evsel_config(struct evsel * evsel,struct perf_event_attr * attr) arch__post_evsel_config() argument
105 arch_evsel__open_strerror(struct evsel * evsel,char * msg,size_t size) arch_evsel__open_strerror() argument
[all...]
H A Dkvm-stat.c30 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument
33 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
34 key->info = evsel__intval(evsel, sample, "type"); in mmio_event_get_key()
41 static bool mmio_event_begin(struct evsel *evsel, in mmio_event_begin() argument
45 if (kvm_exit_event(evsel)) in mmio_event_begin()
49 if (evsel__name_is(evsel, "kvm:kvm_mmio") && in mmio_event_begin()
50 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_WRITE) { in mmio_event_begin()
51 mmio_event_get_key(evsel, sample, key); in mmio_event_begin()
58 static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample, in mmio_event_end() argument
62 if (kvm_entry_event(evsel)) in mmio_event_end()
[all …]
H A Devlist.c4 #include "../../../util/evsel.h"
6 #include "evsel.h"
8 int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs)
28 struct evsel *evsel = evsel__new(attrs + i); ___evlist__add_default_attrs() local
38 struct evsel *evsel; ___evlist__add_default_attrs() local
58 struct evsel *evsel, *n; ___evlist__add_default_attrs() local
/linux/tools/lib/perf/tests/
H A Dtest-evlist.c38 struct perf_evsel *evsel, *leader; in test_stat_cpu() local
55 evsel = leader = perf_evsel__new(&attr1); in test_stat_cpu()
56 __T("failed to create evsel1", evsel); in test_stat_cpu()
58 perf_evlist__add(evlist, evsel); in test_stat_cpu()
60 evsel = perf_evsel__new(&attr2); in test_stat_cpu()
61 __T("failed to create evsel2", evsel); in test_stat_cpu()
63 perf_evlist__add(evlist, evsel); in test_stat_cpu()
67 __T("failed to set leader", evsel->leader == leader); in test_stat_cpu()
74 perf_evlist__for_each_evsel(evlist, evsel) { in test_stat_cpu()
75 cpus = perf_evsel__cpus(evsel); in test_stat_cpu()
[all …]
H A Dtest-evsel.c23 struct perf_evsel *evsel; in test_stat_cpu() local
33 evsel = perf_evsel__new(&attr); in test_stat_cpu()
34 __T("failed to create evsel", evsel); in test_stat_cpu()
36 err = perf_evsel__open(evsel, cpus, NULL); in test_stat_cpu()
42 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu()
46 perf_evsel__close(evsel); in test_stat_cpu()
47 perf_evsel__delete(evsel); in test_stat_cpu()
57 struct perf_evsel *evsel; in test_stat_thread() local
69 evsel = perf_evsel__new(&attr); in test_stat_thread()
70 __T("failed to create evsel", evsel); in test_stat_thread()
[all …]
/linux/tools/lib/perf/include/perf/
H A Devsel.h29 LIBPERF_API void perf_evsel__delete(struct perf_evsel *evsel);
30 LIBPERF_API int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
32 LIBPERF_API void perf_evsel__close(struct perf_evsel *evsel);
33 LIBPERF_API void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx);
34 LIBPERF_API int perf_evsel__mmap(struct perf_evsel *evsel, int pages);
35 LIBPERF_API void perf_evsel__munmap(struct perf_evsel *evsel);
36 LIBPERF_API void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread);
37 LIBPERF_API int perf_evsel__read(struct perf_evsel *evsel, int cpu_map_idx, int thread,
39 LIBPERF_API int perf_evsel__enable(struct perf_evsel *evsel);
40 LIBPERF_API int perf_evsel__enable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
[all …]
/linux/tools/perf/arch/arm64/util/
H A Darm-spe.c17 #include "../../../util/evsel.h"
238 static void arm_spe_setup_evsel(struct evsel *evsel, struct perf_cpu_map *cpus) in arm_spe_recording_options()
242 evsel->core.attr.freq = 0; in arm_spe_recording_options()
243 evsel->core.attr.sample_period = arm_spe_pmu__sample_period(evsel->pmu); in arm_spe_recording_options()
244 evsel->needs_auxtrace_mmap = true; in arm_spe_recording_options()
250 evlist__to_front(evsel->evlist, evsel); in arm_spe_recording_options()
257 evsel__set_sample_bit(evsel, CP in arm_spe_recording_options()
136 arm_spe_setup_evsel(struct evsel * evsel,struct perf_cpu_map * cpus) arm_spe_setup_evsel() argument
181 struct evsel *evsel, *tmp; arm_spe_recording_options() local
312 struct evsel *evsel; arm_spe_snapshot_start() local
329 struct evsel *evsel; arm_spe_snapshot_finish() local
[all...]

12345678