| /linux-6.15/tools/perf/util/ |
| H A D | evsel.h | 236 int (*init)(struct evsel *evsel), 237 void (*fini)(struct evsel *evsel)); 250 struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig); 270 void evsel__exit(struct evsel *evsel); 338 int evsel__enable(struct evsel *evsel); 346 void evsel__close(struct evsel *evsel); 413 static inline struct evsel *evsel__next(struct evsel *evsel) in evsel__next() argument 418 static inline struct evsel *evsel__prev(struct evsel *evsel) in evsel__prev() argument 536 struct evsel *evsel__leader(const struct evsel *evsel); 537 bool evsel__has_leader(struct evsel *evsel, struct evsel *leader); [all …]
|
| H A D | evsel.c | 210 int (*init)(struct evsel *evsel); 211 void (*fini)(struct evsel *evsel); 219 void (*fini)(struct evsel *evsel)) in evsel__object_config() argument 384 void evsel__init(struct evsel *evsel, in evsel__init() argument 468 struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig) in evsel__clone() 470 struct evsel *evsel; in evsel__clone() local 1749 struct evsel *evsel; in evsel__group_has_tpebs() local 1761 struct evsel *evsel; in evsel__group_read_nr_members() local 3807 if (evsel && evsel->evlist && evsel->evlist->env) in evsel__env() 3870 struct evsel *evsel__leader(const struct evsel *evsel) in evsel__leader() argument [all …]
|
| H A D | stat.c | 114 struct evsel *evsel; in evlist__alloc_aggr_stats() local 192 struct evsel *evsel; in evlist__alloc_stats() local 212 struct evsel *evsel; in evlist__free_stats() local 223 struct evsel *evsel; in evlist__reset_stats() local 233 struct evsel *evsel; in evlist__reset_aggr_stats() local 241 struct evsel *evsel; in evlist__reset_prev_raw_counts() local 261 struct evsel *evsel; in evlist__copy_prev_raw_counts() local 280 struct evsel *evsel; in evlist__copy_res_stats() local 511 static int evsel__merge_aggr_counters(struct evsel *evsel, struct evsel *alias) in evsel__merge_aggr_counters() argument 602 struct evsel *evsel; in perf_stat_merge_counters() local [all …]
|
| H A D | bpf_counter.c | 622 static int bperf__enable(struct evsel *evsel) in bperf__enable() argument 628 static int bperf__disable(struct evsel *evsel) in bperf__disable() argument 634 static int bperf__read(struct evsel *evsel) in bperf__read() argument 694 static int bperf__destroy(struct evsel *evsel) in bperf__destroy() argument 815 int bpf_counter__enable(struct evsel *evsel) in bpf_counter__enable() argument 819 return evsel->bpf_counter_ops->enable(evsel); in bpf_counter__enable() 822 int bpf_counter__disable(struct evsel *evsel) in bpf_counter__disable() argument 829 int bpf_counter__read(struct evsel *evsel) in bpf_counter__read() argument 833 return evsel->bpf_counter_ops->read(evsel); in bpf_counter__read() 836 void bpf_counter__destroy(struct evsel *evsel) in bpf_counter__destroy() argument [all …]
|
| H A D | stat-shadow.c | 214 const struct evsel *evsel, in print_stalled_cycles_front() argument 236 const struct evsel *evsel, in print_branch_miss() argument 247 const struct evsel *evsel, in print_l1d_miss() argument 258 const struct evsel *evsel, in print_l1i_miss() argument 269 const struct evsel *evsel, in print_ll_miss() argument 280 const struct evsel *evsel, in print_dtlb_miss() argument 291 const struct evsel *evsel, in print_itlb_miss() argument 489 struct evsel *evsel, in generic_metric() argument 587 struct evsel *evsel, in perf_stat__print_metricgroup_header() argument 634 struct evsel *evsel, in perf_stat__print_shadow_stats_metricgroup() argument [all …]
|
| H A D | bpf_counter.h | 14 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); 52 static inline int bpf_counter__load(struct evsel *evsel __maybe_unused, in bpf_counter__load() [all …]
|
| H A D | bpf_counter_cgroup.c | 47 struct evsel *evsel; in bperf_load_program() local 115 evsel->cgrp = NULL; in bperf_load_program() 118 err = evsel__open_per_cpu(evsel, evsel->core.cpus, -1); in bperf_load_program() 136 cgrp = evsel->cgrp; in bperf_load_program() 169 static int bperf_cgrp__load(struct evsel *evsel, in bperf_cgrp__load() argument 187 static int bperf_cgrp__install_pe(struct evsel *evsel __maybe_unused, in bperf_cgrp__install_pe() 210 static int bperf_cgrp__enable(struct evsel *evsel) in bperf_cgrp__enable() argument 221 static int bperf_cgrp__disable(struct evsel *evsel) in bperf_cgrp__disable() argument 232 static int bperf_cgrp__read(struct evsel *evsel) in bperf_cgrp__read() argument 259 idx, evsel__name(evsel), evsel->cgrp->name); in bperf_cgrp__read() [all …]
|
| H A D | evlist.c | 114 struct evsel *evsel; in evlist__new_default() local 152 struct evsel *evsel; in evlist__update_id_pos() local 325 struct evsel *evsel; in evlist__find_tracepoint_by_name() local 1041 struct evsel *evsel; in evlist__apply_filters() local 1074 struct evsel *evsel; in evlist__set_tp_filter() local 1094 struct evsel *evsel; in evlist__append_tp_filter() local 1182 struct evsel *evsel; in __evlist__combined_sample_type() local 1201 struct evsel *evsel; in evlist__combined_branch_type() local 1329 struct evsel *evsel; in evlist__close() local 1392 struct evsel *evsel; in evlist__open() local [all …]
|
| H A D | record.c | 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() 33 if (evsel__leader(evsel) == leader && evsel != evsel__leader(evsel)) in evsel__read_sampler() 34 return evsel; in evsel__read_sampler() 41 static u64 evsel__config_term_mask(struct evsel *evsel) in evsel__config_term_mask() argument 53 static void evsel__config_leader_sampling(struct evsel *evsel, struct evlist *evlist) in evsel__config_leader_sampling() argument 56 struct evsel *leader = evsel__leader(evsel); in evsel__config_leader_sampling() 57 struct evsel *read_sampler; in evsel__config_leader_sampling() 65 if (evsel == read_sampler) in evsel__config_leader_sampling() 97 struct evsel *evsel; in evlist__config() local [all …]
|
| H A D | evlist.h | 69 struct evsel *selected; 103 void evlist__remove(struct evlist *evlist, struct evsel *evsel); 105 int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs); 201 void evlist__set_selected(struct evlist *evlist, struct evsel *evsel); 232 return container_of(evsel, struct evsel, core); in evlist__first() 239 return container_of(evsel, struct evsel, core); in evlist__last() 258 #define __evlist__for_each_entry(list, evsel) \ argument 266 #define evlist__for_each_entry(evlist, evsel) \ argument 291 list_for_each_entry_from(evsel, list, core.node) 340 struct evsel *evsel; member [all …]
|
| H A D | perf_api_probe.c | 12 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() 44 fn(evsel); in perf_do_probe_api() 82 static void perf_probe_sample_identifier(struct evsel *evsel) in perf_probe_sample_identifier() argument 87 static void perf_probe_comm_exec(struct evsel *evsel) in perf_probe_comm_exec() argument 92 static void perf_probe_context_switch(struct evsel *evsel) in perf_probe_context_switch() argument 97 static void perf_probe_text_poke(struct evsel *evsel) in perf_probe_text_poke() argument 102 static void perf_probe_build_id(struct evsel *evsel) in perf_probe_build_id() argument 107 static void perf_probe_cgroup(struct evsel *evsel) in perf_probe_cgroup() argument [all …]
|
| H A D | tool_pmu.c | 91 bool evsel__is_tool(const struct evsel *evsel) in evsel__is_tool() argument 96 enum tool_pmu_event evsel__tool_event(const struct evsel *evsel) in evsel__tool_event() argument 104 const char *evsel__tool_pmu_event_name(const struct evsel *evsel) in evsel__tool_pmu_event_name() argument 201 int evsel__tool_pmu_prepare_open(struct evsel *evsel, in evsel__tool_pmu_prepare_open() argument 211 if (!evsel->start_times) in evsel__tool_pmu_prepare_open() 219 int evsel__tool_pmu_open(struct evsel *evsel, in evsel__tool_pmu_open() argument 236 if (evsel->cgrp) in evsel__tool_pmu_open() 237 pid = evsel->cgrp->fd; in evsel__tool_pmu_open() 245 if (!evsel->cgrp && !evsel->core.system_wide) in evsel__tool_pmu_open() 395 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tool_pmu_read() argument [all …]
|
| H A D | annotate.h | 123 struct evsel *evsel; member 206 struct evsel *evsel, 384 const struct evsel *evsel) in annotated_source__histogram() argument 390 const struct evsel *evsel) in annotation__histogram() argument 412 struct evsel *evsel); 419 struct evsel *evsel, 423 struct evsel *evsel, u64 addr); 429 struct evsel *evsel, 432 struct evsel *evsel, 477 struct evsel *evsel __maybe_unused, in symbol__tui_annotate() [all …]
|
| H A D | sideband_evlist.c | 18 struct evsel *evsel; in evlist__add_sb_event() local 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 92 evsel->side_band.cb = cb; in evlist__set_cb() [all …]
|
| H A D | kvm-stat.c | 8 bool kvm_exit_event(struct evsel *evsel) in kvm_exit_event() argument 10 return evsel__name_is(evsel, kvm_exit_trace); in kvm_exit_event() 13 void exit_event_get_key(struct evsel *evsel, in exit_event_get_key() argument 18 key->key = evsel__intval(evsel, sample, kvm_exit_reason); in exit_event_get_key() 22 bool exit_event_begin(struct evsel *evsel, in exit_event_begin() argument 25 if (kvm_exit_event(evsel)) { in exit_event_begin() 26 exit_event_get_key(evsel, sample, key); in exit_event_begin() 33 bool kvm_entry_event(struct evsel *evsel) in kvm_entry_event() argument 35 return evsel__name_is(evsel, kvm_entry_trace); in kvm_entry_event() 38 bool exit_event_end(struct evsel *evsel, in exit_event_end() argument [all …]
|
| /linux-6.15/tools/perf/tests/ |
| H A D | parse-events.c | 98 struct evsel *evsel; in test__checkevent_tracepoint_multi() local 599 evsel = evsel__next(evsel); in test__checkevent_breakpoint_2_events() 644 evsel = evsel__next(evsel); in test__checkevent_list() 658 evsel = evsel__next(evsel); in test__checkevent_list() 680 evsel = evsel__next(evsel); in test__checkevent_pmu_name() 706 evsel = evsel__next(evsel); in test__checkevent_pmu_partial_time_callgraph() 742 struct evsel *evsel = NULL; in test__checkevent_pmu_events_mix() local 762 evsel = evsel__next(evsel); in test__checkevent_pmu_events_mix() 886 evsel = evsel__next(evsel); in test__group1() 1105 evsel = evsel__next(evsel); in test__group4() [all …]
|
| H A D | evsel-tp-sched.c | 8 static int evsel__test_field(struct evsel *evsel, const char *name, int size, bool should_be_signed) in evsel__test_field() argument 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() 67 evsel__delete(evsel); in test__perf_evsel__tp_sched_test() 69 evsel = evsel__newtp("sched", "sched_wakeup"); in test__perf_evsel__tp_sched_test() 71 if (IS_ERR(evsel)) { in test__perf_evsel__tp_sched_test() 79 if (evsel__test_field(evsel, "pid", 4, true)) in test__perf_evsel__tp_sched_test() 82 if (evsel__test_field(evsel, "prio", 4, true)) in test__perf_evsel__tp_sched_test() [all …]
|
| H A D | event-times.c | 19 struct evsel *evsel = evlist__last(evlist); in attach__enable_on_exec() local 61 struct evsel *evsel = evlist__last(evlist); in attach__current_disabled() local 73 evsel->core.attr.disabled = 1; in attach__current_disabled() 87 struct evsel *evsel = evlist__last(evlist); in attach__current_enabled() local 107 struct evsel *evsel = evlist__last(evlist); in detach__disable() local 109 return evsel__enable(evsel); in detach__disable() 114 struct evsel *evsel = evlist__last(evlist); in attach__cpu_disabled() local 138 return evsel__enable(evsel); in attach__cpu_disabled() 143 struct evsel *evsel = evlist__last(evlist); in attach__cpu_enabled() local 168 struct evsel *evsel; in test_times() local [all …]
|
| /linux-6.15/tools/perf/arch/x86/tests/ |
| H A D | hybrid.c | 27 struct evsel *evsel = evlist__first(evlist); in test__hybrid_hw_event_with_pmu() local 38 struct evsel *evsel, *leader; in test__hybrid_hw_group_event() local 47 evsel = evsel__next(evsel); in test__hybrid_hw_group_event() 57 struct evsel *evsel, *leader; in test__hybrid_sw_hw_group_event() local 64 evsel = evsel__next(evsel); in test__hybrid_sw_hw_group_event() 74 struct evsel *evsel, *leader; in test__hybrid_hw_sw_group_event() local 83 evsel = evsel__next(evsel); in test__hybrid_hw_sw_group_event() 91 struct evsel *evsel, *leader; in test__hybrid_group_modifier1() local 102 evsel = evsel__next(evsel); in test__hybrid_group_modifier1() 168 struct evsel *evsel, *leader; in test__hybrid_hw_group_event_2() local [all …]
|
| /linux-6.15/tools/lib/perf/ |
| H A D | evsel.c | 28 evsel->attr = *attr; in perf_evsel__init() 29 evsel->idx = idx; in perf_evsel__init() 30 evsel->leader = evsel; in perf_evsel__init() 35 struct perf_evsel *evsel = zalloc(sizeof(*evsel)); in perf_evsel__new() local 37 if (evsel != NULL) in perf_evsel__new() 40 return evsel; in perf_evsel__new() 45 free(evsel); in perf_evsel__delete() 58 if (evsel->fd) { in perf_evsel__alloc_fd() 229 if (evsel->fd == NULL || evsel->mmap == NULL) in perf_evsel__munmap() 255 if (evsel->fd == NULL || evsel->mmap) in perf_evsel__mmap() [all …]
|
| H A D | evlist.c | 39 if (evsel->system_wide) { in __perf_evlist__propagate_maps() 49 evsel->cpus = perf_cpu_map__intersect(evlist->user_requested_cpus, evsel->own_cpus); in __perf_evlist__propagate_maps() 75 } else if (evsel->cpus != evsel->own_cpus) { in __perf_evlist__propagate_maps() 81 evsel->cpus = perf_cpu_map__get(evsel->own_cpus); in __perf_evlist__propagate_maps() 84 if (evsel->system_wide) { in __perf_evlist__propagate_maps() 218 err = perf_evsel__open(evsel, evsel->cpus, evsel->threads); in perf_evlist__open() 271 sid->evsel = evsel; in perf_evlist__id_hash() 292 evsel->id[evsel->ids++] = id; in perf_evlist__id_add() 347 if (evsel->system_wide) in perf_evlist__alloc_pollfd() 669 perf_evsel__alloc_id(evsel, evsel->fd->max_x, evsel->fd->max_y) < 0) in perf_evlist__mmap_ops() [all …]
|
| /linux-6.15/tools/perf/arch/x86/util/ |
| H A D | evsel.c | 17 void arch_evsel__set_sample_weight(struct evsel *evsel) in arch_evsel__set_sample_weight() argument 23 bool evsel__sys_has_perf_metrics(const struct evsel *evsel) in evsel__sys_has_perf_metrics() argument 50 pmu = evsel->pmu; in evsel__sys_has_perf_metrics() 63 bool arch_evsel__must_be_in_group(const struct evsel *evsel) in arch_evsel__must_be_in_group() argument 65 if (!evsel__sys_has_perf_metrics(evsel) || !evsel->name || in arch_evsel__must_be_in_group() 69 return arch_is_topdown_metrics(evsel) || arch_is_topdown_slots(evsel); in arch_evsel__must_be_in_group() 72 int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size) in arch_evsel__hw_name() argument 88 evsel->pmu ? evsel->pmu->name : "cpu", in arch_evsel__hw_name() 133 !(evsel->pmu && !strncmp(evsel->pmu->name, "ibs", 3))) in arch_evsel__open_strerror() 138 evsel->core.attr.exclude_hv || evsel->core.attr.exclude_idle || in arch_evsel__open_strerror() [all …]
|
| H A D | kvm-stat.c | 30 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument 41 static bool mmio_event_begin(struct evsel *evsel, in mmio_event_begin() argument 45 if (kvm_exit_event(evsel)) 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() 92 static void ioport_event_get_key(struct evsel *evsel, in ioport_event_get_key() argument 100 static bool ioport_event_begin(struct evsel *evsel, in ioport_event_begin() argument 112 static bool ioport_event_end(struct evsel *evsel, in ioport_event_end() argument 136 static void msr_event_get_key(struct evsel *evsel, in msr_event_get_key() argument 144 static bool msr_event_begin(struct evsel *evsel, in msr_event_begin() argument [all …]
|
| /linux-6.15/tools/lib/perf/tests/ |
| H A D | test-evlist.c | 58 perf_evlist__add(evlist, evsel); in test_stat_cpu() 60 evsel = perf_evsel__new(&attr2); in test_stat_cpu() 63 perf_evlist__add(evlist, evsel); in test_stat_cpu() 75 cpus = perf_evsel__cpus(evsel); in test_stat_cpu() 216 struct perf_evsel *evsel; in test_mmap_thread() local 274 __T("failed to set leader", evsel->leader == evsel); in test_mmap_thread() 327 struct perf_evsel *evsel; in test_mmap_cpus() local 361 __T("failed to set leader", evsel->leader == evsel); in test_mmap_cpus() 445 struct perf_evsel *evsel; in test_stat_multiplexing() local 487 perf_evsel__close(evsel); in test_stat_multiplexing() [all …]
|
| H A D | test-evsel.c | 23 struct perf_evsel *evsel; in test_stat_cpu() local 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 78 perf_evsel__close(evsel); in test_stat_thread() 79 perf_evsel__delete(evsel); in test_stat_thread() 89 struct perf_evsel *evsel; in test_stat_thread_enable() local 120 perf_evsel__close(evsel); in test_stat_thread_enable() 131 struct perf_evsel *evsel; in test_stat_user_read() local 188 perf_evsel__close(evsel); in test_stat_user_read() [all …]
|