/external/linux-tools-perf/perf-3.12.0/tools/perf/util/ |
D | evlist.c | 30 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, in perf_evlist__init() argument 36 INIT_HLIST_HEAD(&evlist->heads[i]); in perf_evlist__init() 37 INIT_LIST_HEAD(&evlist->entries); in perf_evlist__init() 38 perf_evlist__set_maps(evlist, cpus, threads); in perf_evlist__init() 39 evlist->workload.pid = -1; in perf_evlist__init() 44 struct perf_evlist *evlist = zalloc(sizeof(*evlist)); in perf_evlist__new() local 46 if (evlist != NULL) in perf_evlist__new() 47 perf_evlist__init(evlist, NULL, NULL); in perf_evlist__new() 49 return evlist; in perf_evlist__new() 59 void perf_evlist__set_id_pos(struct perf_evlist *evlist) in perf_evlist__set_id_pos() argument [all …]
|
D | evlist.h | 56 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, 58 void perf_evlist__exit(struct perf_evlist *evlist); 59 void perf_evlist__delete(struct perf_evlist *evlist); 61 void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry); 62 int perf_evlist__add_default(struct perf_evlist *evlist); 63 int __perf_evlist__add_default_attrs(struct perf_evlist *evlist, 66 #define perf_evlist__add_default_attrs(evlist, array) \ argument 67 __perf_evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array)) 69 int perf_evlist__add_newtp(struct perf_evlist *evlist, 72 int perf_evlist__set_filter(struct perf_evlist *evlist, const char *filter); [all …]
|
D | record.c | 10 struct perf_evlist *evlist; in perf_do_probe_api() local 14 evlist = perf_evlist__new(); in perf_do_probe_api() 15 if (!evlist) in perf_do_probe_api() 18 if (parse_events(evlist, str)) in perf_do_probe_api() 21 evsel = perf_evlist__first(evlist); in perf_do_probe_api() 40 perf_evlist__delete(evlist); in perf_do_probe_api() 75 void perf_evlist__config(struct perf_evlist *evlist, in perf_evlist__config() argument 86 perf_evlist__set_leader(evlist); in perf_evlist__config() 88 if (evlist->cpus->map[0] < 0) in perf_evlist__config() 91 list_for_each_entry(evsel, &evlist->entries, node) in perf_evlist__config() [all …]
|
D | python.c | 691 struct perf_evlist evlist; member 706 perf_evlist__init(&pevlist->evlist, cpus, threads); in pyrf_evlist__init() 712 perf_evlist__exit(&pevlist->evlist); in pyrf_evlist__delete() 719 struct perf_evlist *evlist = &pevlist->evlist; in pyrf_evlist__mmap() local 727 if (perf_evlist__mmap(evlist, pages, overwrite) < 0) { in pyrf_evlist__mmap() 739 struct perf_evlist *evlist = &pevlist->evlist; in pyrf_evlist__poll() local 746 n = poll(evlist->pollfd, evlist->nr_fds, timeout); in pyrf_evlist__poll() 759 struct perf_evlist *evlist = &pevlist->evlist; in pyrf_evlist__get_pollfd() local 763 for (i = 0; i < evlist->nr_fds; ++i) { in pyrf_evlist__get_pollfd() 765 FILE *fp = fdopen(evlist->pollfd[i].fd, "r"); in pyrf_evlist__get_pollfd() [all …]
|
D | cgroup.c | 76 static int add_cgroup(struct perf_evlist *evlist, char *str) in add_cgroup() argument 84 list_for_each_entry(counter, &evlist->entries, node) { in add_cgroup() 113 list_for_each_entry(counter, &evlist->entries, node) { in add_cgroup() 144 struct perf_evlist *evlist = *(struct perf_evlist **)opt->value; in parse_cgroups() local 149 if (list_empty(&evlist->entries)) { in parse_cgroups() 164 ret = add_cgroup(evlist, s); in parse_cgroups()
|
D | header.c | 463 struct perf_evlist *evlist) in write_tracing_data() argument 465 return read_tracing_data(fd, &evlist->entries); in write_tracing_data() 470 struct perf_evlist *evlist __maybe_unused) in write_build_id() 492 struct perf_evlist *evlist __maybe_unused) in write_hostname() 505 struct perf_evlist *evlist __maybe_unused) in write_osrelease() 518 struct perf_evlist *evlist __maybe_unused) in write_arch() 531 struct perf_evlist *evlist __maybe_unused) in write_version() 537 struct perf_evlist *evlist __maybe_unused) in write_cpudesc() 596 struct perf_evlist *evlist __maybe_unused) in write_nrcpus() 622 struct perf_evlist *evlist) in write_event_desc() argument [all …]
|
D | top.c | 73 if (top->evlist->nr_entries == 1) { in perf_top__header_snprintf() 74 struct perf_evsel *first = perf_evlist__first(top->evlist); in perf_top__header_snprintf() 98 top->evlist->cpus->nr > 1 ? "s" : "", in perf_top__header_snprintf() 105 top->evlist->cpus->nr, in perf_top__header_snprintf() 106 top->evlist->cpus->nr > 1 ? "s" : ""); in perf_top__header_snprintf()
|
/external/linux-tools-perf/perf-3.12.0/tools/perf/tests/ |
D | keep-tracking.c | 26 static int find_comm(struct perf_evlist *evlist, const char *comm) in find_comm() argument 32 for (i = 0; i < evlist->nr_mmaps; i++) { in find_comm() 33 while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) { in find_comm() 39 perf_evlist__mmap_consume(evlist, i); in find_comm() 65 struct perf_evlist *evlist = NULL; in test__keep_tracking() local 76 evlist = perf_evlist__new(); in test__keep_tracking() 77 CHECK_NOT_NULL__(evlist); in test__keep_tracking() 79 perf_evlist__set_maps(evlist, cpus, threads); in test__keep_tracking() 81 CHECK__(parse_events(evlist, "dummy:u")); in test__keep_tracking() 82 CHECK__(parse_events(evlist, "cycles:u")); in test__keep_tracking() [all …]
|
D | task-exit.c | 30 struct perf_evlist *evlist; in test__task_exit() local 40 evlist = perf_evlist__new(); in test__task_exit() 41 if (evlist == NULL) { in test__task_exit() 49 err = perf_evlist__add_default(evlist); in test__task_exit() 61 evlist->cpus = cpu_map__dummy_new(); in test__task_exit() 62 evlist->threads = thread_map__new_by_tid(-1); in test__task_exit() 63 if (!evlist->cpus || !evlist->threads) { in test__task_exit() 69 err = perf_evlist__prepare_workload(evlist, &target, argv, false, true); in test__task_exit() 75 evsel = perf_evlist__first(evlist); in test__task_exit() 83 err = perf_evlist__open(evlist); in test__task_exit() [all …]
|
D | sw-clock.c | 27 struct perf_evlist *evlist; in __test__sw_clock_freq() local 39 evlist = perf_evlist__new(); in __test__sw_clock_freq() 40 if (evlist == NULL) { in __test__sw_clock_freq() 50 perf_evlist__add(evlist, evsel); in __test__sw_clock_freq() 52 evlist->cpus = cpu_map__dummy_new(); in __test__sw_clock_freq() 53 evlist->threads = thread_map__new_by_tid(getpid()); in __test__sw_clock_freq() 54 if (!evlist->cpus || !evlist->threads) { in __test__sw_clock_freq() 60 perf_evlist__open(evlist); in __test__sw_clock_freq() 62 err = perf_evlist__mmap(evlist, 128, true); in __test__sw_clock_freq() 69 perf_evlist__enable(evlist); in __test__sw_clock_freq() [all …]
|
D | perf-record.c | 48 struct perf_evlist *evlist = perf_evlist__new(); in test__PERF_RECORD() local 63 if (evlist == NULL || argv == NULL) { in test__PERF_RECORD() 72 err = perf_evlist__add_default(evlist); in test__PERF_RECORD() 84 err = perf_evlist__create_maps(evlist, &opts.target); in test__PERF_RECORD() 96 err = perf_evlist__prepare_workload(evlist, &opts.target, argv, in test__PERF_RECORD() 106 evsel = perf_evlist__first(evlist); in test__PERF_RECORD() 110 perf_evlist__config(evlist, &opts); in test__PERF_RECORD() 112 err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask); in test__PERF_RECORD() 123 if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) { in test__PERF_RECORD() 132 err = perf_evlist__open(evlist); in test__PERF_RECORD() [all …]
|
D | open-syscall-tp-fields.c | 21 struct perf_evlist *evlist = perf_evlist__new(); in test__syscall_open_tp_fields() local 25 if (evlist == NULL) { in test__syscall_open_tp_fields() 36 perf_evlist__add(evlist, evsel); in test__syscall_open_tp_fields() 38 err = perf_evlist__create_maps(evlist, &opts.target); in test__syscall_open_tp_fields() 46 evlist->threads->map[0] = getpid(); in test__syscall_open_tp_fields() 48 err = perf_evlist__open(evlist); in test__syscall_open_tp_fields() 54 err = perf_evlist__mmap(evlist, UINT_MAX, false); in test__syscall_open_tp_fields() 60 perf_evlist__enable(evlist); in test__syscall_open_tp_fields() 70 for (i = 0; i < evlist->nr_mmaps; i++) { in test__syscall_open_tp_fields() 73 while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) { in test__syscall_open_tp_fields() [all …]
|
D | parse-events.c | 13 static int test__checkevent_tracepoint(struct perf_evlist *evlist) in test__checkevent_tracepoint() argument 15 struct perf_evsel *evsel = perf_evlist__first(evlist); in test__checkevent_tracepoint() 17 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->nr_entries); in test__checkevent_tracepoint() 18 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->nr_groups); in test__checkevent_tracepoint() 26 static int test__checkevent_tracepoint_multi(struct perf_evlist *evlist) in test__checkevent_tracepoint_multi() argument 30 TEST_ASSERT_VAL("wrong number of entries", evlist->nr_entries > 1); in test__checkevent_tracepoint_multi() 31 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->nr_groups); in test__checkevent_tracepoint_multi() 33 list_for_each_entry(evsel, &evlist->entries, node) { in test__checkevent_tracepoint_multi() 44 static int test__checkevent_raw(struct perf_evlist *evlist) in test__checkevent_raw() argument 46 struct perf_evsel *evsel = perf_evlist__first(evlist); in test__checkevent_raw() [all …]
|
D | perf-time-to-tsc.c | 61 struct perf_evlist *evlist = NULL; in test__perf_time_to_tsc() local 77 evlist = perf_evlist__new(); in test__perf_time_to_tsc() 78 CHECK_NOT_NULL__(evlist); in test__perf_time_to_tsc() 80 perf_evlist__set_maps(evlist, cpus, threads); in test__perf_time_to_tsc() 82 CHECK__(parse_events(evlist, "cycles:u")); in test__perf_time_to_tsc() 84 perf_evlist__config(evlist, &opts); in test__perf_time_to_tsc() 86 evsel = perf_evlist__first(evlist); in test__perf_time_to_tsc() 92 CHECK__(perf_evlist__open(evlist)); in test__perf_time_to_tsc() 94 CHECK__(perf_evlist__mmap(evlist, UINT_MAX, false)); in test__perf_time_to_tsc() 96 pc = evlist->mmap[0].base; in test__perf_time_to_tsc() [all …]
|
D | code-reading.c | 248 struct perf_evlist *evlist, in process_sample_event() argument 255 if (perf_evlist__parse_sample(evlist, event, &sample)) { in process_sample_event() 272 static int process_event(struct machine *machine, struct perf_evlist *evlist, in process_event() argument 276 return process_sample_event(machine, evlist, event, state); in process_event() 284 static int process_events(struct machine *machine, struct perf_evlist *evlist, in process_events() argument 290 for (i = 0; i < evlist->nr_mmaps; i++) { in process_events() 291 while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) { in process_events() 292 ret = process_event(machine, evlist, event, state); in process_events() 293 perf_evlist__mmap_consume(evlist, i); in process_events() 397 struct perf_evlist *evlist = NULL; in do_test_code_reading() local [all …]
|
D | mmap-basic.c | 24 struct perf_evlist *evlist; in test__basic_mmap() local 56 evlist = perf_evlist__new(); in test__basic_mmap() 57 if (evlist == NULL) { in test__basic_mmap() 62 perf_evlist__set_maps(evlist, cpus, threads); in test__basic_mmap() 77 perf_evlist__add(evlist, evsels[i]); in test__basic_mmap() 90 if (perf_evlist__mmap(evlist, 128, true) < 0) { in test__basic_mmap() 102 while ((event = perf_evlist__mmap_read(evlist, 0)) != NULL) { in test__basic_mmap() 111 err = perf_evlist__parse_sample(evlist, event, &sample); in test__basic_mmap() 118 evsel = perf_evlist__id2evsel(evlist, sample.id); in test__basic_mmap() 125 perf_evlist__mmap_consume(evlist, 0); in test__basic_mmap() [all …]
|
D | evsel-roundtrip-name.c | 11 struct perf_evlist *evlist = perf_evlist__new(); in perf_evsel__roundtrip_cache_name_test() local 13 if (evlist == NULL) in perf_evsel__roundtrip_cache_name_test() 25 err = parse_events(evlist, name); in perf_evsel__roundtrip_cache_name_test() 33 evsel = perf_evlist__first(evlist); in perf_evsel__roundtrip_cache_name_test() 59 perf_evlist__delete(evlist); in perf_evsel__roundtrip_cache_name_test() 67 struct perf_evlist *evlist = perf_evlist__new(); in __perf_evsel__name_array_test() local 69 if (evlist == NULL) in __perf_evsel__name_array_test() 73 err = parse_events(evlist, names[i]); in __perf_evsel__name_array_test() 82 list_for_each_entry(evsel, &evlist->entries, node) { in __perf_evsel__name_array_test() 90 perf_evlist__delete(evlist); in __perf_evsel__name_array_test()
|
D | parse-no-sample-id-all.c | 39 struct perf_evlist *evlist = NULL; in process_events() local 44 err = process_event(&evlist, events[i]); in process_events() 46 if (evlist) in process_events() 47 perf_evlist__delete(evlist); in process_events()
|
D | hists_link.c | 198 static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine) in add_hist_entries() argument 211 list_for_each_entry(evsel, &evlist->entries, node) { in add_hist_entries() 436 struct perf_evlist *evlist = perf_evlist__new(); in test__hists_link() local 438 if (evlist == NULL) in test__hists_link() 441 err = parse_events(evlist, "cpu-clock"); in test__hists_link() 444 err = parse_events(evlist, "task-clock"); in test__hists_link() 463 err = add_hist_entries(evlist, machine); in test__hists_link() 467 list_for_each_entry(evsel, &evlist->entries, node) { in test__hists_link() 474 first = perf_evlist__first(evlist); in test__hists_link() 475 evsel = perf_evlist__last(evlist); in test__hists_link() [all …]
|
/external/linux-tools-perf/perf-3.12.0/tools/perf/python/ |
D | twatch.py | 26 evlist = perf.evlist(cpus, threads) 27 evlist.add(evsel) 28 evlist.mmap() 30 evlist.poll(timeout = -1) 32 event = evlist.read_on_cpu(cpu)
|
/external/linux-tools-perf/perf-3.12.0/tools/perf/ |
D | builtin-top.c | 392 if (top->evlist->nr_entries > 1) in perf_top__print_mapped_keys() 427 return top->evlist->nr_entries > 1 ? 1 : 0; in perf_top__key_mapped() 482 if (top->evlist->nr_entries > 1) { in perf_top__handle_keypress() 488 list_for_each_entry(top->sym_evsel, &top->evlist->entries, node) in perf_top__handle_keypress() 493 if (counter >= top->evlist->nr_entries) { in perf_top__handle_keypress() 494 top->sym_evsel = perf_evlist__first(top->evlist); in perf_top__handle_keypress() 499 list_for_each_entry(top->sym_evsel, &top->evlist->entries, node) in perf_top__handle_keypress() 503 top->sym_evsel = perf_evlist__first(top->evlist); in perf_top__handle_keypress() 553 if (t->evlist->selected != NULL) in perf_top__sort_new_samples() 554 t->sym_evsel = t->evlist->selected; in perf_top__sort_new_samples() [all …]
|
D | builtin-record.c | 69 struct perf_evlist *evlist; member 179 if (rec->evlist->workload.pid > 0) { in perf_record__sig_exit() 181 kill(rec->evlist->workload.pid, SIGTERM); in perf_record__sig_exit() 198 struct perf_evlist *evlist = rec->evlist; in perf_record__open() local 203 perf_evlist__config(evlist, opts); in perf_record__open() 205 list_for_each_entry(pos, &evlist->entries, node) { in perf_record__open() 207 if (perf_evsel__open(pos, evlist->cpus, evlist->threads) < 0) { in perf_record__open() 222 if (perf_evlist__apply_filters(evlist)) { in perf_record__open() 229 if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) { in perf_record__open() 248 session->evlist = evlist; in perf_record__open() [all …]
|
D | builtin-kvm.c | 90 struct perf_evlist *evlist; member 888 while ((event = perf_evlist__mmap_read(kvm->evlist, idx)) != NULL) { in perf_kvm__mmap_read_idx() 889 err = perf_evlist__parse_sample(kvm->evlist, event, &sample); in perf_kvm__mmap_read_idx() 891 perf_evlist__mmap_consume(kvm->evlist, idx); in perf_kvm__mmap_read_idx() 901 perf_evlist__mmap_consume(kvm->evlist, idx); in perf_kvm__mmap_read_idx() 927 for (i = 0; i < kvm->evlist->nr_mmaps; i++) { in perf_kvm__mmap_read() 1095 nr_fds = kvm->evlist->nr_fds; in kvm_events_live_report() 1101 memcpy(pollfds, kvm->evlist->pollfd, in kvm_events_live_report() 1102 sizeof(struct pollfd) * kvm->evlist->nr_fds); in kvm_events_live_report() 1122 perf_evlist__enable(kvm->evlist); in kvm_events_live_report() [all …]
|
D | builtin-trace.c | 502 static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist) in trace__symbols_init() argument 513 err = perf_event__synthesize_thread_map(&trace->tool, evlist->threads, in trace__symbols_init() 878 evsel = perf_evlist__find_tracepoint_by_name(session->evlist, name); in perf_session__has_tp() 906 struct perf_evlist *evlist = perf_evlist__new(); in trace__run() local 912 if (evlist == NULL) { in trace__run() 917 if (perf_evlist__add_newtp(evlist, "raw_syscalls", "sys_enter", trace__sys_enter) || in trace__run() 918 perf_evlist__add_newtp(evlist, "raw_syscalls", "sys_exit", trace__sys_exit)) { in trace__run() 924 perf_evlist__add_newtp(evlist, "sched", "sched_stat_runtime", in trace__run() 930 err = perf_evlist__create_maps(evlist, &trace->opts.target); in trace__run() 936 err = trace__symbols_init(trace, evlist); in trace__run() [all …]
|
/external/linux-tools-perf/perf-3.12.0/tools/perf/Documentation/ |
D | perf-evlist.txt | 1 perf-evlist(1) 6 perf-evlist - List the event names in a perf.data file 11 'perf evlist <options>'
|