Home
last modified time | relevance | path

Searched refs:evlist (Results 1 – 25 of 166) sorted by relevance

1234567

/linux/tools/perf/util/
H A Devlist.h58 struct evlist { struct
75 void (*trace_event_sample_raw)(struct evlist *evlist, argument
104 struct evlist *evlist__new(void); argument
105 struct evlist *evlist__new_default(void);
106 struct evlist *evlist__new_dummy(void);
107 void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
109 void evlist__exit(struct evlist *evlist);
110 void evlist__delete(struct evlist *evlist);
112 void evlist__add(struct evlist *evlist, struct evsel *entry);
113 void evlist__remove(struct evlist *evlist, struct evsel *evsel);
[all …]
H A Devlist.c76 void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus, in evlist__init() argument
79 perf_evlist__init(&evlist->core); in evlist__init()
80 perf_evlist__set_maps(&evlist->core, cpus, threads); in evlist__init()
81 evlist->workload.pid = -1; in evlist__init()
82 evlist->bkw_mmap_state = BKW_MMAP_NOTREADY; in evlist__init()
83 evlist->ctl_fd.fd = -1; in evlist__init()
84 evlist->ctl_fd.ack = -1; in evlist__init()
85 evlist->ctl_fd.pos = -1; in evlist__init()
86 evlist->nr_br_cntr = -1; in evlist__init()
87 metricgroup__rblist_init(&evlist->metric_events); in evlist__init()
[all …]
H A Dsideband_evlist.c15 int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr, in evlist__add_sb_event() argument
25 evsel = evsel__new_idx(attr, evlist->core.nr_entries); in evlist__add_sb_event()
31 evlist__add(evlist, evsel); in evlist__add_sb_event()
37 struct evlist *evlist = arg; in perf_evlist__poll_thread() local
52 if (evlist->thread.done) in perf_evlist__poll_thread()
56 evlist__poll(evlist, 1000); in perf_evlist__poll_thread()
58 for (i = 0; i < evlist->core.nr_mmaps; i++) { in perf_evlist__poll_thread()
59 struct mmap *map = &evlist->mmap[i]; in perf_evlist__poll_thread()
65 struct evsel *evsel = evlist__event2evsel(evlist, event); in perf_evlist__poll_thread()
84 void evlist__set_cb(struct evlist *evlist, evsel__sb_cb_t cb, void *data) in evlist__set_cb() argument
[all …]
H A Dstat.h130 struct evlist;
175 struct evlist *evlist, bool alloc_raw);
176 void evlist__free_stats(struct evlist *evlist);
177 void evlist__reset_stats(struct evlist *evlist);
178 void evlist__reset_prev_raw_counts(struct evlist *evlist);
179 void evlist__copy_prev_raw_counts(struct evlist *evlist);
180 void evlist__save_aggr_prev_raw_counts(struct evlist *evlist);
182 int evlist__alloc_aggr_stats(struct evlist *evlist, int nr_aggr);
183 void evlist__reset_aggr_stats(struct evlist *evlist);
184 void evlist__copy_res_stats(struct perf_stat_config *config, struct evlist *evlist);
[all …]
H A Drecord.c3 #include "evlist.h"
26 static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) in evsel__read_sampler() argument
32 evlist__for_each_entry(evlist, evsel) { in evsel__read_sampler()
53 static void evsel__config_leader_sampling(struct evsel *evsel, struct evlist *evlist) in evsel__config_leader_sampling() argument
63 read_sampler = evsel__read_sampler(evsel, evlist); in evsel__config_leader_sampling()
95 void evlist__config(struct evlist *evlist, struct record_opts *opts, struct callchain_param *callchain) in evlist__config() argument
102 if (perf_cpu_map__cpu(evlist in evlist__config()
221 evlist__can_select_event(struct evlist * evlist,const char * str) evlist__can_select_event() argument
[all...]
H A Diostat.h20 struct evlist;
33 int iostat_prepare(struct evlist *evlist, struct perf_stat_config *config);
36 void iostat_list(struct evlist *evlist, struct perf_stat_config *config);
37 void iostat_release(struct evlist *evlist);
38 void iostat_prefix(struct evlist *evlist, struct perf_stat_config *config,
43 void iostat_print_counters(struct evlist *evlist,
/linux/tools/lib/perf/
H A Devlist.c28 void perf_evlist__init(struct perf_evlist *evlist) in perf_evlist__init() argument
30 INIT_LIST_HEAD(&evlist->entries); in perf_evlist__init()
31 evlist->nr_entries = 0; in perf_evlist__init()
32 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init()
33 perf_evlist__reset_id_hash(evlist); in perf_evlist__init()
36 static void __perf_evlist__propagate_maps(struct perf_evlist *evlist, in __perf_evlist__propagate_maps() argument
47 if (evlist->has_user_cpus && !evsel->system_wide) { in __perf_evlist__propagate_maps()
52 evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus); in __perf_evlist__propagate_maps()
74 if (evlist->has_user_cpus && !evsel->system_wide) { in __perf_evlist__propagate_maps()
75 assert(!perf_cpu_map__has_any_cpu(evlist->user_requested_cpus)); in __perf_evlist__propagate_maps()
[all …]
/linux/tools/perf/tests/
H A Dparse-events.c25 static bool check_evlist(const char *test, int line, bool cond, struct evlist *evlist) in check_evlist() argument
32 evlist__format_evsels(evlist, &sb, 2048); in check_evlist()
37 #define TEST_ASSERT_EVLIST(test, cond, evlist) \ argument
38 if (!check_evlist(test, __LINE__, cond, evlist)) \
56 static int num_core_entries(struct evlist *evlist) in num_core_entries() argument
67 evlist__for_each_entry(evlist, evsel) { in num_core_entries()
108 static int test__checkevent_tracepoint(struct evlist *evlist) in test__checkevent_tracepoint() argument
110 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint()
112 TEST_ASSERT_EVLIST("wrong number of entries", 1 == evlist->core.nr_entries, evlist); in test__checkevent_tracepoint()
113 TEST_ASSERT_EVLIST("wrong number of groups", 0 == evlist__nr_groups(evlist), evlist); in test__checkevent_tracepoint()
[all …]
H A Devent-times.c17 static int attach__enable_on_exec(struct evlist *evlist) in attach__enable_on_exec() argument
19 struct evsel *evsel = evlist__last(evlist); in attach__enable_on_exec()
27 err = evlist__create_maps(evlist, &target); in attach__enable_on_exec()
33 err = evlist__prepare_workload(evlist, &target, argv, false, NULL); in attach__enable_on_exec()
41 err = evlist__open(evlist); in attach__enable_on_exec()
48 return evlist__start_workload(evlist) == 1 ? TEST_OK : TEST_FAIL; in attach__enable_on_exec()
51 static int detach__enable_on_exec(struct evlist *evlist) in detach__enable_on_exec() argument
53 waitpid(evlist->workload.pid, NULL, 0); in detach__enable_on_exec()
57 static int attach__current_disabled(struct evlist *evlist) in attach__current_disabled() argument
59 struct evsel *evsel = evlist__last(evlist); in attach__current_disabled()
[all …]
H A Dexpand-cgroup.c16 static int test_expand_events(struct evlist *evlist) in test_expand_events() argument
28 TEST_ASSERT_VAL("evlist is empty", !evlist__empty(evlist)); in test_expand_events()
30 nr_events = evlist->core.nr_entries; in test_expand_events()
37 evlist__for_each_entry(evlist, evsel) { in test_expand_events()
46 was_group_event = evsel__is_group_event(evlist__first(evlist)); in test_expand_events()
47 nr_members = evlist__first(evlist)->core.nr_members; in test_expand_events()
49 ret = evlist__expand_cgroup(evlist, cgrp_str, false); in test_expand_events()
56 if (evlist->core.nr_entries != nr_events * nr_cgrps) { in test_expand_events()
62 evlist__for_each_entry(evlist, evsel) { in test_expand_events()
102 struct evlist *evlist = evlist__new_default(); in expand_default_events() local
[all …]
H A Dkeep-tracking.c33 static int find_comm(struct evlist *evlist, const char *comm) in find_comm() argument
40 for (i = 0; i < evlist->core.nr_mmaps; i++) { in find_comm()
41 md = &evlist->mmap[i]; in find_comm()
76 struct evlist *evlist = NULL; in test__keep_tracking() local
87 evlist = evlist__new(); in test__keep_tracking()
88 CHECK_NOT_NULL__(evlist); in test__keep_tracking()
90 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__keep_tracking()
92 CHECK__(parse_event(evlist, "dummy:u")); in test__keep_tracking()
93 CHECK__(parse_event(evlist, "cpu-cycles:u")); in test__keep_tracking()
95 evlist__config(evlist, &opts, NULL); in test__keep_tracking()
[all …]
H A Dbackward-ring-buffer.c32 static int count_samples(struct evlist *evlist, int *sample_count, in count_samples() argument
37 for (i = 0; i < evlist->core.nr_mmaps; i++) { in count_samples()
38 struct mmap *map = &evlist->overwrite_mmap[i]; in count_samples()
62 static int do_test(struct evlist *evlist, int mmap_pages, in do_test() argument
68 err = evlist__mmap(evlist, mmap_pages); in do_test()
75 evlist__enable(evlist); in do_test()
77 evlist__disable(evlist); in do_test()
79 err = count_samples(evlist, sample_count, comm_count); in do_test()
80 evlist__munmap(evlist); in do_test()
89 struct evlist *evlist; in test__backward_ring_buffer() local
[all …]
H A Dswitch-tracking.c125 static int process_sample_event(struct evlist *evlist, in process_sample_event() argument
135 if (evlist__parse_sample(evlist, event, &sample)) { in process_sample_event()
141 evsel = evlist__id2evsel(evlist, sample.id); in process_sample_event()
181 static int process_event(struct evlist *evlist, union perf_event *event, in process_event() argument
185 return process_sample_event(evlist, event, switch_tracking); in process_event()
221 static int add_event(struct evlist *evlist, struct list_head *events, in add_event() argument
235 if (evlist__parse_sample(evlist, event, &sample)) { in add_event()
270 static int process_events(struct evlist *evlist, in process_events() argument
280 for (i = 0; i < evlist->core.nr_mmaps; i++) { in process_events()
281 md = &evlist->mmap[i]; in process_events()
[all …]
H A Dpfm.c16 static int count_pfm_events(struct perf_evlist *evlist) in count_pfm_events() argument
21 perf_evlist__for_each_entry(evlist, evsel) { in count_pfm_events()
30 struct evlist *evlist; in test__pfm_events() local
68 evlist = evlist__new(); in test__pfm_events()
69 if (evlist == NULL) in test__pfm_events()
72 opt.value = evlist; in test__pfm_events()
77 count_pfm_events(&evlist->core), in test__pfm_events()
80 evlist__nr_groups(evlist), in test__pfm_events()
83 evlist__delete(evlist); in test__pfm_events()
91 struct evlist *evlist; in test__pfm_group() local
[all …]
H A Dperf-record.c60 struct evlist *evlist = evlist__new_dummy(); in test__PERF_RECORD() local
87 if (evlist == NULL) /* Fallback for kernels lacking PERF_COUNT_SW_DUMMY */ in test__PERF_RECORD()
88 evlist = evlist__new_default(); in test__PERF_RECORD()
90 if (evlist == NULL) { in test__PERF_RECORD()
102 err = evlist__create_maps(evlist, &opts.target); in test__PERF_RECORD()
114 err = evlist__prepare_workload(evlist, &opts.target, argv, false, NULL); in test__PERF_RECORD()
123 evsel = evlist__first(evlist); in test__PERF_RECORD()
127 evlist__config(evlist, &opts, NULL); in test__PERF_RECORD()
129 err = sched__get_first_possible_cpu(evlist->workload.pid, cpu_mask); in test__PERF_RECORD()
133 evlist__cancel_workload(evlist); in test__PERF_RECORD()
[all …]
H A Dparse-metric.c34 static void load_runtime_stat(struct evlist *evlist, struct value *vals) in load_runtime_stat() argument
39 evlist__alloc_aggr_stats(evlist, 1); in load_runtime_stat()
40 evlist__for_each_entry(evlist, evsel) { in load_runtime_stat()
47 static double compute_single(struct evlist *evlist, const char *name) in compute_single() argument
53 evlist__for_each_entry(evlist, evsel) { in compute_single()
54 me = metricgroup__lookup(&evlist->metric_events, evsel, false); in compute_single()
72 struct evlist *evlist; in __compute_metric() local
79 evlist = evlist__new(); in __compute_metric()
80 if (!evlist) in __compute_metric()
85 evlist__delete(evlist); in __compute_metric()
[all …]
H A Devsel-roundtrip-name.c2 #include "evlist.h"
21 struct evlist *evlist = evlist__new(); in perf_evsel__roundtrip_cache_name_test() local
25 if (evlist == NULL) { in perf_evsel__roundtrip_cache_name_test()
26 pr_debug("Failed to alloc evlist"); in perf_evsel__roundtrip_cache_name_test()
32 err = parse_event(evlist, name); in perf_evsel__roundtrip_cache_name_test()
36 evlist__delete(evlist); in perf_evsel__roundtrip_cache_name_test()
39 evlist__for_each_entry(evlist, evsel) { in perf_evsel__roundtrip_cache_name_test()
45 evlist__delete(evlist); in perf_evsel__roundtrip_cache_name_test()
57 struct evlist *evlis in perf_evsel__name_array_test() local
[all...]
H A Dperf-time-to-tsc.c81 struct evlist *evlist = NULL; in test__perf_time_to_tsc() local
99 evlist = evlist__new(); in test__perf_time_to_tsc()
100 CHECK_NOT_NULL__(evlist); in test__perf_time_to_tsc()
102 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__perf_time_to_tsc()
104 CHECK__(parse_event(evlist, "cpu-cycles:u")); in test__perf_time_to_tsc()
106 evlist__config(evlist, &opts, NULL); in test__perf_time_to_tsc()
109 evlist__for_each_entry(evlist, evsel) { in test__perf_time_to_tsc()
115 ret = evlist__open(evlist); in test__perf_time_to_tsc()
124 CHECK__(evlist__mmap(evlist, UINT_MAX)); in test__perf_time_to_tsc()
126 pc = evlist->mmap[0].core.base; in test__perf_time_to_tsc()
[all …]
/linux/tools/lib/perf/tests/
H A Dtest-evlist.c37 struct perf_evlist *evlist; in test_stat_cpu() local
52 evlist = perf_evlist__new(); in test_stat_cpu()
53 __T("failed to create evlist", evlist); in test_stat_cpu()
58 perf_evlist__add(evlist, evsel); in test_stat_cpu()
63 perf_evlist__add(evlist, evsel); in test_stat_cpu()
65 perf_evlist__set_leader(evlist); in test_stat_cpu()
69 perf_evlist__set_maps(evlist, cpus, NULL); in test_stat_cpu()
71 err = perf_evlist__open(evlist); in test_stat_cpu()
74 perf_evlist__for_each_evsel(evlist, evsel) { in test_stat_cpu()
85 perf_evlist__close(evlist); in test_stat_cpu()
[all …]
/linux/tools/perf/arch/x86/tests/
H A Dhybrid.c25 static int test__hybrid_hw_event_with_pmu(struct evlist *evlist) in test__hybrid_hw_event_with_pmu() argument
27 struct evsel *evsel = evlist__first(evlist); in test__hybrid_hw_event_with_pmu()
29 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_hw_event_with_pmu()
36 static int test__hybrid_hw_group_event(struct evlist *evlist) in test__hybrid_hw_group_event() argument
40 evsel = leader = evlist__first(evlist); in test__hybrid_hw_group_event()
41 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_hw_group_event()
55 static int test__hybrid_sw_hw_group_event(struct evlist *evlist) in test__hybrid_sw_hw_group_event() argument
59 evsel = leader = evlist__first(evlist); in test__hybrid_sw_hw_group_event()
60 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_sw_hw_group_event()
72 static int test__hybrid_hw_sw_group_event(struct evlist *evlist) in test__hybrid_hw_sw_group_event() argument
[all …]
/linux/tools/lib/perf/include/perf/
H A Devlist.h13 LIBPERF_API void perf_evlist__add(struct perf_evlist *evlist,
15 LIBPERF_API void perf_evlist__remove(struct perf_evlist *evlist,
18 LIBPERF_API void perf_evlist__delete(struct perf_evlist *evlist);
19 LIBPERF_API struct perf_evsel* perf_evlist__next(struct perf_evlist *evlist,
21 LIBPERF_API int perf_evlist__open(struct perf_evlist *evlist);
22 LIBPERF_API void perf_evlist__close(struct perf_evlist *evlist);
23 LIBPERF_API void perf_evlist__enable(struct perf_evlist *evlist);
24 LIBPERF_API void perf_evlist__disable(struct perf_evlist *evlist);
26 #define perf_evlist__for_each_evsel(evlist, pos) \ argument
27 for ((pos) = perf_evlist__next((evlist), NULL); \
[all …]
/linux/tools/perf/bench/
H A Devlist-open-close.c50 static int evlist__count_evsel_fds(struct evlist *evlist) in evlist__count_evsel_fds() argument
55 evlist__for_each_entry(evlist, evsel) in evlist__count_evsel_fds()
61 static struct evlist *bench__create_evlist(char *evstr, const char *uid_str) in bench__create_evlist()
64 struct evlist *evlist = evlist__new(); in bench__create_evlist() local
67 if (!evlist) { in bench__create_evlist()
73 ret = parse_events(evlist, evstr, &err); in bench__create_evlist()
90 ret = parse_uid_filter(evlist, uid); in bench__create_evlist()
94 ret = evlist__create_maps(evlist, &opts.target); in bench__create_evlist()
100 evlist__config(evlist, &opts, NULL); in bench__create_evlist()
102 return evlist; in bench__create_evlist()
[all …]
/linux/tools/lib/perf/include/internal/
H A Devlist.h54 int perf_evlist__alloc_pollfd(struct perf_evlist *evlist);
55 int perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd,
58 int perf_evlist__mmap_ops(struct perf_evlist *evlist,
62 void perf_evlist__init(struct perf_evlist *evlist);
63 void perf_evlist__exit(struct perf_evlist *evlist);
78 #define perf_evlist__for_each_entry(evlist, evsel) \ argument
79 __perf_evlist__for_each_entry(&(evlist)->entries, evsel)
94 #define perf_evlist__for_each_entry_reverse(evlist, evsel) \ argument
95 __perf_evlist__for_each_entry_reverse(&(evlist)->entries, evsel)
112 #define perf_evlist__for_each_entry_safe(evlist, tmp, evsel) \ argument
[all …]
/linux/tools/lib/perf/Documentation/examples/
H A Dcounting.c21 struct perf_evlist *evlist; in main() local
46 evlist = perf_evlist__new(); in main()
47 if (!evlist) { in main()
56 perf_evlist__add(evlist, evsel); in main()
62 perf_evlist__add(evlist, evsel); in main()
63 perf_evlist__set_maps(evlist, NULL, threads); in main()
64 err = perf_evlist__open(evlist); in main()
69 perf_evlist__enable(evlist); in main()
71 perf_evlist__disable(evlist); in main()
72 perf_evlist__for_each_evsel(evlist, evsel) { in main()
[all …]
/linux/tools/perf/
H A Dbuiltin-top.c143 if (!symbol__hists(sym, top->evlist->core.nr_entries)) { in perf_top__parse_source()
269 if (top->evlist->enabled) { in perf_top__show_details()
283 struct evlist *evlist = t->evlist; in perf_top__resort_hists() local
286 evlist__for_each_entry(evlist, pos) { in perf_top__resort_hists()
295 if (evlist->enabled) { in perf_top__resort_hists()
315 evlist__for_each_entry(evlist, pos) { in perf_top__resort_hists()
336 (top->evlist->stats.nr_lost_warned != in perf_top__print_sym_table()
337 top->evlist->stats.nr_events[PERF_RECORD_LOST])) { in perf_top__print_sym_table()
338 top->evlist->stats.nr_lost_warned = in perf_top__print_sym_table()
339 top->evlist->stats.nr_events[PERF_RECORD_LOST]; in perf_top__print_sym_table()
[all …]

1234567