/linux-master/tools/perf/arch/arm64/util/ |
H A D | kvm-stat.c | 4 #include "../../../util/evsel.h" 24 static void event_get_key(struct evsel *evsel, argument 29 key->key = evsel__intval(evsel, sample, kvm_exit_reason); 38 key->key = evsel__intval(evsel, sample, kvm_trap_exit_reason); 43 static bool event_begin(struct evsel *evsel, argument 47 return evsel__name_is(evsel, kvm_entry_trace); 50 static bool event_end(struct evsel *evsel, argument [all...] |
/linux-master/tools/perf/tests/ |
H A D | event-times.c | 11 #include "evsel.h" 19 struct evsel *evsel = evlist__last(evlist); local 41 evsel->core.attr.enable_on_exec = 1; 61 struct evsel *evsel = evlist__last(evlist); local 73 evsel->core.attr.disabled = 1; 75 err = evsel__open_per_thread(evsel, threads); 82 return evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL; 87 struct evsel *evse local 107 struct evsel *evsel = evlist__last(evlist); local 114 struct evsel *evsel = evlist__last(evlist); local 143 struct evsel *evsel = evlist__last(evlist); local 168 struct evsel *evsel; local [all...] |
H A D | openat-syscall.c | 12 #include "evsel.h" 21 struct evsel *evsel; local 32 evsel = evsel__newtp("syscalls", "sys_enter_openat"); 33 if (IS_ERR(evsel)) { 40 if (evsel__open_per_thread(evsel, threads) < 0) { 53 if (evsel__read_on_cpu(evsel, 0, 0) < 0) { 58 if (perf_counts(evsel->counts, 0, 0)->val != nr_openat_calls) { 60 nr_openat_calls, perf_counts(evsel->counts, 0, 0)->val); 66 perf_evsel__close_fd(&evsel [all...] |
H A D | event_update.c | 7 #include "evsel.h" 82 struct evsel *evsel; local 88 evsel = evlist__first(evlist); 91 !perf_evsel__alloc_id(&evsel->core, 1, 1)); 93 perf_evlist__id_add(&evlist->core, &evsel->core, 0, 0, 123); 95 free((char *)evsel->unit); 96 evsel->unit = strdup("KRAVA"); 99 !perf_event__synthesize_event_update_unit(NULL, evsel, process_event_unit)); 101 evsel [all...] |
H A D | evsel-roundtrip-name.c | 3 #include "evsel.h" 22 struct evsel *evsel; local 39 evlist__for_each_entry(evlist, evsel) { 40 if (strcmp(evsel__name(evsel), name)) { 41 pr_debug("%s != %s\n", evsel__name(evsel), name); 58 struct evsel *evsel; local 73 evlist__for_each_entry(evlist, evsel) { 74 if (strcmp(evsel__name(evsel), name [all...] |
H A D | openat-syscall-all-cpus.c | 14 #include "evsel.h" 28 struct evsel *evsel; local 48 evsel = evsel__newtp("syscalls", "sys_enter_openat"); 49 if (IS_ERR(evsel)) { 56 if (evsel__open(evsel, cpus, threads) < 0) { 91 evsel->core.cpus = perf_cpu_map__get(cpus); 101 if (evsel__read_on_cpu(evsel, idx, 0) < 0) { 108 if (perf_counts(evsel->counts, idx, 0)->val != expected) { 110 expected, cpu.cpu, perf_counts(evsel [all...] |
H A D | mmap-basic.c | 10 #include "evsel.h" 45 struct evsel *evsels[nsyscalls], *evsel; local 140 evsel = evlist__id2evsel(evlist, sample.id); 141 if (evsel == NULL) { 143 " doesn't map to an evsel\n", sample.id); 146 nr_events[evsel->core.idx]++; 153 evlist__for_each_entry(evlist, evsel) { 154 if (nr_events[evsel->core.idx] != expected_nr_events[evsel 176 struct perf_evsel *evsel; local [all...] |
H A D | task-exit.c | 4 #include "evsel.h" 46 struct evsel *evsel; local 89 evsel = evlist__first(evlist); 90 evsel->core.attr.task = 1; 92 evsel->core.attr.sample_freq = 1000000; 94 evsel->core.attr.sample_freq = 1; 96 evsel->core.attr.inherit = 0; 97 evsel->core.attr.watermark = 0; 98 evsel [all...] |
/linux-master/tools/lib/perf/ |
H A D | evlist.c | 3 #include <perf/evsel.h> 9 #include <internal/evsel.h> 37 struct perf_evsel *evsel) 39 if (evsel->system_wide) { 40 /* System wide: set the cpu map of the evsel to all online CPUs. */ 41 perf_cpu_map__put(evsel->cpus); 42 evsel->cpus = perf_cpu_map__new_online_cpus(); 43 } else if (evlist->has_user_cpus && evsel->is_pmu_core) { 48 perf_cpu_map__put(evsel->cpus); 49 evsel 36 __perf_evlist__propagate_maps(struct perf_evlist *evlist, struct perf_evsel *evsel) argument 83 struct perf_evsel *evsel; local 91 perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *evsel) argument 102 perf_evlist__remove(struct perf_evlist *evlist, struct perf_evsel *evsel) argument 200 struct perf_evsel *evsel; local 218 struct perf_evsel *evsel; local 226 struct perf_evsel *evsel; local 234 struct perf_evsel *evsel; local 249 perf_evlist__id_hash(struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu_map_idx, int thread, u64 id) argument 270 perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu_map_idx, int thread, u64 id) argument 281 perf_evlist__id_add_fd(struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu_map_idx, int thread, int fd) argument 330 struct perf_evsel *evsel; local 406 perf_evsel__set_sid_idx(struct perf_evsel *evsel, int idx, int cpu, int thread) argument 460 struct perf_evsel *evsel; local 643 struct perf_evsel *evsel; local 711 struct perf_evsel *evsel; local 733 struct perf_evsel *evsel; local 748 perf_evlist__go_system_wide(struct perf_evlist *evlist, struct perf_evsel *evsel) argument [all...] |
/linux-master/tools/perf/util/ |
H A D | record.c | 4 #include "evsel.h" 26 static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) argument 28 struct evsel *leader = evsel__leader(evsel); 32 evlist__for_each_entry(evlist, evsel) { 33 if (evsel__leader(evsel) == leader && evsel != evsel__leader(evsel)) 41 evsel__config_term_mask(struct evsel *evsel) argument 53 evsel__config_leader_sampling(struct evsel *evsel, struct evlist *evlist) argument 97 struct evsel *evsel; local 224 struct evsel *evsel; local [all...] |
H A D | kvm-stat.h | 18 struct evsel; 57 void (*get_key)(struct evsel *evsel, 64 bool (*is_begin_event)(struct evsel *evsel, 67 bool (*is_end_event)(struct evsel *evsel, 118 void exit_event_get_key(struct evsel *evsel, 121 bool exit_event_begin(struct evsel *evse [all...] |
H A D | evlist.c | 17 #include "evsel.h" 58 #include <perf/evsel.h> 110 struct evsel *evsel; local 112 evlist__for_each_entry(evlist, evsel) 113 evsel__set_sample_id(evsel, /*can_sample_identifier=*/false); 140 struct evsel *first = evlist__first(evlist); 148 struct evsel *evsel; local 150 evlist__for_each_entry(evlist, evsel) 200 evlist__remove(struct evlist *evlist, struct evsel *evsel) argument 209 struct evsel *evsel, *temp, *leader = NULL; local 235 struct evsel *evsel = evlist__find_tracepoint_by_name(evlist, assocs[i].name); local 271 struct evsel *evsel = evlist__dummy_event(evlist); local 282 struct evsel *evsel = evlist__dummy_event(evlist); local 301 struct evsel *evsel = evsel__newtp_idx("sched", "sched_switch", 0); local 319 struct evsel *evsel, *n; local 362 struct evsel *evsel; local 375 struct evsel *evsel; local 389 struct evsel *evsel = evsel__newtp(sys, name); local 838 struct evsel *evsel = container_of(_evsel, struct evsel, core); local 1090 struct evsel *evsel; local 1123 struct evsel *evsel; local 1143 struct evsel *evsel; local 1236 struct evsel *evsel; local 1255 struct evsel *evsel; local 1310 evlist__set_selected(struct evlist *evlist, struct evsel *evsel) argument 1317 struct evsel *evsel; local 1381 struct evsel *evsel; local 1550 struct evsel *evsel = evlist__event2evsel(evlist, event); local 1571 struct evsel *evsel = evlist__event2evsel(evlist, event); local 1664 struct evsel *evsel, *n; local 1680 struct evsel *evsel; local 1692 struct evsel *evsel; local 1707 struct evsel *evsel; local 1725 struct evsel *evsel; local 1796 struct evsel *evsel; local 1821 evlist__reset_weak_group(struct evlist *evsel_list, struct evsel *evsel, bool close) argument 2086 struct evsel *evsel; local 2127 struct evsel *evsel; local 2437 struct evsel *evsel; local 2448 struct evsel *evsel; local 2467 struct evsel *leader, *evsel, *pos; local [all...] |
H A D | dlfilter.h | 13 struct evsel; 33 struct evsel *evsel; member in struct:dlfilter 61 struct evsel *evsel, 72 struct evsel *evsel, 79 return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, false); 85 struct evsel *evsel, 69 dlfilter__filter_event(struct dlfilter *d, union perf_event *event, struct perf_sample *sample, struct evsel *evsel, struct machine *machine, struct addr_location *al, struct addr_location *addr_al) argument 82 dlfilter__filter_event_early(struct dlfilter *d, union perf_event *event, struct perf_sample *sample, struct evsel *evsel, struct machine *machine, struct addr_location *al, struct addr_location *addr_al) argument [all...] |
H A D | evlist.h | 11 #include <internal/evsel.h> 14 #include "evsel.h" 67 struct evsel *selected; 100 void evlist__add(struct evlist *evlist, struct evsel *entry); 101 void evlist__remove(struct evlist *evlist, struct evsel *evsel); 115 int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs); 118 struct evsel *evlist__add_aux_dummy(struct evlist *evlist, bool system_wide); 119 static inline struct evsel *evlist__add_dummy_on_all_cpu 239 struct perf_evsel *evsel = perf_evlist__first(&evlist->core); local 246 struct perf_evsel *evsel = perf_evlist__last(&evlist->core); local 349 struct evsel *evsel; member in struct:evlist_cpu_iterator [all...] |
H A D | evsel_config.h | 12 * evsel::config_terms list head. 54 struct evsel; 56 struct evsel_config_term *__evsel__get_config_term(struct evsel *evsel, enum evsel_term_type type); 58 #define evsel__get_config_term(evsel, type) \ 59 __evsel__get_config_term(evsel, EVSEL__CONFIG_TERM_ ## type)
|
H A D | evswitch.c | 7 bool evswitch__discard(struct evswitch *evswitch, struct evsel *evsel) argument 10 if (evswitch->on != evsel) 22 if (evswitch->off != evsel)
|
H A D | metricgroup.h | 11 struct evsel; 18 * A node in a rblist keyed by the evsel. The global rblist of metric events 19 * generally exists in perf_stat_config. The evsel is looked up in the rblist 24 struct evsel *evsel; member in struct:metric_event 25 bool is_default; /* the metric evsel from the Default metricgroup */ 42 * One in a list of metric_expr associated with an evsel. The data is used to 62 struct evsel **metric_events; 70 struct evsel *evsel, [all...] |
/linux-master/tools/perf/arch/s390/util/ |
H A D | kvm-stat.c | 12 #include "../../util/evsel.h" 26 static void event_icpt_insn_get_key(struct evsel *evsel, argument 32 insn = evsel__intval(evsel, sample, "instruction"); 37 static void event_sigp_get_key(struct evsel *evsel, argument 41 key->key = evsel__intval(evsel, sample, "order_code"); 45 static void event_diag_get_key(struct evsel *evsel, argument 49 key->key = evsel__intval(evsel, sampl 53 event_icpt_prog_get_key(struct evsel *evsel, struct perf_sample *sample, struct event_key *key) argument [all...] |
/linux-master/tools/lib/perf/include/internal/ |
H A D | evlist.h | 8 #include <internal/evsel.h> 27 /** The union of all evsel cpu maps. */ 68 * @evsel: struct perf_evsel iterator 70 #define __perf_evlist__for_each_entry(list, evsel) \ 71 list_for_each_entry(evsel, list, node) 76 * @evsel: struct perf_evsel iterator 78 #define perf_evlist__for_each_entry(evlist, evsel) \ 79 __perf_evlist__for_each_entry(&(evlist)->entries, evsel) 84 * @evsel: struct evsel iterato [all...] |
H A D | evsel.h | 15 * Per fd, to map back from PERF_SAMPLE_ID to evsel, only used when there are 21 struct perf_evsel *evsel; member in struct:perf_sample_id 80 void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr, 82 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); 83 void perf_evsel__close_fd(struct perf_evsel *evsel); 84 void perf_evsel__free_fd(struct perf_evsel *evsel); 85 int perf_evsel__read_size(struct perf_evsel *evsel); 86 int perf_evsel__apply_filter(struct perf_evsel *evsel, const char *filter); 88 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads); 89 void perf_evsel__free_id(struct perf_evsel *evsel); [all...] |
/linux-master/tools/lib/perf/tests/ |
H A D | test-evsel.c | 9 #include <perf/evsel.h> 10 #include <internal/evsel.h> 23 struct perf_evsel *evsel; local 33 evsel = perf_evsel__new(&attr); 34 __T("failed to create evsel", evsel); 36 err = perf_evsel__open(evsel, cpus, NULL); 37 __T("failed to open evsel", err == 0); 42 perf_evsel__read(evsel, idx, 0, &counts); 43 __T("failed to read value for evsel", count 57 struct perf_evsel *evsel; local 89 struct perf_evsel *evsel; local 131 struct perf_evsel *evsel; local 197 struct perf_evsel *evsel; local [all...] |
H A D | test-evlist.c | 17 #include <perf/evsel.h> 23 #include <internal/evsel.h> 38 struct perf_evsel *evsel, *leader; local 55 evsel = leader = perf_evsel__new(&attr1); 56 __T("failed to create evsel1", evsel); 58 perf_evlist__add(evlist, evsel); 60 evsel = perf_evsel__new(&attr2); 61 __T("failed to create evsel2", evsel); 63 perf_evlist__add(evlist, evsel); 67 __T("failed to set leader", evsel 97 struct perf_evsel *evsel, *leader; local 152 struct perf_evsel *evsel, *leader; local 216 struct perf_evsel *evsel; local 327 struct perf_evsel *evsel; local 445 struct perf_evsel *evsel; local [all...] |
/linux-master/tools/perf/arch/x86/util/ |
H A D | auxtrace.c | 25 struct evsel *evsel; local 32 evlist__for_each_entry(evlist, evsel) { 33 if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type) 35 if (intel_bts_pmu && evsel->core.attr.type == intel_bts_pmu->type)
|
/linux-master/tools/lib/perf/Documentation/examples/ |
H A D | counting.c | 3 #include <perf/evsel.h> 22 struct perf_evsel *evsel; local 51 evsel = perf_evsel__new(&attr1); 52 if (!evsel) { 56 perf_evlist__add(evlist, evsel); 57 evsel = perf_evsel__new(&attr2); 58 if (!evsel) { 62 perf_evlist__add(evlist, evsel); 66 fprintf(stderr, "failed to open evsel\n"); 72 perf_evlist__for_each_evsel(evlist, evsel) { [all...] |
/linux-master/tools/perf/python/ |
H A D | twatch.py | 14 evsel = perf.evsel(type = perf.TYPE_SOFTWARE, 28 evsel.open(cpus = cpus, threads = threads); 30 evlist.add(evsel)
|