/Linux-v4.19/tools/perf/util/ |
D | evlist.c | 40 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, in perf_evlist__init() argument 46 INIT_HLIST_HEAD(&evlist->heads[i]); in perf_evlist__init() 47 INIT_LIST_HEAD(&evlist->entries); in perf_evlist__init() 48 perf_evlist__set_maps(evlist, cpus, threads); in perf_evlist__init() 49 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init() 50 evlist->workload.pid = -1; in perf_evlist__init() 51 evlist->bkw_mmap_state = BKW_MMAP_NOTREADY; in perf_evlist__init() 56 struct perf_evlist *evlist = zalloc(sizeof(*evlist)); in perf_evlist__new() local 58 if (evlist != NULL) in perf_evlist__new() 59 perf_evlist__init(evlist, NULL, NULL); in perf_evlist__new() [all …]
|
D | evlist.h | 64 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, 66 void perf_evlist__exit(struct perf_evlist *evlist); 67 void perf_evlist__delete(struct perf_evlist *evlist); 69 void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry); 70 void perf_evlist__remove(struct perf_evlist *evlist, struct perf_evsel *evsel); 72 int __perf_evlist__add_default(struct perf_evlist *evlist, bool precise); 74 static inline int perf_evlist__add_default(struct perf_evlist *evlist) in perf_evlist__add_default() argument 76 return __perf_evlist__add_default(evlist, true); in perf_evlist__add_default() 79 int __perf_evlist__add_default_attrs(struct perf_evlist *evlist, 82 #define perf_evlist__add_default_attrs(evlist, array) \ argument [all …]
|
D | record.c | 16 struct perf_evlist *evlist; in perf_do_probe_api() local 22 evlist = perf_evlist__new(); in perf_do_probe_api() 23 if (!evlist) in perf_do_probe_api() 26 if (parse_events(evlist, str, NULL)) in perf_do_probe_api() 29 evsel = perf_evlist__first(evlist); in perf_do_probe_api() 56 perf_evlist__delete(evlist); in perf_do_probe_api() 135 void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts, in perf_evlist__config() argument 148 perf_evlist__set_leader(evlist); in perf_evlist__config() 150 if (evlist->cpus->map[0] < 0) in perf_evlist__config() 155 evlist__for_each_entry(evlist, evsel) { in perf_evlist__config() [all …]
|
D | cgroup.c | 93 static struct cgroup *evlist__find_cgroup(struct perf_evlist *evlist, const char *str) in evlist__find_cgroup() argument 99 evlist__for_each_entry(evlist, counter) { in evlist__find_cgroup() 133 struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, const char *name) in evlist__findnew_cgroup() argument 135 struct cgroup *cgroup = evlist__find_cgroup(evlist, name); in evlist__findnew_cgroup() 140 static int add_cgroup(struct perf_evlist *evlist, const char *str) in add_cgroup() argument 143 struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str); in add_cgroup() 153 evlist__for_each_entry(evlist, counter) { in add_cgroup() 193 void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgroup) in evlist__set_default_cgroup() argument 197 evlist__for_each_entry(evlist, evsel) in evlist__set_default_cgroup() 204 struct perf_evlist *evlist = *(struct perf_evlist **)opt->value; in parse_cgroups() local [all …]
|
D | bpf-loader.h | 76 struct perf_evlist *evlist, int *error_pos); 79 struct perf_evlist *evlist, 85 int bpf__setup_stdout(struct perf_evlist *evlist); 86 struct perf_evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *name); 87 int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size); 123 struct perf_evlist *evlist __maybe_unused, in bpf__config_obj() 136 bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused) in bpf__setup_stdout() 142 bpf__setup_output_event(struct perf_evlist *evlist __maybe_unused, const char *name __maybe_unused) in bpf__setup_output_event() 186 struct perf_evlist *evlist __maybe_unused, in bpf__strerror_config_obj() 202 bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused, in bpf__strerror_setup_output_event() [all …]
|
/Linux-v4.19/tools/perf/tests/ |
D | keep-tracking.c | 27 static int find_comm(struct perf_evlist *evlist, const char *comm) in find_comm() argument 34 for (i = 0; i < evlist->nr_mmaps; i++) { in find_comm() 35 md = &evlist->mmap[i]; in find_comm() 70 struct perf_evlist *evlist = NULL; in test__keep_tracking() local 81 evlist = perf_evlist__new(); in test__keep_tracking() 82 CHECK_NOT_NULL__(evlist); in test__keep_tracking() 84 perf_evlist__set_maps(evlist, cpus, threads); in test__keep_tracking() 86 CHECK__(parse_events(evlist, "dummy:u", NULL)); in test__keep_tracking() 87 CHECK__(parse_events(evlist, "cycles:u", NULL)); in test__keep_tracking() 89 perf_evlist__config(evlist, &opts, NULL); in test__keep_tracking() [all …]
|
D | parse-events.c | 21 static int test__checkevent_tracepoint(struct perf_evlist *evlist) in test__checkevent_tracepoint() argument 23 struct perf_evsel *evsel = perf_evlist__first(evlist); in test__checkevent_tracepoint() 25 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->nr_entries); in test__checkevent_tracepoint() 26 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->nr_groups); in test__checkevent_tracepoint() 34 static int test__checkevent_tracepoint_multi(struct perf_evlist *evlist) in test__checkevent_tracepoint_multi() argument 38 TEST_ASSERT_VAL("wrong number of entries", evlist->nr_entries > 1); in test__checkevent_tracepoint_multi() 39 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->nr_groups); in test__checkevent_tracepoint_multi() 41 evlist__for_each_entry(evlist, evsel) { in test__checkevent_tracepoint_multi() 52 static int test__checkevent_raw(struct perf_evlist *evlist) in test__checkevent_raw() argument 54 struct perf_evsel *evsel = perf_evlist__first(evlist); in test__checkevent_raw() [all …]
|
D | event-times.c | 15 static int attach__enable_on_exec(struct perf_evlist *evlist) in attach__enable_on_exec() argument 17 struct perf_evsel *evsel = perf_evlist__last(evlist); in attach__enable_on_exec() 27 err = perf_evlist__create_maps(evlist, &target); in attach__enable_on_exec() 33 err = perf_evlist__prepare_workload(evlist, &target, argv, false, NULL); in attach__enable_on_exec() 41 err = perf_evlist__open(evlist); in attach__enable_on_exec() 48 return perf_evlist__start_workload(evlist) == 1 ? TEST_OK : TEST_FAIL; in attach__enable_on_exec() 51 static int detach__enable_on_exec(struct perf_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 perf_evlist *evlist) in attach__current_disabled() argument 59 struct perf_evsel *evsel = perf_evlist__last(evlist); in attach__current_disabled() [all …]
|
D | backward-ring-buffer.c | 28 static int count_samples(struct perf_evlist *evlist, int *sample_count, in count_samples() argument 33 for (i = 0; i < evlist->nr_mmaps; i++) { in count_samples() 34 struct perf_mmap *map = &evlist->overwrite_mmap[i]; in count_samples() 58 static int do_test(struct perf_evlist *evlist, int mmap_pages, in do_test() argument 64 err = perf_evlist__mmap(evlist, mmap_pages); in do_test() 71 perf_evlist__enable(evlist); in do_test() 73 perf_evlist__disable(evlist); in do_test() 75 err = count_samples(evlist, sample_count, comm_count); in do_test() 76 perf_evlist__munmap(evlist); in do_test() 85 struct perf_evlist *evlist; in test__backward_ring_buffer() local [all …]
|
D | switch-tracking.c | 115 static int process_sample_event(struct perf_evlist *evlist, in process_sample_event() argument 124 if (perf_evlist__parse_sample(evlist, event, &sample)) { in process_sample_event() 129 evsel = perf_evlist__id2evsel(evlist, sample.id); in process_sample_event() 165 static int process_event(struct perf_evlist *evlist, union perf_event *event, in process_event() argument 169 return process_sample_event(evlist, event, switch_tracking); in process_event() 205 static int add_event(struct perf_evlist *evlist, struct list_head *events, in add_event() argument 219 if (perf_evlist__parse_sample(evlist, event, &sample)) { in add_event() 254 static int process_events(struct perf_evlist *evlist, in process_events() argument 264 for (i = 0; i < evlist->nr_mmaps; i++) { in process_events() 265 md = &evlist->mmap[i]; in process_events() [all …]
|
D | perf-record.c | 53 struct perf_evlist *evlist = perf_evlist__new_dummy(); in test__PERF_RECORD() local 69 if (evlist == NULL) /* Fallback for kernels lacking PERF_COUNT_SW_DUMMY */ in test__PERF_RECORD() 70 evlist = perf_evlist__new_default(); in test__PERF_RECORD() 72 if (evlist == NULL) { in test__PERF_RECORD() 83 err = perf_evlist__create_maps(evlist, &opts.target); in test__PERF_RECORD() 95 err = perf_evlist__prepare_workload(evlist, &opts.target, argv, false, NULL); in test__PERF_RECORD() 104 evsel = perf_evlist__first(evlist); in test__PERF_RECORD() 108 perf_evlist__config(evlist, &opts, NULL); in test__PERF_RECORD() 110 err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask); in test__PERF_RECORD() 122 if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) { in test__PERF_RECORD() [all …]
|
D | task-exit.c | 41 struct perf_evlist *evlist; in test__task_exit() local 54 evlist = perf_evlist__new_default(); in test__task_exit() 55 if (evlist == NULL) { in test__task_exit() 74 perf_evlist__set_maps(evlist, cpus, threads); in test__task_exit() 79 err = perf_evlist__prepare_workload(evlist, &target, argv, false, in test__task_exit() 86 evsel = perf_evlist__first(evlist); in test__task_exit() 98 err = perf_evlist__open(evlist); in test__task_exit() 105 if (perf_evlist__mmap(evlist, 128) < 0) { in test__task_exit() 111 perf_evlist__start_workload(evlist); in test__task_exit() 114 md = &evlist->mmap[0]; in test__task_exit() [all …]
|
D | openat-syscall-tp-fields.c | 35 struct perf_evlist *evlist = perf_evlist__new(); in test__syscall_openat_tp_fields() local 40 if (evlist == NULL) { in test__syscall_openat_tp_fields() 51 perf_evlist__add(evlist, evsel); in test__syscall_openat_tp_fields() 53 err = perf_evlist__create_maps(evlist, &opts.target); in test__syscall_openat_tp_fields() 61 thread_map__set_pid(evlist->threads, 0, getpid()); in test__syscall_openat_tp_fields() 63 err = perf_evlist__open(evlist); in test__syscall_openat_tp_fields() 70 err = perf_evlist__mmap(evlist, UINT_MAX); in test__syscall_openat_tp_fields() 77 perf_evlist__enable(evlist); in test__syscall_openat_tp_fields() 87 for (i = 0; i < evlist->nr_mmaps; i++) { in test__syscall_openat_tp_fields() 91 md = &evlist->mmap[i]; in test__syscall_openat_tp_fields() [all …]
|
D | sw-clock.c | 31 struct perf_evlist *evlist; in __test__sw_clock_freq() local 46 evlist = perf_evlist__new(); in __test__sw_clock_freq() 47 if (evlist == NULL) { in __test__sw_clock_freq() 57 perf_evlist__add(evlist, evsel); in __test__sw_clock_freq() 67 perf_evlist__set_maps(evlist, cpus, threads); in __test__sw_clock_freq() 72 if (perf_evlist__open(evlist)) { in __test__sw_clock_freq() 82 err = perf_evlist__mmap(evlist, 128); in __test__sw_clock_freq() 89 perf_evlist__enable(evlist); in __test__sw_clock_freq() 95 perf_evlist__disable(evlist); in __test__sw_clock_freq() 97 md = &evlist->mmap[0]; in __test__sw_clock_freq() [all …]
|
D | evsel-roundtrip-name.c | 15 struct perf_evlist *evlist = perf_evlist__new(); in perf_evsel__roundtrip_cache_name_test() local 17 if (evlist == NULL) in perf_evsel__roundtrip_cache_name_test() 29 err = parse_events(evlist, name, NULL); in perf_evsel__roundtrip_cache_name_test() 37 evsel = perf_evlist__first(evlist); in perf_evsel__roundtrip_cache_name_test() 63 perf_evlist__delete(evlist); in perf_evsel__roundtrip_cache_name_test() 71 struct perf_evlist *evlist = perf_evlist__new(); in __perf_evsel__name_array_test() local 73 if (evlist == NULL) in __perf_evsel__name_array_test() 77 err = parse_events(evlist, names[i], NULL); in __perf_evsel__name_array_test() 86 evlist__for_each_entry(evlist, evsel) { in __perf_evsel__name_array_test() 94 perf_evlist__delete(evlist); in __perf_evsel__name_array_test()
|
D | mmap-basic.c | 32 struct perf_evlist *evlist; in test__basic_mmap() local 64 evlist = perf_evlist__new(); in test__basic_mmap() 65 if (evlist == NULL) { in test__basic_mmap() 70 perf_evlist__set_maps(evlist, cpus, threads); in test__basic_mmap() 85 perf_evlist__add(evlist, evsels[i]); in test__basic_mmap() 98 if (perf_evlist__mmap(evlist, 128) < 0) { in test__basic_mmap() 110 md = &evlist->mmap[0]; in test__basic_mmap() 123 err = perf_evlist__parse_sample(evlist, event, &sample); in test__basic_mmap() 130 evsel = perf_evlist__id2evsel(evlist, sample.id); in test__basic_mmap() 143 evlist__for_each_entry(evlist, evsel) { in test__basic_mmap() [all …]
|
D | code-reading.c | 363 struct perf_evlist *evlist, in process_sample_event() argument 370 if (perf_evlist__parse_sample(evlist, event, &sample)) { in process_sample_event() 386 static int process_event(struct machine *machine, struct perf_evlist *evlist, in process_event() argument 390 return process_sample_event(machine, evlist, event, state); in process_event() 409 static int process_events(struct machine *machine, struct perf_evlist *evlist, in process_events() argument 416 for (i = 0; i < evlist->nr_mmaps; i++) { in process_events() 417 md = &evlist->mmap[i]; in process_events() 422 ret = process_event(machine, evlist, event, state); in process_events() 555 struct perf_evlist *evlist = NULL; in do_test_code_reading() local 623 evlist = perf_evlist__new(); in do_test_code_reading() [all …]
|
D | bpf.c | 120 struct perf_evlist *evlist; in do_test() local 142 evlist = perf_evlist__new(); in do_test() 143 if (!evlist) { in do_test() 148 err = perf_evlist__create_maps(evlist, &opts.target); in do_test() 154 perf_evlist__splice_list_tail(evlist, &parse_state.list); in do_test() 155 evlist->nr_groups = parse_state.nr_groups; in do_test() 157 perf_evlist__config(evlist, &opts, NULL); in do_test() 159 err = perf_evlist__open(evlist); in do_test() 166 err = perf_evlist__mmap(evlist, opts.mmap_pages); in do_test() 173 perf_evlist__enable(evlist); in do_test() [all …]
|
/Linux-v4.19/tools/perf/arch/x86/tests/ |
D | perf-time-to-tsc.c | 54 struct perf_evlist *evlist = NULL; in test__perf_time_to_tsc() local 71 evlist = perf_evlist__new(); in test__perf_time_to_tsc() 72 CHECK_NOT_NULL__(evlist); in test__perf_time_to_tsc() 74 perf_evlist__set_maps(evlist, cpus, threads); in test__perf_time_to_tsc() 76 CHECK__(parse_events(evlist, "cycles:u", NULL)); in test__perf_time_to_tsc() 78 perf_evlist__config(evlist, &opts, NULL); in test__perf_time_to_tsc() 80 evsel = perf_evlist__first(evlist); in test__perf_time_to_tsc() 86 CHECK__(perf_evlist__open(evlist)); in test__perf_time_to_tsc() 88 CHECK__(perf_evlist__mmap(evlist, UINT_MAX)); in test__perf_time_to_tsc() 90 pc = evlist->mmap[0].base; in test__perf_time_to_tsc() [all …]
|
/Linux-v4.19/tools/perf/ |
D | builtin-record.c | 72 struct perf_evlist *evlist; member 247 for (i = 0; i < rec->evlist->nr_mmaps; i++) { in record__auxtrace_read_snapshot_all() 249 &rec->evlist->mmap[i].auxtrace_mmap; in record__auxtrace_read_snapshot_all() 281 rec->itr = auxtrace_record__init(rec->evlist, &err); in record__auxtrace_init() 291 return auxtrace_parse_filters(rec->evlist); in record__auxtrace_init() 322 struct perf_evlist *evlist) in record__mmap_evlist() argument 327 if (perf_evlist__mmap_ex(evlist, opts->mmap_pages, in record__mmap_evlist() 352 return record__mmap_evlist(rec, rec->evlist); in record__mmap() 359 struct perf_evlist *evlist = rec->evlist; in record__open() local 371 if (perf_evlist__add_dummy(evlist)) in record__open() [all …]
|
D | builtin-top.c | 128 if (!symbol__hists(sym, top->evlist->nr_entries)) { in perf_top__parse_source() 250 if (top->evlist->enabled) { in perf_top__show_details() 295 if (top->evlist->enabled) { in perf_top__print_sym_table() 403 if (top->evlist->nr_entries > 1) in perf_top__print_mapped_keys() 438 return top->evlist->nr_entries > 1 ? 1 : 0; in perf_top__key_mapped() 484 if (top->evlist->nr_entries > 1) { in perf_top__handle_keypress() 490 evlist__for_each_entry(top->evlist, top->sym_evsel) in perf_top__handle_keypress() 495 if (counter >= top->evlist->nr_entries) { in perf_top__handle_keypress() 496 top->sym_evsel = perf_evlist__first(top->evlist); in perf_top__handle_keypress() 501 evlist__for_each_entry(top->evlist, top->sym_evsel) in perf_top__handle_keypress() [all …]
|
/Linux-v4.19/tools/perf/arch/arm64/util/ |
D | arm-spe.c | 29 struct perf_evlist *evlist; member 34 struct perf_evlist *evlist __maybe_unused) in arm_spe_info_priv_size() 51 if (!session->evlist->nr_mmaps) in arm_spe_info_fill() 61 struct perf_evlist *evlist, in arm_spe_recording_options() argument 72 sper->evlist = evlist; in arm_spe_recording_options() 74 evlist__for_each_entry(evlist, evsel) { in arm_spe_recording_options() 118 perf_evlist__to_front(evlist, arm_spe_evsel); in arm_spe_recording_options() 125 err = parse_events(evlist, "dummy:u", NULL); in arm_spe_recording_options() 129 tracking_evsel = perf_evlist__last(evlist); in arm_spe_recording_options() 130 perf_evlist__set_tracking_event(evlist, tracking_evsel); in arm_spe_recording_options() [all …]
|
/Linux-v4.19/tools/perf/python/ |
D | tracepoint.py | 22 evlist = perf.evlist(cpus, threads) 23 evlist.add(tp) 24 evlist.open() 25 evlist.mmap() 28 evlist.poll(timeout = -1) 30 event = evlist.read_on_cpu(cpu)
|
D | twatch.py | 36 evlist = perf.evlist(cpus, threads) 37 evlist.add(evsel) 38 evlist.mmap() 40 evlist.poll(timeout = -1) 42 event = evlist.read_on_cpu(cpu)
|
/Linux-v4.19/tools/perf/arch/arm/util/ |
D | cs-etm.c | 34 struct perf_evlist *evlist; member 64 struct perf_evlist *evlist, in cs_etm_recording_options() argument 71 const struct cpu_map *cpus = evlist->cpus; in cs_etm_recording_options() 74 ptr->evlist = evlist; in cs_etm_recording_options() 77 evlist__for_each_entry(evlist, evsel) { in cs_etm_recording_options() 199 perf_evlist__to_front(evlist, cs_etm_evsel); in cs_etm_recording_options() 213 err = parse_events(evlist, "dummy:u", NULL); in cs_etm_recording_options() 217 tracking_evsel = perf_evlist__last(evlist); in cs_etm_recording_options() 218 perf_evlist__set_tracking_event(evlist, tracking_evsel); in cs_etm_recording_options() 237 struct perf_evlist *evlist = ptr->evlist; in cs_etm_get_config() local [all …]
|