Symbol: evsel
drivers/perf/qcom_l3_pmu.c
197
u32 evsel = get_event_type(event);
drivers/perf/qcom_l3_pmu.c
215
writel_relaxed(EVSEL(evsel), l3pmu->regs + L3_HML3_PM_EVTYPE(idx));
drivers/perf/qcom_l3_pmu.c
278
u32 evsel = get_event_type(event);
drivers/perf/qcom_l3_pmu.c
289
writel_relaxed(EVSEL(evsel), l3pmu->regs + L3_HML3_PM_EVTYPE(idx));
tools/lib/perf/evlist.c
100
perf_cpu_map__put(evsel->cpus);
tools/lib/perf/evlist.c
101
evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
tools/lib/perf/evlist.c
110
if (evsel->reads_only_on_cpu_idx0 && perf_cpu_map__nr(evsel->cpus) > 0) {
tools/lib/perf/evlist.c
114
evsel->pmu_cpus,
tools/lib/perf/evlist.c
120
perf_cpu_map__put(evsel->cpus);
tools/lib/perf/evlist.c
121
evsel->cpus = perf_cpu_map__new_int(perf_cpu_map__cpu(srcs[i], 0).cpu);
tools/lib/perf/evlist.c
127
assert(!evsel->requires_cpu || !perf_cpu_map__has_any_cpu(evsel->cpus));
tools/lib/perf/evlist.c
133
if (perf_cpu_map__is_empty(evsel->cpus)) {
tools/lib/perf/evlist.c
134
struct perf_evsel *next = perf_evlist__next(evlist, evsel);
tools/lib/perf/evlist.c
136
perf_evlist__remove(evlist, evsel);
tools/lib/perf/evlist.c
145
if (evsel->system_wide) {
tools/lib/perf/evlist.c
146
perf_thread_map__put(evsel->threads);
tools/lib/perf/evlist.c
147
evsel->threads = perf_thread_map__new_dummy();
tools/lib/perf/evlist.c
149
perf_thread_map__put(evsel->threads);
tools/lib/perf/evlist.c
150
evsel->threads = perf_thread_map__get(evlist->threads);
tools/lib/perf/evlist.c
153
perf_cpu_map__merge(&evlist->all_cpus, evsel->cpus);
tools/lib/perf/evlist.c
166
struct perf_evsel *evsel, *n;
tools/lib/perf/evlist.c
168
list_for_each_entry_safe(evsel, n, &evlist->entries, node) {
tools/lib/perf/evlist.c
169
if ((!evsel->reads_only_on_cpu_idx0 && round == 0) ||
tools/lib/perf/evlist.c
170
(evsel->reads_only_on_cpu_idx0 && round == 1))
tools/lib/perf/evlist.c
171
__perf_evlist__propagate_maps(evlist, evsel);
tools/lib/perf/evlist.c
177
struct perf_evsel *evsel)
tools/lib/perf/evlist.c
179
evsel->idx = evlist->nr_entries;
tools/lib/perf/evlist.c
180
list_add_tail(&evsel->node, &evlist->entries);
tools/lib/perf/evlist.c
184
__perf_evlist__propagate_maps(evlist, evsel);
tools/lib/perf/evlist.c
188
struct perf_evsel *evsel)
tools/lib/perf/evlist.c
190
list_del_init(&evsel->node);
tools/lib/perf/evlist.c
285
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
288
perf_evlist__for_each_entry(evlist, evsel) {
tools/lib/perf/evlist.c
289
err = perf_evsel__open(evsel, evsel->cpus, evsel->threads);
tools/lib/perf/evlist.c
303
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
305
perf_evlist__for_each_entry_reverse(evlist, evsel)
tools/lib/perf/evlist.c
306
perf_evsel__close(evsel);
tools/lib/perf/evlist.c
311
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
313
perf_evlist__for_each_entry(evlist, evsel)
tools/lib/perf/evlist.c
314
perf_evsel__enable(evsel);
tools/lib/perf/evlist.c
319
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
321
perf_evlist__for_each_entry(evlist, evsel)
tools/lib/perf/evlist.c
322
perf_evsel__disable(evsel);
tools/lib/perf/evlist.c
335
struct perf_evsel *evsel,
tools/lib/perf/evlist.c
339
struct perf_sample_id *sid = SID(evsel, cpu_map_idx, thread);
tools/lib/perf/evlist.c
342
sid->evsel = evsel;
tools/lib/perf/evlist.c
356
struct perf_evsel *evsel,
tools/lib/perf/evlist.c
359
if (!SID(evsel, cpu_map_idx, thread))
tools/lib/perf/evlist.c
362
perf_evlist__id_hash(evlist, evsel, cpu_map_idx, thread, id);
tools/lib/perf/evlist.c
363
evsel->id[evsel->ids++] = id;
tools/lib/perf/evlist.c
367
struct perf_evsel *evsel,
tools/lib/perf/evlist.c
37
struct perf_evsel *evsel)
tools/lib/perf/evlist.c
375
if (!SID(evsel, cpu_map_idx, thread))
tools/lib/perf/evlist.c
39
if (perf_cpu_map__is_empty(evsel->cpus)) {
tools/lib/perf/evlist.c
394
if (!(evsel->attr.read_format & PERF_FORMAT_ID) ||
tools/lib/perf/evlist.c
398
if (evsel->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
tools/lib/perf/evlist.c
40
if (perf_cpu_map__is_empty(evsel->pmu_cpus)) {
tools/lib/perf/evlist.c
400
if (evsel->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
tools/lib/perf/evlist.c
406
perf_evlist__id_add(evlist, evsel, cpu_map_idx, thread, id);
tools/lib/perf/evlist.c
415
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
417
perf_evlist__for_each_entry(evlist, evsel) {
tools/lib/perf/evlist.c
418
if (evsel->system_wide)
tools/lib/perf/evlist.c
45
evsel->pmu_cpus = perf_cpu_map__new_online_cpus();
tools/lib/perf/evlist.c
47
if (evlist->has_user_cpus && !evsel->system_wide) {
tools/lib/perf/evlist.c
491
static void perf_evsel__set_sid_idx(struct perf_evsel *evsel, int idx, int cpu, int thread)
tools/lib/perf/evlist.c
493
struct perf_sample_id *sid = SID(evsel, cpu, thread);
tools/lib/perf/evlist.c
496
sid->cpu = perf_cpu_map__cpu(evsel->cpus, cpu);
tools/lib/perf/evlist.c
497
sid->tid = perf_thread_map__pid(evsel->threads, thread);
tools/lib/perf/evlist.c
52
evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
tools/lib/perf/evlist.c
545
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
548
perf_evlist__for_each_entry(evlist, evsel) {
tools/lib/perf/evlist.c
549
bool overwrite = evsel->attr.write_backward;
tools/lib/perf/evlist.c
554
if (evsel->system_wide && thread)
tools/lib/perf/evlist.c
557
cpu = perf_cpu_map__idx(evsel->cpus, evlist_cpu);
tools/lib/perf/evlist.c
573
fd = FD(evsel, cpu, thread);
tools/lib/perf/evlist.c
58
evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus);
tools/lib/perf/evlist.c
594
ops->idx(evlist, evsel, mp, idx);
tools/lib/perf/evlist.c
616
flgs = evsel->system_wide ? fdarray_flag__nonfilterable : fdarray_flag__default;
tools/lib/perf/evlist.c
622
if (evsel->attr.read_format & PERF_FORMAT_ID) {
tools/lib/perf/evlist.c
623
if (perf_evlist__id_add_fd(evlist, evsel, cpu, thread,
tools/lib/perf/evlist.c
626
perf_evsel__set_sid_idx(evsel, idx, cpu, thread);
tools/lib/perf/evlist.c
65
if (evsel->requires_cpu && perf_cpu_map__has_any_cpu(evsel->cpus)) {
tools/lib/perf/evlist.c
66
perf_cpu_map__put(evsel->cpus);
tools/lib/perf/evlist.c
67
evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus);
tools/lib/perf/evlist.c
728
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
737
perf_evlist__for_each_entry(evlist, evsel) {
tools/lib/perf/evlist.c
738
if ((evsel->attr.read_format & PERF_FORMAT_ID) &&
tools/lib/perf/evlist.c
739
evsel->sample_id == NULL &&
tools/lib/perf/evlist.c
74
if (evlist->has_user_cpus && !evsel->system_wide) {
tools/lib/perf/evlist.c
740
perf_evsel__alloc_id(evsel, evsel->fd->max_x, evsel->fd->max_y) < 0)
tools/lib/perf/evlist.c
76
if (!perf_cpu_map__equal(evsel->cpus, evlist->user_requested_cpus)) {
tools/lib/perf/evlist.c
77
perf_cpu_map__put(evsel->cpus);
tools/lib/perf/evlist.c
78
evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
tools/lib/perf/evlist.c
796
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
799
__perf_evlist__for_each_entry(list, evsel) {
tools/lib/perf/evlist.c
800
evsel->leader = leader;
tools/lib/perf/evlist.c
818
struct perf_evsel *evsel;
tools/lib/perf/evlist.c
821
perf_evlist__for_each_evsel(evlist, evsel) {
tools/lib/perf/evlist.c
827
if (evsel->leader == evsel && evsel->nr_members > 1)
tools/lib/perf/evlist.c
83
if (!perf_cpu_map__has_any_cpu(evsel->cpus) &&
tools/lib/perf/evlist.c
833
void perf_evlist__go_system_wide(struct perf_evlist *evlist, struct perf_evsel *evsel)
tools/lib/perf/evlist.c
835
if (!evsel->system_wide) {
tools/lib/perf/evlist.c
836
evsel->system_wide = true;
tools/lib/perf/evlist.c
838
__perf_evlist__propagate_maps(evlist, evsel);
tools/lib/perf/evlist.c
84
!perf_cpu_map__is_subset(evsel->pmu_cpus, evsel->cpus)) {
tools/lib/perf/evlist.c
85
struct perf_cpu_map *tmp = perf_cpu_map__intersect(evsel->pmu_cpus, evsel->cpus);
tools/lib/perf/evlist.c
87
perf_cpu_map__put(evsel->cpus);
tools/lib/perf/evlist.c
88
evsel->cpus = tmp;
tools/lib/perf/evlist.c
96
if (!evsel->system_wide &&
tools/lib/perf/evlist.c
97
!evsel->requires_cpu &&
tools/lib/perf/evlist.c
98
perf_cpu_map__equal(evsel->cpus, evsel->pmu_cpus) &&
tools/lib/perf/evsel.c
100
static int get_group_fd(struct perf_evsel *evsel, int cpu_map_idx, int thread, int *group_fd)
tools/lib/perf/evsel.c
102
struct perf_evsel *leader = evsel->leader;
tools/lib/perf/evsel.c
105
if (evsel == leader) {
tools/lib/perf/evsel.c
126
int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
tools/lib/perf/evsel.c
157
if (evsel->fd == NULL &&
tools/lib/perf/evsel.c
158
perf_evsel__alloc_fd(evsel, perf_cpu_map__nr(cpus), threads->nr) < 0)
tools/lib/perf/evsel.c
165
evsel_fd = FD(evsel, idx, thread);
tools/lib/perf/evsel.c
171
err = get_group_fd(evsel, idx, thread, &group_fd);
tools/lib/perf/evsel.c
175
fd = sys_perf_event_open(&evsel->attr,
tools/lib/perf/evsel.c
189
perf_evsel__close(evsel);
tools/lib/perf/evsel.c
194
static void perf_evsel__close_fd_cpu(struct perf_evsel *evsel, int cpu_map_idx)
tools/lib/perf/evsel.c
198
for (thread = 0; thread < xyarray__max_y(evsel->fd); ++thread) {
tools/lib/perf/evsel.c
199
int *fd = FD(evsel, cpu_map_idx, thread);
tools/lib/perf/evsel.c
208
void perf_evsel__close_fd(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
210
for (int idx = 0; idx < xyarray__max_x(evsel->fd); idx++)
tools/lib/perf/evsel.c
211
perf_evsel__close_fd_cpu(evsel, idx);
tools/lib/perf/evsel.c
214
void perf_evsel__free_fd(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
216
xyarray__delete(evsel->fd);
tools/lib/perf/evsel.c
217
evsel->fd = NULL;
tools/lib/perf/evsel.c
220
void perf_evsel__close(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
222
if (evsel->fd == NULL)
tools/lib/perf/evsel.c
225
perf_evsel__close_fd(evsel);
tools/lib/perf/evsel.c
226
perf_evsel__free_fd(evsel);
tools/lib/perf/evsel.c
229
void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx)
tools/lib/perf/evsel.c
23
void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr,
tools/lib/perf/evsel.c
231
if (evsel->fd == NULL)
tools/lib/perf/evsel.c
234
perf_evsel__close_fd_cpu(evsel, cpu_map_idx);
tools/lib/perf/evsel.c
237
void perf_evsel__munmap(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
241
if (evsel->fd == NULL || evsel->mmap == NULL)
tools/lib/perf/evsel.c
244
for (idx = 0; idx < xyarray__max_x(evsel->fd); idx++) {
tools/lib/perf/evsel.c
245
for (thread = 0; thread < xyarray__max_y(evsel->fd); thread++) {
tools/lib/perf/evsel.c
246
int *fd = FD(evsel, idx, thread);
tools/lib/perf/evsel.c
251
perf_mmap__munmap(MMAP(evsel, idx, thread));
tools/lib/perf/evsel.c
255
xyarray__delete(evsel->mmap);
tools/lib/perf/evsel.c
256
evsel->mmap = NULL;
tools/lib/perf/evsel.c
259
int perf_evsel__mmap(struct perf_evsel *evsel, int pages)
tools/lib/perf/evsel.c
26
INIT_LIST_HEAD(&evsel->node);
tools/lib/perf/evsel.c
267
if (evsel->fd == NULL || evsel->mmap)
tools/lib/perf/evsel.c
27
INIT_LIST_HEAD(&evsel->per_stream_periods);
tools/lib/perf/evsel.c
270
if (perf_evsel__alloc_mmap(evsel, xyarray__max_x(evsel->fd), xyarray__max_y(evsel->fd)) < 0)
tools/lib/perf/evsel.c
273
for (idx = 0; idx < xyarray__max_x(evsel->fd); idx++) {
tools/lib/perf/evsel.c
274
for (thread = 0; thread < xyarray__max_y(evsel->fd); thread++) {
tools/lib/perf/evsel.c
275
int *fd = FD(evsel, idx, thread);
tools/lib/perf/evsel.c
277
struct perf_cpu cpu = perf_cpu_map__cpu(evsel->cpus, idx);
tools/lib/perf/evsel.c
28
evsel->attr = *attr;
tools/lib/perf/evsel.c
282
map = MMAP(evsel, idx, thread);
tools/lib/perf/evsel.c
287
perf_evsel__munmap(evsel);
tools/lib/perf/evsel.c
29
evsel->idx = idx;
tools/lib/perf/evsel.c
296
void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread)
tools/lib/perf/evsel.c
298
int *fd = FD(evsel, cpu_map_idx, thread);
tools/lib/perf/evsel.c
30
evsel->leader = evsel;
tools/lib/perf/evsel.c
300
if (fd == NULL || *fd < 0 || MMAP(evsel, cpu_map_idx, thread) == NULL)
tools/lib/perf/evsel.c
303
return MMAP(evsel, cpu_map_idx, thread)->base;
tools/lib/perf/evsel.c
306
int perf_evsel__read_size(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
308
u64 read_format = evsel->attr.read_format;
tools/lib/perf/evsel.c
326
nr = evsel->nr_members;
tools/lib/perf/evsel.c
335
static int perf_evsel__read_group(struct perf_evsel *evsel, int cpu_map_idx,
tools/lib/perf/evsel.c
338
size_t size = perf_evsel__read_size(evsel);
tools/lib/perf/evsel.c
339
int *fd = FD(evsel, cpu_map_idx, thread);
tools/lib/perf/evsel.c
340
u64 read_format = evsel->attr.read_format;
tools/lib/perf/evsel.c
35
struct perf_evsel *evsel = zalloc(sizeof(*evsel));
tools/lib/perf/evsel.c
37
if (evsel != NULL)
tools/lib/perf/evsel.c
38
perf_evsel__init(evsel, attr, 0);
tools/lib/perf/evsel.c
380
static void perf_evsel__adjust_values(struct perf_evsel *evsel, u64 *buf,
tools/lib/perf/evsel.c
383
u64 read_format = evsel->attr.read_format;
tools/lib/perf/evsel.c
40
return evsel;
tools/lib/perf/evsel.c
401
int perf_evsel__read(struct perf_evsel *evsel, int cpu_map_idx, int thread,
tools/lib/perf/evsel.c
404
size_t size = perf_evsel__read_size(evsel);
tools/lib/perf/evsel.c
405
int *fd = FD(evsel, cpu_map_idx, thread);
tools/lib/perf/evsel.c
406
u64 read_format = evsel->attr.read_format;
tools/lib/perf/evsel.c
415
return perf_evsel__read_group(evsel, cpu_map_idx, thread, count);
tools/lib/perf/evsel.c
417
if (MMAP(evsel, cpu_map_idx, thread) &&
tools/lib/perf/evsel.c
419
!perf_mmap__read_self(MMAP(evsel, cpu_map_idx, thread), count))
tools/lib/perf/evsel.c
425
perf_evsel__adjust_values(evsel, buf.values, count);
tools/lib/perf/evsel.c
429
static int perf_evsel__ioctl(struct perf_evsel *evsel, int ioc, void *arg,
tools/lib/perf/evsel.c
43
void perf_evsel__exit(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
432
int *fd = FD(evsel, cpu_map_idx, thread);
tools/lib/perf/evsel.c
440
static int perf_evsel__run_ioctl(struct perf_evsel *evsel,
tools/lib/perf/evsel.c
446
for (thread = 0; thread < xyarray__max_y(evsel->fd); thread++) {
tools/lib/perf/evsel.c
447
int err = perf_evsel__ioctl(evsel, ioc, arg, cpu_map_idx, thread);
tools/lib/perf/evsel.c
45
assert(evsel->fd == NULL); /* If not fds were not closed. */
tools/lib/perf/evsel.c
456
int perf_evsel__enable_cpu(struct perf_evsel *evsel, int cpu_map_idx)
tools/lib/perf/evsel.c
458
return perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_ENABLE, NULL, cpu_map_idx);
tools/lib/perf/evsel.c
46
assert(evsel->mmap == NULL); /* If not munmap wasn't called. */
tools/lib/perf/evsel.c
461
int perf_evsel__enable_thread(struct perf_evsel *evsel, int thread)
tools/lib/perf/evsel.c
467
perf_cpu_map__for_each_cpu(cpu, idx, evsel->cpus) {
tools/lib/perf/evsel.c
468
err = perf_evsel__ioctl(evsel, PERF_EVENT_IOC_ENABLE, NULL, idx, thread);
tools/lib/perf/evsel.c
47
assert(evsel->sample_id == NULL); /* If not free_id wasn't called. */
tools/lib/perf/evsel.c
476
int perf_evsel__enable(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
48
perf_cpu_map__put(evsel->cpus);
tools/lib/perf/evsel.c
481
for (i = 0; i < xyarray__max_x(evsel->fd) && !err; i++)
tools/lib/perf/evsel.c
482
err = perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_ENABLE, NULL, i);
tools/lib/perf/evsel.c
486
int perf_evsel__disable_cpu(struct perf_evsel *evsel, int cpu_map_idx)
tools/lib/perf/evsel.c
488
return perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_DISABLE, NULL, cpu_map_idx);
tools/lib/perf/evsel.c
49
perf_cpu_map__put(evsel->pmu_cpus);
tools/lib/perf/evsel.c
491
int perf_evsel__disable(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
496
for (i = 0; i < xyarray__max_x(evsel->fd) && !err; i++)
tools/lib/perf/evsel.c
497
err = perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_DISABLE, NULL, i);
tools/lib/perf/evsel.c
50
perf_thread_map__put(evsel->threads);
tools/lib/perf/evsel.c
501
int perf_evsel__apply_filter(struct perf_evsel *evsel, const char *filter)
tools/lib/perf/evsel.c
505
for (unsigned int i = 0; i < perf_cpu_map__nr(evsel->cpus) && !err; i++) {
tools/lib/perf/evsel.c
506
err = perf_evsel__run_ioctl(evsel,
tools/lib/perf/evsel.c
513
struct perf_cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
515
return evsel->cpus;
tools/lib/perf/evsel.c
518
struct perf_thread_map *perf_evsel__threads(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
520
return evsel->threads;
tools/lib/perf/evsel.c
523
struct perf_event_attr *perf_evsel__attr(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
525
return &evsel->attr;
tools/lib/perf/evsel.c
528
int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads)
tools/lib/perf/evsel.c
53
void perf_evsel__delete(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
533
evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id));
tools/lib/perf/evsel.c
534
if (evsel->sample_id == NULL)
tools/lib/perf/evsel.c
537
evsel->id = zalloc(ncpus * nthreads * sizeof(u64));
tools/lib/perf/evsel.c
538
if (evsel->id == NULL) {
tools/lib/perf/evsel.c
539
xyarray__delete(evsel->sample_id);
tools/lib/perf/evsel.c
540
evsel->sample_id = NULL;
tools/lib/perf/evsel.c
547
void perf_evsel__free_id(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
55
perf_evsel__exit(evsel);
tools/lib/perf/evsel.c
551
xyarray__delete(evsel->sample_id);
tools/lib/perf/evsel.c
552
evsel->sample_id = NULL;
tools/lib/perf/evsel.c
553
zfree(&evsel->id);
tools/lib/perf/evsel.c
554
evsel->ids = 0;
tools/lib/perf/evsel.c
556
perf_evsel_for_each_per_thread_period_safe(evsel, n, pos) {
tools/lib/perf/evsel.c
56
free(evsel);
tools/lib/perf/evsel.c
562
bool perf_evsel__attr_has_per_thread_sample_period(struct perf_evsel *evsel)
tools/lib/perf/evsel.c
564
return (evsel->attr.sample_type & PERF_SAMPLE_READ) &&
tools/lib/perf/evsel.c
565
(evsel->attr.sample_type & PERF_SAMPLE_TID) &&
tools/lib/perf/evsel.c
566
evsel->attr.inherit;
tools/lib/perf/evsel.c
585
if (sid->evsel == NULL)
tools/lib/perf/evsel.c
595
list_add_tail(&res->node, &sid->evsel->per_stream_periods);
tools/lib/perf/evsel.c
65
int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads)
tools/lib/perf/evsel.c
67
evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int));
tools/lib/perf/evsel.c
69
if (evsel->fd) {
tools/lib/perf/evsel.c
74
int *fd = FD(evsel, idx, thread);
tools/lib/perf/evsel.c
82
return evsel->fd != NULL ? 0 : -ENOMEM;
tools/lib/perf/evsel.c
85
static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads)
tools/lib/perf/evsel.c
87
evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap));
tools/lib/perf/evsel.c
89
return evsel->mmap != NULL ? 0 : -ENOMEM;
tools/lib/perf/include/internal/evlist.h
103
#define __perf_evlist__for_each_entry_safe(list, tmp, evsel) \
tools/lib/perf/include/internal/evlist.h
104
list_for_each_entry_safe(evsel, tmp, list, node)
tools/lib/perf/include/internal/evlist.h
112
#define perf_evlist__for_each_entry_safe(evlist, tmp, evsel) \
tools/lib/perf/include/internal/evlist.h
113
__perf_evlist__for_each_entry_safe(&(evlist)->entries, tmp, evsel)
tools/lib/perf/include/internal/evlist.h
128
struct perf_evsel *evsel,
tools/lib/perf/include/internal/evlist.h
132
struct perf_evsel *evsel,
tools/lib/perf/include/internal/evlist.h
139
void perf_evlist__go_system_wide(struct perf_evlist *evlist, struct perf_evsel *evsel);
tools/lib/perf/include/internal/evlist.h
70
#define __perf_evlist__for_each_entry(list, evsel) \
tools/lib/perf/include/internal/evlist.h
71
list_for_each_entry(evsel, list, node)
tools/lib/perf/include/internal/evlist.h
78
#define perf_evlist__for_each_entry(evlist, evsel) \
tools/lib/perf/include/internal/evlist.h
79
__perf_evlist__for_each_entry(&(evlist)->entries, evsel)
tools/lib/perf/include/internal/evlist.h
86
#define __perf_evlist__for_each_entry_reverse(list, evsel) \
tools/lib/perf/include/internal/evlist.h
87
list_for_each_entry_reverse(evsel, list, node)
tools/lib/perf/include/internal/evlist.h
94
#define perf_evlist__for_each_entry_reverse(evlist, evsel) \
tools/lib/perf/include/internal/evlist.h
95
__perf_evlist__for_each_entry_reverse(&(evlist)->entries, evsel)
tools/lib/perf/include/internal/evsel.h
136
void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr,
tools/lib/perf/include/internal/evsel.h
138
void perf_evsel__exit(struct perf_evsel *evsel);
tools/lib/perf/include/internal/evsel.h
139
int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
tools/lib/perf/include/internal/evsel.h
140
void perf_evsel__close_fd(struct perf_evsel *evsel);
tools/lib/perf/include/internal/evsel.h
141
void perf_evsel__free_fd(struct perf_evsel *evsel);
tools/lib/perf/include/internal/evsel.h
142
int perf_evsel__read_size(struct perf_evsel *evsel);
tools/lib/perf/include/internal/evsel.h
143
int perf_evsel__apply_filter(struct perf_evsel *evsel, const char *filter);
tools/lib/perf/include/internal/evsel.h
145
int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
tools/lib/perf/include/internal/evsel.h
146
void perf_evsel__free_id(struct perf_evsel *evsel);
tools/lib/perf/include/internal/evsel.h
148
bool perf_evsel__attr_has_per_thread_sample_period(struct perf_evsel *evsel);
tools/lib/perf/include/internal/evsel.h
33
#define perf_evsel_for_each_per_thread_period_safe(evsel, tmp, item) \
tools/lib/perf/include/internal/evsel.h
34
list_for_each_entry_safe(item, tmp, &(evsel)->per_stream_periods, node)
tools/lib/perf/include/internal/evsel.h
47
struct perf_evsel *evsel;
tools/lib/perf/include/perf/evlist.h
14
struct perf_evsel *evsel);
tools/lib/perf/include/perf/evlist.h
16
struct perf_evsel *evsel);
tools/lib/perf/include/perf/evlist.h
20
struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
29
LIBPERF_API void perf_evsel__delete(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
30
LIBPERF_API int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
tools/lib/perf/include/perf/evsel.h
32
LIBPERF_API void perf_evsel__close(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
33
LIBPERF_API void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx);
tools/lib/perf/include/perf/evsel.h
34
LIBPERF_API int perf_evsel__mmap(struct perf_evsel *evsel, int pages);
tools/lib/perf/include/perf/evsel.h
35
LIBPERF_API void perf_evsel__munmap(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
36
LIBPERF_API void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread);
tools/lib/perf/include/perf/evsel.h
37
LIBPERF_API int perf_evsel__read(struct perf_evsel *evsel, int cpu_map_idx, int thread,
tools/lib/perf/include/perf/evsel.h
39
LIBPERF_API int perf_evsel__enable(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
40
LIBPERF_API int perf_evsel__enable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
tools/lib/perf/include/perf/evsel.h
41
LIBPERF_API int perf_evsel__enable_thread(struct perf_evsel *evsel, int thread);
tools/lib/perf/include/perf/evsel.h
42
LIBPERF_API int perf_evsel__disable(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
43
LIBPERF_API int perf_evsel__disable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
tools/lib/perf/include/perf/evsel.h
44
LIBPERF_API struct perf_cpu_map *perf_evsel__cpus(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
45
LIBPERF_API struct perf_thread_map *perf_evsel__threads(struct perf_evsel *evsel);
tools/lib/perf/include/perf/evsel.h
46
LIBPERF_API struct perf_event_attr *perf_evsel__attr(struct perf_evsel *evsel);
tools/lib/perf/tests/test-evlist.c
116
evsel = leader = perf_evsel__new(&attr1);
tools/lib/perf/tests/test-evlist.c
117
__T("failed to create evsel1", evsel);
tools/lib/perf/tests/test-evlist.c
119
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
121
evsel = perf_evsel__new(&attr2);
tools/lib/perf/tests/test-evlist.c
122
__T("failed to create evsel2", evsel);
tools/lib/perf/tests/test-evlist.c
124
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
128
__T("failed to set leader", evsel->leader == leader);
tools/lib/perf/tests/test-evlist.c
135
perf_evlist__for_each_evsel(evlist, evsel) {
tools/lib/perf/tests/test-evlist.c
136
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evlist.c
152
struct perf_evsel *evsel, *leader;
tools/lib/perf/tests/test-evlist.c
173
evsel = leader = perf_evsel__new(&attr1);
tools/lib/perf/tests/test-evlist.c
174
__T("failed to create evsel1", evsel);
tools/lib/perf/tests/test-evlist.c
176
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
178
evsel = perf_evsel__new(&attr2);
tools/lib/perf/tests/test-evlist.c
179
__T("failed to create evsel2", evsel);
tools/lib/perf/tests/test-evlist.c
181
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
185
__T("failed to set leader", evsel->leader == leader);
tools/lib/perf/tests/test-evlist.c
192
perf_evlist__for_each_evsel(evlist, evsel) {
tools/lib/perf/tests/test-evlist.c
193
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evlist.c
199
perf_evlist__for_each_evsel(evlist, evsel) {
tools/lib/perf/tests/test-evlist.c
200
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evlist.c
216
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evlist.c
272
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evlist.c
273
__T("failed to create evsel1", evsel);
tools/lib/perf/tests/test-evlist.c
274
__T("failed to set leader", evsel->leader == evsel);
tools/lib/perf/tests/test-evlist.c
276
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
327
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evlist.c
359
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evlist.c
360
__T("failed to create evsel1", evsel);
tools/lib/perf/tests/test-evlist.c
361
__T("failed to set leader", evsel->leader == evsel);
tools/lib/perf/tests/test-evlist.c
363
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
38
struct perf_evsel *evsel, *leader;
tools/lib/perf/tests/test-evlist.c
445
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evlist.c
465
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evlist.c
466
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evlist.c
468
err = perf_evsel__open(evsel, NULL, threads);
tools/lib/perf/tests/test-evlist.c
471
err = perf_evsel__enable(evsel);
tools/lib/perf/tests/test-evlist.c
479
perf_evsel__read(evsel, 0, 0, &expected_counts);
tools/lib/perf/tests/test-evlist.c
484
err = perf_evsel__disable(evsel);
tools/lib/perf/tests/test-evlist.c
487
perf_evsel__close(evsel);
tools/lib/perf/tests/test-evlist.c
488
perf_evsel__delete(evsel);
tools/lib/perf/tests/test-evlist.c
502
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evlist.c
503
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evlist.c
505
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
520
perf_evlist__for_each_evsel(evlist, evsel) {
tools/lib/perf/tests/test-evlist.c
521
perf_evsel__read(evsel, 0, 0, &counts[i]);
tools/lib/perf/tests/test-evlist.c
55
evsel = leader = perf_evsel__new(&attr1);
tools/lib/perf/tests/test-evlist.c
56
__T("failed to create evsel1", evsel);
tools/lib/perf/tests/test-evlist.c
58
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
60
evsel = perf_evsel__new(&attr2);
tools/lib/perf/tests/test-evlist.c
61
__T("failed to create evsel2", evsel);
tools/lib/perf/tests/test-evlist.c
63
perf_evlist__add(evlist, evsel);
tools/lib/perf/tests/test-evlist.c
67
__T("failed to set leader", evsel->leader == leader);
tools/lib/perf/tests/test-evlist.c
74
perf_evlist__for_each_evsel(evlist, evsel) {
tools/lib/perf/tests/test-evlist.c
75
cpus = perf_evsel__cpus(evsel);
tools/lib/perf/tests/test-evlist.c
80
perf_evsel__read(evsel, idx, 0, &counts);
tools/lib/perf/tests/test-evlist.c
97
struct perf_evsel *evsel, *leader;
tools/lib/perf/tests/test-evsel.c
102
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evsel.c
103
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evsel.c
105
err = perf_evsel__open(evsel, NULL, threads);
tools/lib/perf/tests/test-evsel.c
108
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
111
err = perf_evsel__enable(evsel);
tools/lib/perf/tests/test-evsel.c
114
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
117
err = perf_evsel__disable(evsel);
tools/lib/perf/tests/test-evsel.c
120
perf_evsel__close(evsel);
tools/lib/perf/tests/test-evsel.c
121
perf_evsel__delete(evsel);
tools/lib/perf/tests/test-evsel.c
131
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evsel.c
147
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evsel.c
148
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evsel.c
150
err = perf_evsel__open(evsel, NULL, threads);
tools/lib/perf/tests/test-evsel.c
153
err = perf_evsel__mmap(evsel, 0);
tools/lib/perf/tests/test-evsel.c
156
pc = perf_evsel__mmap_base(evsel, 0, 0);
tools/lib/perf/tests/test-evsel.c
165
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
174
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
179
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
187
perf_evsel__munmap(evsel);
tools/lib/perf/tests/test-evsel.c
188
perf_evsel__close(evsel);
tools/lib/perf/tests/test-evsel.c
189
perf_evsel__delete(evsel);
tools/lib/perf/tests/test-evsel.c
197
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evsel.c
202
evsel = perf_evsel__new(attr);
tools/lib/perf/tests/test-evsel.c
203
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evsel.c
206
err = perf_evsel__open(evsel, NULL, threads);
tools/lib/perf/tests/test-evsel.c
213
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
225
perf_evsel__close(evsel);
tools/lib/perf/tests/test-evsel.c
226
perf_evsel__delete(evsel);
tools/lib/perf/tests/test-evsel.c
23
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evsel.c
33
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evsel.c
34
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evsel.c
36
err = perf_evsel__open(evsel, cpus, NULL);
tools/lib/perf/tests/test-evsel.c
42
perf_evsel__read(evsel, idx, 0, &counts);
tools/lib/perf/tests/test-evsel.c
46
perf_evsel__close(evsel);
tools/lib/perf/tests/test-evsel.c
47
perf_evsel__delete(evsel);
tools/lib/perf/tests/test-evsel.c
57
struct perf_evsel *evsel;
tools/lib/perf/tests/test-evsel.c
69
evsel = perf_evsel__new(&attr);
tools/lib/perf/tests/test-evsel.c
70
__T("failed to create evsel", evsel);
tools/lib/perf/tests/test-evsel.c
72
err = perf_evsel__open(evsel, NULL, threads);
tools/lib/perf/tests/test-evsel.c
75
perf_evsel__read(evsel, 0, 0, &counts);
tools/lib/perf/tests/test-evsel.c
78
perf_evsel__close(evsel);
tools/lib/perf/tests/test-evsel.c
79
perf_evsel__delete(evsel);
tools/lib/perf/tests/test-evsel.c
89
struct perf_evsel *evsel;
tools/perf/arch/arm/util/auxtrace.c
104
int pmu_nr, struct evsel *evsel)
tools/perf/arch/arm/util/auxtrace.c
112
if (evsel->core.attr.type == pmus[i]->type)
tools/perf/arch/arm/util/auxtrace.c
125
struct evsel *evsel;
tools/perf/arch/arm/util/auxtrace.c
140
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/arm/util/auxtrace.c
142
found_etm = find_pmu_for_event(&cs_etm_pmu, 1, evsel);
tools/perf/arch/arm/util/auxtrace.c
145
found_spe = find_pmu_for_event(arm_spe_pmus, nr_spes, evsel);
tools/perf/arch/arm/util/auxtrace.c
148
found_ptt = find_pmu_for_event(hisi_ptt_pmus, nr_ptts, evsel);
tools/perf/arch/arm/util/cs-etm.c
149
static int cs_etm_validate_timestamp(struct perf_pmu *cs_etm_pmu, struct evsel *evsel,
tools/perf/arch/arm/util/cs-etm.c
156
evsel__get_config_val(evsel, "timestamp", &val);
tools/perf/arch/arm/util/cs-etm.c
200
struct evsel *evsel)
tools/perf/arch/arm/util/cs-etm.c
204
struct perf_cpu_map *event_cpus = evsel->evlist->core.user_requested_cpus;
tools/perf/arch/arm/util/cs-etm.c
229
err = cs_etm_validate_context_id(cs_etm_pmu, evsel, cpu);
tools/perf/arch/arm/util/cs-etm.c
233
err = cs_etm_validate_timestamp(cs_etm_pmu, evsel, cpu);
tools/perf/arch/arm/util/cs-etm.c
271
struct evsel *evsel)
tools/perf/arch/arm/util/cs-etm.c
278
list_for_each_entry(term, &evsel->config_terms, list) {
tools/perf/arch/arm/util/cs-etm.c
291
sink, evsel__name(evsel));
tools/perf/arch/arm/util/cs-etm.c
294
sink, evsel__name(evsel), errno,
tools/perf/arch/arm/util/cs-etm.c
299
evsel__set_config_if_unset(evsel, "sinkid", hash);
tools/perf/arch/arm/util/cs-etm.c
306
static struct evsel *cs_etm_get_evsel(struct evlist *evlist,
tools/perf/arch/arm/util/cs-etm.c
309
struct evsel *evsel;
tools/perf/arch/arm/util/cs-etm.c
311
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/arm/util/cs-etm.c
312
if (evsel->core.attr.type == cs_etm_pmu->type)
tools/perf/arch/arm/util/cs-etm.c
313
return evsel;
tools/perf/arch/arm/util/cs-etm.c
327
struct evsel *evsel, *cs_etm_evsel = NULL;
tools/perf/arch/arm/util/cs-etm.c
332
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/arm/util/cs-etm.c
333
if (evsel->core.attr.type == cs_etm_pmu->type) {
tools/perf/arch/arm/util/cs-etm.c
339
cs_etm_evsel = evsel;
tools/perf/arch/arm/util/cs-etm.c
474
evsel = evlist__last(evlist);
tools/perf/arch/arm/util/cs-etm.c
475
evlist__set_tracking_event(evlist, evsel);
tools/perf/arch/arm/util/cs-etm.c
476
evsel->core.attr.freq = 0;
tools/perf/arch/arm/util/cs-etm.c
477
evsel->core.attr.sample_period = 1;
tools/perf/arch/arm/util/cs-etm.c
481
evsel__set_sample_bit(evsel, TIME);
tools/perf/arch/arm/util/cs-etm.c
493
struct evsel *evsel = cs_etm_get_evsel(ptr->evlist, cs_etm_pmu);
tools/perf/arch/arm/util/cs-etm.c
497
if (!evsel)
tools/perf/arch/arm/util/cs-etm.c
505
if (!evsel__get_config_val(evsel, "cycacc", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
507
if (!evsel__get_config_val(evsel, "timestamp", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
509
if (!evsel__get_config_val(evsel, "retstack", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
521
struct evsel *evsel = cs_etm_get_evsel(ptr->evlist, cs_etm_pmu);
tools/perf/arch/arm/util/cs-etm.c
524
if (!evsel)
tools/perf/arch/arm/util/cs-etm.c
532
if (!evsel__get_config_val(evsel, "cycacc", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
534
if (!evsel__get_config_val(evsel, "contextid1", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
536
if (!evsel__get_config_val(evsel, "timestamp", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
538
if (!evsel__get_config_val(evsel, "retstack", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
540
if (!evsel__get_config_val(evsel, "contextid2", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
542
if (!evsel__get_config_val(evsel, "branch_broadcast", &val) && val)
tools/perf/arch/arm/util/cs-etm.c
846
struct evsel *evsel = cs_etm_get_evsel(ptr->evlist, ptr->cs_etm_pmu);
tools/perf/arch/arm/util/cs-etm.c
848
if (evsel)
tools/perf/arch/arm/util/cs-etm.c
849
return evsel__disable(evsel);
tools/perf/arch/arm/util/cs-etm.c
858
struct evsel *evsel;
tools/perf/arch/arm/util/cs-etm.c
860
evlist__for_each_entry(ptr->evlist, evsel) {
tools/perf/arch/arm/util/cs-etm.c
861
if (evsel->core.attr.type == ptr->cs_etm_pmu->type)
tools/perf/arch/arm/util/cs-etm.c
862
return evsel__enable(evsel);
tools/perf/arch/arm/util/cs-etm.c
90
static int cs_etm_validate_context_id(struct perf_pmu *cs_etm_pmu, struct evsel *evsel,
tools/perf/arch/arm/util/cs-etm.c
97
evsel__get_config_val(evsel, "contextid", &ctxt);
tools/perf/arch/arm/util/cs-etm.c
98
evsel__get_config_val(evsel, "contextid1", &ctxt1);
tools/perf/arch/arm/util/cs-etm.c
99
evsel__get_config_val(evsel, "contextid2", &ctxt2);
tools/perf/arch/arm64/util/arm-spe.c
258
static void arm_spe_setup_evsel(struct evsel *evsel, struct perf_cpu_map *cpus)
tools/perf/arch/arm64/util/arm-spe.c
262
evsel->core.attr.freq = 0;
tools/perf/arch/arm64/util/arm-spe.c
263
evsel->core.attr.sample_period = arm_spe_pmu__sample_period(evsel->pmu);
tools/perf/arch/arm64/util/arm-spe.c
264
evsel->needs_auxtrace_mmap = true;
tools/perf/arch/arm64/util/arm-spe.c
270
evlist__to_front(evsel->evlist, evsel);
tools/perf/arch/arm64/util/arm-spe.c
277
evsel__set_sample_bit(evsel, CPU);
tools/perf/arch/arm64/util/arm-spe.c
278
evsel__set_config_if_unset(evsel, "ts_enable", 1);
tools/perf/arch/arm64/util/arm-spe.c
285
evsel__set_sample_bit(evsel, DATA_SRC);
tools/perf/arch/arm64/util/arm-spe.c
293
if (!evsel__get_config_val(evsel, "pa_enable", &pa_enable_bit))
tools/perf/arch/arm64/util/arm-spe.c
295
evsel__set_sample_bit(evsel, PHYS_ADDR);
tools/perf/arch/arm64/util/arm-spe.c
365
struct evsel *tracking_evsel;
tools/perf/arch/arm64/util/arm-spe.c
398
struct evsel *evsel, *tmp;
tools/perf/arch/arm64/util/arm-spe.c
406
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/arm64/util/arm-spe.c
407
if (evsel__is_aux_event(evsel)) {
tools/perf/arch/arm64/util/arm-spe.c
408
if (!strstarts(evsel->pmu->name, ARM_SPE_PMU_NAME)) {
tools/perf/arch/arm64/util/arm-spe.c
410
evsel->pmu->name);
tools/perf/arch/arm64/util/arm-spe.c
416
arm_spe_is_set_freq(evsel)) {
tools/perf/arch/arm64/util/arm-spe.c
419
evsel->pmu->name);
tools/perf/arch/arm64/util/arm-spe.c
428
evlist__for_each_entry_safe(evlist, tmp, evsel) {
tools/perf/arch/arm64/util/arm-spe.c
429
if (evsel__is_aux_event(evsel)) {
tools/perf/arch/arm64/util/arm-spe.c
430
arm_spe_setup_evsel(evsel, cpus);
tools/perf/arch/arm64/util/arm-spe.c
431
if (evsel__config_exists(evsel, "discard") &&
tools/perf/arch/arm64/util/arm-spe.c
432
!evsel__get_config_val(evsel, "discard", &discard_bit))
tools/perf/arch/arm64/util/arm-spe.c
45
static bool arm_spe_is_set_freq(struct evsel *evsel)
tools/perf/arch/arm64/util/arm-spe.c
470
struct evsel *evsel;
tools/perf/arch/arm64/util/arm-spe.c
473
evlist__for_each_entry(ptr->evlist, evsel) {
tools/perf/arch/arm64/util/arm-spe.c
474
if (evsel__is_aux_event(evsel)) {
tools/perf/arch/arm64/util/arm-spe.c
475
ret = evsel__disable(evsel);
tools/perf/arch/arm64/util/arm-spe.c
487
struct evsel *evsel;
tools/perf/arch/arm64/util/arm-spe.c
49
list_for_each_entry(term, &evsel->config_terms, list) {
tools/perf/arch/arm64/util/arm-spe.c
490
evlist__for_each_entry(ptr->evlist, evsel) {
tools/perf/arch/arm64/util/arm-spe.c
491
if (evsel__is_aux_event(evsel)) {
tools/perf/arch/arm64/util/arm-spe.c
492
ret = evsel__enable(evsel);
tools/perf/arch/arm64/util/hisi-ptt.c
104
struct evsel *evsel, *hisi_ptt_evsel = NULL;
tools/perf/arch/arm64/util/hisi-ptt.c
105
struct evsel *tracking_evsel;
tools/perf/arch/arm64/util/hisi-ptt.c
109
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/arm64/util/hisi-ptt.c
110
if (evsel->core.attr.type == hisi_ptt_pmu->type) {
tools/perf/arch/arm64/util/hisi-ptt.c
115
evsel->core.attr.freq = 0;
tools/perf/arch/arm64/util/hisi-ptt.c
116
evsel->core.attr.sample_period = 1;
tools/perf/arch/arm64/util/hisi-ptt.c
117
evsel->needs_auxtrace_mmap = true;
tools/perf/arch/arm64/util/hisi-ptt.c
118
hisi_ptt_evsel = evsel;
tools/perf/arch/powerpc/util/auxtrace.c
71
struct evsel *pos;
tools/perf/arch/powerpc/util/evsel.c
5
void arch_evsel__set_sample_weight(struct evsel *evsel)
tools/perf/arch/powerpc/util/evsel.c
7
evsel__set_sample_bit(evsel, WEIGHT_STRUCT);
tools/perf/arch/s390/util/auxtrace.c
92
struct evsel *pos;
tools/perf/arch/x86/tests/hybrid.c
10
static bool test_config(const struct evsel *evsel, __u64 expected_config)
tools/perf/arch/x86/tests/hybrid.c
100
TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel);
tools/perf/arch/x86/tests/hybrid.c
102
evsel = evsel__next(evsel);
tools/perf/arch/x86/tests/hybrid.c
103
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
104
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
105
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_INSTRUCTIONS));
tools/perf/arch/x86/tests/hybrid.c
106
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
107
TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user);
tools/perf/arch/x86/tests/hybrid.c
108
TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel);
tools/perf/arch/x86/tests/hybrid.c
114
struct perf_evsel *evsel;
tools/perf/arch/x86/tests/hybrid.c
116
perf_evlist__for_each_evsel(&evlist->core, evsel) {
tools/perf/arch/x86/tests/hybrid.c
117
struct perf_pmu *pmu = perf_pmus__find_by_type(evsel->attr.type);
tools/perf/arch/x86/tests/hybrid.c
12
return (evsel->core.attr.config & PERF_HW_EVENT_MASK) == expected_config;
tools/perf/arch/x86/tests/hybrid.c
121
TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, 0x1a));
tools/perf/arch/x86/tests/hybrid.c
128
struct evsel *evsel = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
131
TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
132
TEST_ASSERT_VAL("wrong config", test_config(evsel, 0x1a));
tools/perf/arch/x86/tests/hybrid.c
138
struct evsel *evsel = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
141
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HW_CACHE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
142
TEST_ASSERT_VAL("wrong config", 0x2 == (evsel->core.attr.config & 0xffffffff));
tools/perf/arch/x86/tests/hybrid.c
149
struct evsel *evsel = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
15
static bool test_perf_config(const struct perf_evsel *evsel, __u64 expected_config)
tools/perf/arch/x86/tests/hybrid.c
152
TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
153
TEST_ASSERT_VAL("wrong config", 10 == evsel->core.attr.config);
tools/perf/arch/x86/tests/hybrid.c
154
TEST_ASSERT_VAL("wrong config1", 1 == evsel->core.attr.config1);
tools/perf/arch/x86/tests/hybrid.c
155
TEST_ASSERT_VAL("wrong config2", 3 == evsel->core.attr.config2);
tools/perf/arch/x86/tests/hybrid.c
156
TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3);
tools/perf/arch/x86/tests/hybrid.c
161
TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period);
tools/perf/arch/x86/tests/hybrid.c
168
struct evsel *evsel, *leader;
tools/perf/arch/x86/tests/hybrid.c
17
return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config;
tools/perf/arch/x86/tests/hybrid.c
170
evsel = leader = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
172
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
173
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
174
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES));
tools/perf/arch/x86/tests/hybrid.c
175
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
177
evsel = evsel__next(evsel);
tools/perf/arch/x86/tests/hybrid.c
178
TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
179
TEST_ASSERT_VAL("wrong config", evsel->core.attr.config == 0x3c);
tools/perf/arch/x86/tests/hybrid.c
180
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
20
static bool test_hybrid_type(const struct evsel *evsel, __u64 expected_config)
tools/perf/arch/x86/tests/hybrid.c
22
return (evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT) == expected_config;
tools/perf/arch/x86/tests/hybrid.c
27
struct evsel *evsel = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
30
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
31
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
32
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES));
tools/perf/arch/x86/tests/hybrid.c
38
struct evsel *evsel, *leader;
tools/perf/arch/x86/tests/hybrid.c
40
evsel = leader = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
42
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
43
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
44
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES));
tools/perf/arch/x86/tests/hybrid.c
45
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
47
evsel = evsel__next(evsel);
tools/perf/arch/x86/tests/hybrid.c
48
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
49
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
50
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_INSTRUCTIONS));
tools/perf/arch/x86/tests/hybrid.c
51
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
57
struct evsel *evsel, *leader;
tools/perf/arch/x86/tests/hybrid.c
59
evsel = leader = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
61
TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
62
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
64
evsel = evsel__next(evsel);
tools/perf/arch/x86/tests/hybrid.c
65
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
66
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
67
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES));
tools/perf/arch/x86/tests/hybrid.c
68
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
74
struct evsel *evsel, *leader;
tools/perf/arch/x86/tests/hybrid.c
76
evsel = leader = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
78
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
79
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
80
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES));
tools/perf/arch/x86/tests/hybrid.c
81
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
83
evsel = evsel__next(evsel);
tools/perf/arch/x86/tests/hybrid.c
84
TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
85
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
91
struct evsel *evsel, *leader;
tools/perf/arch/x86/tests/hybrid.c
93
evsel = leader = evlist__first(evlist);
tools/perf/arch/x86/tests/hybrid.c
95
TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
tools/perf/arch/x86/tests/hybrid.c
96
TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
tools/perf/arch/x86/tests/hybrid.c
97
TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES));
tools/perf/arch/x86/tests/hybrid.c
98
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/arch/x86/tests/hybrid.c
99
TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user);
tools/perf/arch/x86/tests/topdown.c
102
struct evsel *evsel;
tools/perf/arch/x86/tests/topdown.c
117
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/tests/topdown.c
118
if (!evsel__is_group_leader(evsel))
tools/perf/arch/x86/tests/topdown.c
121
if (strstr(evsel__name(evsel), "slots")) {
tools/perf/arch/x86/tests/topdown.c
127
CHECK_EQUAL(evsel->core.nr_members, expected_slots_group_size,
tools/perf/arch/x86/tests/topdown.c
130
struct evsel *next = evsel__next(evsel);
tools/perf/arch/x86/tests/topdown.c
131
struct evsel *next2 = evsel__next(next);
tools/perf/arch/x86/tests/topdown.c
138
struct evsel *next = evsel__next(evsel);
tools/perf/arch/x86/tests/topdown.c
143
} else if (strstr(evsel__name(evsel), "instructions")) {
tools/perf/arch/x86/tests/topdown.c
144
CHECK_EQUAL(evsel->core.nr_members, expected_instructions_group_size,
tools/perf/arch/x86/tests/topdown.c
159
struct evsel *next = evsel__next(evsel);
tools/perf/arch/x86/tests/topdown.c
164
} else if (strstr(evsel__name(evsel), "topdown-retiring")) {
tools/perf/arch/x86/tests/topdown.c
169
CHECK_EQUAL(evsel->core.nr_members, 1, "topdown-retiring group size");
tools/perf/arch/x86/tests/topdown.c
17
struct evsel *evsel;
tools/perf/arch/x86/tests/topdown.c
170
} else if (strstr(evsel__name(evsel), "cycles")) {
tools/perf/arch/x86/tests/topdown.c
171
CHECK_EQUAL(evsel->core.nr_members, 1, "cycles group size");
tools/perf/arch/x86/tests/topdown.c
30
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/tests/topdown.c
32
bool p_core_pmu = evsel->pmu->type == PERF_TYPE_RAW;
tools/perf/arch/x86/tests/topdown.c
33
const char *name = evsel__name(evsel);
tools/perf/arch/x86/tests/topdown.c
41
if (arch_is_topdown_slots(evsel) || arch_is_topdown_metrics(evsel))
tools/perf/arch/x86/tests/topdown.c
44
if (arch_is_topdown_slots(evsel) != p_core_pmu ||
tools/perf/arch/x86/tests/topdown.c
45
arch_is_topdown_metrics(evsel))
tools/perf/arch/x86/tests/topdown.c
48
if (arch_is_topdown_slots(evsel) ||
tools/perf/arch/x86/tests/topdown.c
49
arch_is_topdown_metrics(evsel) != p_core_pmu)
tools/perf/arch/x86/tests/topdown.c
51
} else if (arch_is_topdown_slots(evsel) || arch_is_topdown_metrics(evsel)) {
tools/perf/arch/x86/tests/topdown.c
55
pr_debug("Broken topdown information for '%s'\n", evsel__name(evsel));
tools/perf/arch/x86/util/auxtrace.c
25
struct evsel *evsel;
tools/perf/arch/x86/util/auxtrace.c
32
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/auxtrace.c
33
if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type)
tools/perf/arch/x86/util/auxtrace.c
35
if (intel_bts_pmu && evsel->core.attr.type == intel_bts_pmu->type)
tools/perf/arch/x86/util/evlist.c
8
int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs)
tools/perf/arch/x86/util/evlist.c
87
struct evsel *pos, *metric_event = NULL;
tools/perf/arch/x86/util/evsel.c
118
evsel_idx = evsel__group_idx(evsel);
tools/perf/arch/x86/util/evsel.c
133
void arch__post_evsel_config(struct evsel *evsel, struct perf_event_attr *attr)
tools/perf/arch/x86/util/evsel.c
141
evsel_pmu = evsel__find_pmu(evsel);
tools/perf/arch/x86/util/evsel.c
161
static int amd_evsel__open_strerror(struct evsel *evsel, char *msg, size_t size)
tools/perf/arch/x86/util/evsel.c
165
if (evsel->core.attr.precise_ip == 0)
tools/perf/arch/x86/util/evsel.c
168
pmu = evsel__find_pmu(evsel);
tools/perf/arch/x86/util/evsel.c
173
if (evsel->core.attr.exclude_kernel || evsel->core.attr.exclude_user ||
tools/perf/arch/x86/util/evsel.c
174
evsel->core.attr.exclude_hv || evsel->core.attr.exclude_idle ||
tools/perf/arch/x86/util/evsel.c
175
evsel->core.attr.exclude_host || evsel->core.attr.exclude_guest) {
tools/perf/arch/x86/util/evsel.c
182
static int intel_evsel__open_strerror(struct evsel *evsel, int err, char *msg, size_t size)
tools/perf/arch/x86/util/evsel.c
193
if (arch_is_topdown_slots(evsel)) {
tools/perf/arch/x86/util/evsel.c
194
if (!evsel__is_group_leader(evsel)) {
tools/perf/arch/x86/util/evsel.c
195
evlist__uniquify_evsel_names(evsel->evlist, &stat_config);
tools/perf/arch/x86/util/evsel.c
196
evlist__format_evsels(evsel->evlist, &sb, 2048);
tools/perf/arch/x86/util/evsel.c
202
} else if (arch_is_topdown_metrics(evsel)) {
tools/perf/arch/x86/util/evsel.c
203
struct evsel *pos;
tools/perf/arch/x86/util/evsel.c
205
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/arch/x86/util/evsel.c
206
if (pos == evsel || !arch_is_topdown_metrics(pos))
tools/perf/arch/x86/util/evsel.c
209
if (pos->core.attr.config != evsel->core.attr.config)
tools/perf/arch/x86/util/evsel.c
212
evlist__uniquify_evsel_names(evsel->evlist, &stat_config);
tools/perf/arch/x86/util/evsel.c
213
evlist__format_evsels(evsel->evlist, &sb, 2048);
tools/perf/arch/x86/util/evsel.c
216
evsel__name(evsel), sb.buf);
tools/perf/arch/x86/util/evsel.c
22
void arch_evsel__set_sample_weight(struct evsel *evsel)
tools/perf/arch/x86/util/evsel.c
224
int arch_evsel__open_strerror(struct evsel *evsel, int err, char *msg, size_t size)
tools/perf/arch/x86/util/evsel.c
227
? amd_evsel__open_strerror(evsel, msg, size)
tools/perf/arch/x86/util/evsel.c
228
: intel_evsel__open_strerror(evsel, err, msg, size);
tools/perf/arch/x86/util/evsel.c
24
evsel__set_sample_bit(evsel, WEIGHT_STRUCT);
tools/perf/arch/x86/util/evsel.c
28
bool evsel__sys_has_perf_metrics(const struct evsel *evsel)
tools/perf/arch/x86/util/evsel.c
43
pmu = evsel__find_pmu(evsel);
tools/perf/arch/x86/util/evsel.c
47
bool arch_evsel__must_be_in_group(const struct evsel *evsel)
tools/perf/arch/x86/util/evsel.c
49
if (!evsel__sys_has_perf_metrics(evsel))
tools/perf/arch/x86/util/evsel.c
52
return arch_is_topdown_metrics(evsel) || arch_is_topdown_slots(evsel);
tools/perf/arch/x86/util/evsel.c
55
int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/arch/x86/util/evsel.c
57
u64 event = evsel->core.attr.config & PERF_HW_EVENT_MASK;
tools/perf/arch/x86/util/evsel.c
58
u64 pmu = evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT;
tools/perf/arch/x86/util/evsel.c
71
evsel->pmu ? evsel->pmu->name : "cpu",
tools/perf/arch/x86/util/evsel.c
75
void arch_evsel__apply_ratio_to_prev(struct evsel *evsel,
tools/perf/arch/x86/util/evsel.c
79
struct evsel *evsel_prev = NULL;
tools/perf/arch/x86/util/evsel.c
84
if (!perf_pmu__has_format(evsel->pmu, name)) {
tools/perf/arch/x86/util/evsel.c
85
pr_err("'%s' does not have acr_mask format support\n", evsel->pmu->name);
tools/perf/arch/x86/util/evsel.c
88
if (perf_pmu__format_type(evsel->pmu, name) !=
tools/perf/arch/x86/util/evsel.c
90
pr_err("'%s' does not have config2 format support\n", evsel->pmu->name);
tools/perf/arch/x86/util/evsel.c
94
evsel_prev = evsel__prev(evsel);
tools/perf/arch/x86/util/evsel.h
5
bool evsel__sys_has_perf_metrics(const struct evsel *evsel);
tools/perf/arch/x86/util/intel-bts.c
116
struct evsel *evsel, *intel_bts_evsel = NULL;
tools/perf/arch/x86/util/intel-bts.c
128
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/intel-bts.c
129
if (evsel->core.attr.type == intel_bts_pmu->type) {
tools/perf/arch/x86/util/intel-bts.c
134
evsel->core.attr.freq = 0;
tools/perf/arch/x86/util/intel-bts.c
135
evsel->core.attr.sample_period = 1;
tools/perf/arch/x86/util/intel-bts.c
136
evsel->needs_auxtrace_mmap = true;
tools/perf/arch/x86/util/intel-bts.c
137
intel_bts_evsel = evsel;
tools/perf/arch/x86/util/intel-bts.c
237
struct evsel *tracking_evsel;
tools/perf/arch/x86/util/intel-bts.c
330
struct evsel *evsel;
tools/perf/arch/x86/util/intel-bts.c
332
evlist__for_each_entry(btsr->evlist, evsel) {
tools/perf/arch/x86/util/intel-bts.c
333
if (evsel->core.attr.type == btsr->intel_bts_pmu->type)
tools/perf/arch/x86/util/intel-bts.c
334
return evsel__disable(evsel);
tools/perf/arch/x86/util/intel-bts.c
343
struct evsel *evsel;
tools/perf/arch/x86/util/intel-bts.c
345
evlist__for_each_entry(btsr->evlist, evsel) {
tools/perf/arch/x86/util/intel-bts.c
346
if (evsel->core.attr.type == btsr->intel_bts_pmu->type)
tools/perf/arch/x86/util/intel-bts.c
347
return evsel__enable(evsel);
tools/perf/arch/x86/util/intel-pt.c
122
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
131
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/intel-pt.c
132
if (evsel->core.attr.type == intel_pt_pmu->type) {
tools/perf/arch/x86/util/intel-pt.c
133
*res = intel_pt_masked_bits(mask, evsel->core.attr.config);
tools/perf/arch/x86/util/intel-pt.c
282
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
284
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/intel-pt.c
285
if (evsel->core.attr.type == intel_pt_pmu->type)
tools/perf/arch/x86/util/intel-pt.c
286
return evsel->filter;
tools/perf/arch/x86/util/intel-pt.c
418
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
424
evsel = evlist__add_sched_switch(evlist, true);
tools/perf/arch/x86/util/intel-pt.c
425
if (IS_ERR(evsel)) {
tools/perf/arch/x86/util/intel-pt.c
426
err = PTR_ERR(evsel);
tools/perf/arch/x86/util/intel-pt.c
432
evsel->immediate = true;
tools/perf/arch/x86/util/intel-pt.c
535
struct evsel *evsel)
tools/perf/arch/x86/util/intel-pt.c
540
if (!evsel)
tools/perf/arch/x86/util/intel-pt.c
552
!(evsel->core.attr.config & 1)) {
tools/perf/arch/x86/util/intel-pt.c
554
evsel->core.attr.config |= 1;
tools/perf/arch/x86/util/intel-pt.c
559
evsel->core.attr.config);
tools/perf/arch/x86/util/intel-pt.c
565
evsel->core.attr.config);
tools/perf/arch/x86/util/intel-pt.c
571
evsel->core.attr.config);
tools/perf/arch/x86/util/intel-pt.c
581
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
583
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/intel-pt.c
584
size_t sz = evsel->core.attr.aux_sample_size;
tools/perf/arch/x86/util/intel-pt.c
601
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
604
evlist__for_each_entry(evlist, evsel)
tools/perf/arch/x86/util/intel-pt.c
605
aux_output_cnt += !!evsel->core.attr.aux_output;
tools/perf/arch/x86/util/intel-pt.c
623
struct evsel *evsel, *intel_pt_evsel = NULL;
tools/perf/arch/x86/util/intel-pt.c
632
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/intel-pt.c
633
if (evsel->core.attr.type == intel_pt_pmu->type) {
tools/perf/arch/x86/util/intel-pt.c
638
evsel->core.attr.freq = 0;
tools/perf/arch/x86/util/intel-pt.c
639
evsel->core.attr.sample_period = 1;
tools/perf/arch/x86/util/intel-pt.c
640
evsel->core.attr.exclude_guest = intel_pt_exclude_guest();
tools/perf/arch/x86/util/intel-pt.c
641
evsel->no_aux_samples = true;
tools/perf/arch/x86/util/intel-pt.c
642
evsel->needs_auxtrace_mmap = true;
tools/perf/arch/x86/util/intel-pt.c
643
intel_pt_evsel = evsel;
tools/perf/arch/x86/util/intel-pt.c
802
struct evsel *switch_evsel;
tools/perf/arch/x86/util/intel-pt.c
860
struct evsel *tracking_evsel;
tools/perf/arch/x86/util/intel-pt.c
903
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
905
evlist__for_each_entry(ptr->evlist, evsel) {
tools/perf/arch/x86/util/intel-pt.c
906
if (evsel->core.attr.type == ptr->intel_pt_pmu->type)
tools/perf/arch/x86/util/intel-pt.c
907
return evsel__disable(evsel);
tools/perf/arch/x86/util/intel-pt.c
916
struct evsel *evsel;
tools/perf/arch/x86/util/intel-pt.c
918
evlist__for_each_entry(ptr->evlist, evsel) {
tools/perf/arch/x86/util/intel-pt.c
919
if (evsel->core.attr.type == ptr->intel_pt_pmu->type)
tools/perf/arch/x86/util/intel-pt.c
920
return evsel__enable(evsel);
tools/perf/arch/x86/util/iostat.c
309
struct evsel *evsel = NULL;
tools/perf/arch/x86/util/iostat.c
325
evlist__for_each_entry(evl, evsel) {
tools/perf/arch/x86/util/iostat.c
326
evsel->priv = list->rps[evsel->core.idx / metrics_count];
tools/perf/arch/x86/util/iostat.c
375
struct evsel *evsel;
tools/perf/arch/x86/util/iostat.c
378
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/iostat.c
379
if (rp != evsel->priv) {
tools/perf/arch/x86/util/iostat.c
380
rp = evsel->priv;
tools/perf/arch/x86/util/iostat.c
388
struct evsel *evsel;
tools/perf/arch/x86/util/iostat.c
391
evlist__for_each_entry(evlist, evsel) {
tools/perf/arch/x86/util/iostat.c
392
if (rp != evsel->priv) {
tools/perf/arch/x86/util/iostat.c
393
rp = evsel->priv;
tools/perf/arch/x86/util/iostat.c
394
zfree(&evsel->priv);
tools/perf/arch/x86/util/iostat.c
431
void iostat_print_metric(struct perf_stat_config *config, struct evsel *evsel,
tools/perf/arch/x86/util/iostat.c
436
const char *iostat_metric = iostat_metric_by_idx(evsel->core.idx);
tools/perf/arch/x86/util/iostat.c
437
u8 die = ((struct iio_root_port *)evsel->priv)->die;
tools/perf/arch/x86/util/iostat.c
438
struct perf_counts_values *count = perf_counts(evsel->counts, die, 0);
tools/perf/arch/x86/util/iostat.c
441
if (evsel->prev_raw_counts && !out->force_header) {
tools/perf/arch/x86/util/iostat.c
443
perf_counts(evsel->prev_raw_counts, die, 0);
tools/perf/arch/x86/util/iostat.c
460
struct evsel *counter = evlist__first(evlist);
tools/perf/arch/x86/util/topdown.c
100
evsel->precise_max = metric_event->precise_max;
tools/perf/arch/x86/util/topdown.c
101
evsel->sample_read = metric_event->sample_read;
tools/perf/arch/x86/util/topdown.c
102
evsel->weak_group = metric_event->weak_group;
tools/perf/arch/x86/util/topdown.c
103
evsel->bpf_counter = metric_event->bpf_counter;
tools/perf/arch/x86/util/topdown.c
104
evsel->retire_lat = metric_event->retire_lat;
tools/perf/arch/x86/util/topdown.c
105
evsel__set_leader(evsel, evsel__leader(metric_event));
tools/perf/arch/x86/util/topdown.c
106
list_add_tail(&evsel->core.node, list);
tools/perf/arch/x86/util/topdown.c
37
bool arch_is_topdown_slots(const struct evsel *evsel)
tools/perf/arch/x86/util/topdown.c
39
return evsel->core.attr.type == PERF_TYPE_RAW &&
tools/perf/arch/x86/util/topdown.c
40
evsel->core.attr.config == TOPDOWN_SLOTS &&
tools/perf/arch/x86/util/topdown.c
41
evsel->core.attr.config1 == 0;
tools/perf/arch/x86/util/topdown.c
44
bool arch_is_topdown_metrics(const struct evsel *evsel)
tools/perf/arch/x86/util/topdown.c
47
return evsel->core.attr.type == PERF_TYPE_RAW &&
tools/perf/arch/x86/util/topdown.c
48
(evsel->core.attr.config & 0xFFFFF8FF) == 0x8000 &&
tools/perf/arch/x86/util/topdown.c
49
evsel->core.attr.config1 == 0;
tools/perf/arch/x86/util/topdown.c
58
bool arch_topdown_sample_read(struct evsel *leader)
tools/perf/arch/x86/util/topdown.c
60
struct evsel *evsel;
tools/perf/arch/x86/util/topdown.c
72
evlist__for_each_entry(leader->evlist, evsel) {
tools/perf/arch/x86/util/topdown.c
73
if (evsel->core.leader != leader->core.leader)
tools/perf/arch/x86/util/topdown.c
75
if (evsel != leader && arch_is_topdown_metrics(evsel))
tools/perf/arch/x86/util/topdown.c
87
int topdown_insert_slots_event(struct list_head *list, int idx, struct evsel *metric_event)
tools/perf/arch/x86/util/topdown.c
89
struct evsel *evsel = evsel__new_idx(&metric_event->core.attr, idx);
tools/perf/arch/x86/util/topdown.c
91
if (!evsel)
tools/perf/arch/x86/util/topdown.c
94
evsel->core.attr.config = TOPDOWN_SLOTS;
tools/perf/arch/x86/util/topdown.c
95
evsel->core.cpus = perf_cpu_map__get(metric_event->core.cpus);
tools/perf/arch/x86/util/topdown.c
96
evsel->core.pmu_cpus = perf_cpu_map__get(metric_event->core.pmu_cpus);
tools/perf/arch/x86/util/topdown.c
97
evsel->core.is_pmu_core = true;
tools/perf/arch/x86/util/topdown.c
98
evsel->pmu = metric_event->pmu;
tools/perf/arch/x86/util/topdown.c
99
evsel->name = strdup("slots");
tools/perf/arch/x86/util/topdown.h
11
bool arch_is_topdown_slots(const struct evsel *evsel);
tools/perf/arch/x86/util/topdown.h
12
bool arch_is_topdown_metrics(const struct evsel *evsel);
tools/perf/arch/x86/util/topdown.h
13
int topdown_insert_slots_event(struct list_head *list, int idx, struct evsel *metric_event);
tools/perf/arch/x86/util/topdown.h
7
struct evsel;
tools/perf/bench/evlist-open-close.c
52
struct evsel *evsel;
tools/perf/bench/evlist-open-close.c
55
evlist__for_each_entry(evlist, evsel)
tools/perf/bench/evlist-open-close.c
56
cnt += evsel->core.threads->nr * perf_cpu_map__nr(evsel->core.cpus);
tools/perf/builtin-annotate.c
239
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/builtin-annotate.c
314
struct evsel *evsel,
tools/perf/builtin-annotate.c
318
return hist_entry__tty_annotate2(he, evsel);
tools/perf/builtin-annotate.c
320
return hist_entry__tty_annotate(he, evsel);
tools/perf/builtin-annotate.c
398
struct evsel *evsel,
tools/perf/builtin-annotate.c
464
key = hist_entry__annotate_data_tui(he, evsel, NULL);
tools/perf/builtin-annotate.c
466
key = hist_entry__annotate_data_tty(he, evsel);
tools/perf/builtin-annotate.c
494
struct evsel *evsel,
tools/perf/builtin-annotate.c
504
ret = annotate(he, evsel, NULL);
tools/perf/builtin-annotate.c
511
key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR);
tools/perf/builtin-annotate.c
533
hist_entry__stdio_annotate(he, evsel, ann);
tools/perf/builtin-annotate.c
543
struct evsel *pos;
tools/perf/builtin-annotate.c
631
struct evsel *evsel;
tools/perf/builtin-annotate.c
636
for_each_group_member(evsel, pos)
tools/perf/builtin-annotate.c
637
nr_samples += evsel__hists(evsel)->stats.nr_samples;
tools/perf/builtin-c2c.c
239
struct evsel *evsel)
tools/perf/builtin-c2c.c
241
c2c_he->evsel = evsel;
tools/perf/builtin-c2c.c
2572
struct evsel *evsel;
tools/perf/builtin-c2c.c
2579
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-c2c.c
2580
fprintf(out, "%-36s: %s\n", first ? " Events" : "", evsel__name(evsel));
tools/perf/builtin-c2c.c
2654
return hist_entry__tui_annotate(he, c2c_he->evsel, NULL, al_addr);
tools/perf/builtin-c2c.c
317
static void perf_c2c__evsel_hists_inc_stats(struct evsel *evsel,
tools/perf/builtin-c2c.c
321
struct hists *evsel_hists = evsel__hists(evsel);
tools/perf/builtin-c2c.c
334
struct evsel *evsel = sample->evsel;
tools/perf/builtin-c2c.c
384
c2c_he__set_evsel(c2c_he, evsel);
tools/perf/builtin-c2c.c
389
perf_c2c__evsel_hists_inc_stats(evsel, he, sample);
tools/perf/builtin-c2c.c
437
c2c_he__set_evsel(c2c_he, evsel);
tools/perf/builtin-c2c.c
71
struct evsel *evsel;
tools/perf/builtin-diff.c
1014
struct evsel *evsel_base, *evsel_pair;
tools/perf/builtin-diff.c
397
struct evsel *evsel = sample->evsel;
tools/perf/builtin-diff.c
398
struct hists *hists = evsel__hists(evsel);
tools/perf/builtin-diff.c
473
static struct evsel *evsel_match(struct evsel *evsel, struct evlist *evlist)
tools/perf/builtin-diff.c
475
struct evsel *e;
tools/perf/builtin-diff.c
478
if ((evsel->core.attr.type == e->core.attr.type) &&
tools/perf/builtin-diff.c
479
(evsel->core.attr.config == e->core.attr.config))
tools/perf/builtin-diff.c
488
struct evsel *evsel;
tools/perf/builtin-diff.c
490
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-diff.c
491
struct hists *hists = evsel__hists(evsel);
tools/perf/builtin-diff.c
965
struct evsel *evsel_base;
tools/perf/builtin-diff.c
975
struct evsel *evsel;
tools/perf/builtin-diff.c
978
evsel = evsel_match(evsel_base, evlist);
tools/perf/builtin-diff.c
979
if (!evsel)
tools/perf/builtin-diff.c
982
hists = evsel__hists(evsel);
tools/perf/builtin-evlist.c
33
struct evsel *pos;
tools/perf/builtin-inject.c
1059
struct evsel *mmap_evsel,
tools/perf/builtin-inject.c
1101
struct evsel *saved_evsel = sample->evsel;
tools/perf/builtin-inject.c
1105
sample->evsel = mmap_evsel;
tools/perf/builtin-inject.c
1117
sample->evsel = saved_evsel;
tools/perf/builtin-inject.c
1128
struct evsel *mmap_evsel;
tools/perf/builtin-inject.c
1232
struct evsel *evsel = sample->evsel;
tools/perf/builtin-inject.c
1244
evsel__parse_sample(evsel, event_sw, &sample_sw);
tools/perf/builtin-inject.c
1248
perf_event__synthesize_sample(event_sw, evsel->core.attr.sample_type,
tools/perf/builtin-inject.c
1249
evsel->core.attr.read_format,
tools/perf/builtin-inject.c
1250
evsel->core.attr.branch_sample_type, &sample_sw);
tools/perf/builtin-inject.c
1377
struct evsel *evsel;
tools/perf/builtin-inject.c
1380
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-inject.c
1383
for (j = 0; j < evsel->core.ids; j++) {
tools/perf/builtin-inject.c
1384
u64 id = evsel->core.id[j];
tools/perf/builtin-inject.c
1397
struct evsel *evsel;
tools/perf/builtin-inject.c
140
struct evsel *mmap_evsel;
tools/perf/builtin-inject.c
1400
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-inject.c
1403
for (j = 0; j < evsel->core.ids; j++) {
tools/perf/builtin-inject.c
1408
id = evsel->core.id[j];
tools/perf/builtin-inject.c
1447
static int guest_session__add_attr(struct guest_session *gs, struct evsel *evsel)
tools/perf/builtin-inject.c
1450
struct perf_event_attr attr = evsel->core.attr;
tools/perf/builtin-inject.c
1456
id_array = calloc(evsel->core.ids, sizeof(*id_array));
tools/perf/builtin-inject.c
1460
vcpu_array = calloc(evsel->core.ids, sizeof(*vcpu_array));
tools/perf/builtin-inject.c
1464
for (i = 0; i < evsel->core.ids; i++) {
tools/perf/builtin-inject.c
1465
u64 id = evsel->core.id[i];
tools/perf/builtin-inject.c
1481
ret = perf_event__synthesize_attr(&inject->tool, &attr, evsel->core.ids,
tools/perf/builtin-inject.c
1486
for (i = 0; i < evsel->core.ids; i++) {
tools/perf/builtin-inject.c
1506
struct evsel *evsel;
tools/perf/builtin-inject.c
1509
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-inject.c
1510
ret = guest_session__add_attr(gs, evsel);
tools/perf/builtin-inject.c
1557
struct evsel *evsel;
tools/perf/builtin-inject.c
1559
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-inject.c
1560
if (evsel->core.ids)
tools/perf/builtin-inject.c
1561
return evsel->core.id[0];
tools/perf/builtin-inject.c
1580
.evsel = inject__mmap_evsel(inject),
tools/perf/builtin-inject.c
1852
struct evsel *evsel;
tools/perf/builtin-inject.c
1856
evsel = evlist__id2evsel(evlist, sample->id);
tools/perf/builtin-inject.c
1859
if (!evsel) {
tools/perf/builtin-inject.c
1865
ret = perf_event__synthesize_id_sample(array, evsel->core.attr.sample_type, sample);
tools/perf/builtin-inject.c
1931
struct evsel *evsel = evlist__id2evsel(gs->session->evlist, id);
tools/perf/builtin-inject.c
1933
id_hdr_size = evsel__id_hdr_size(evsel);
tools/perf/builtin-inject.c
2143
static int evsel__check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg)
tools/perf/builtin-inject.c
2145
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-inject.c
2146
const char *name = evsel__name(evsel);
tools/perf/builtin-inject.c
2168
struct evsel *evsel;
tools/perf/builtin-inject.c
2172
evlist__for_each_entry(evlist, evsel)
tools/perf/builtin-inject.c
2173
evsel->handler = drop_sample;
tools/perf/builtin-inject.c
2444
struct evsel *evsel;
tools/perf/builtin-inject.c
2446
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-inject.c
2447
const char *name = evsel__name(evsel);
tools/perf/builtin-inject.c
2450
if (evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID"))
tools/perf/builtin-inject.c
2453
evsel->handler = perf_inject__sched_switch;
tools/perf/builtin-inject.c
2455
evsel->handler = perf_inject__sched_process_exit;
tools/perf/builtin-inject.c
2458
evsel->handler = perf_inject__sched_stat;
tools/perf/builtin-inject.c
2583
struct evsel *evsel;
tools/perf/builtin-inject.c
2588
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-inject.c
2589
evsel->core.attr.sample_type &= ~PERF_SAMPLE_AUX;
tools/perf/builtin-inject.c
2596
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-inject.c
2597
evsel->core.attr.sample_type |= PERF_SAMPLE_BRANCH_STACK;
tools/perf/builtin-inject.c
2598
if (evsel->core.attr.size < PERF_ATTR_SIZE_VER2)
tools/perf/builtin-inject.c
2599
evsel->core.attr.size = PERF_ATTR_SIZE_VER2;
tools/perf/builtin-inject.c
2600
evsel->core.attr.branch_sample_type |=
tools/perf/builtin-inject.c
2611
struct evsel *evsel;
tools/perf/builtin-inject.c
2613
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-inject.c
2614
evsel__reset_sample_bit(evsel, REGS_USER);
tools/perf/builtin-inject.c
2615
evsel__reset_sample_bit(evsel, STACK_USER);
tools/perf/builtin-inject.c
2616
evsel->core.attr.sample_regs_user = 0;
tools/perf/builtin-inject.c
2617
evsel->core.attr.sample_stack_user = 0;
tools/perf/builtin-inject.c
2618
evsel->core.attr.exclude_callchain_user = 0;
tools/perf/builtin-inject.c
2649
static bool evsel__has_dwarf_callchain(struct evsel *evsel)
tools/perf/builtin-inject.c
2651
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-inject.c
2884
struct evsel *evsel;
tools/perf/builtin-inject.c
2886
evlist__for_each_entry(inject.session->evlist, evsel) {
tools/perf/builtin-inject.c
2887
ret = aslr_tool__cache_orig_attrs(tool, evsel);
tools/perf/builtin-inject.c
2950
struct evsel *evsel;
tools/perf/builtin-inject.c
2957
evlist__for_each_entry(inject.session->evlist, evsel) {
tools/perf/builtin-inject.c
2958
if (!evsel__has_dwarf_callchain(evsel) && !evsel__is_dummy_event(evsel)) {
tools/perf/builtin-inject.c
441
struct evsel *evsel = sample->evsel;
tools/perf/builtin-inject.c
443
if (evsel == NULL)
tools/perf/builtin-inject.c
446
if (evsel->handler) {
tools/perf/builtin-inject.c
447
inject_handler f = evsel->handler;
tools/perf/builtin-inject.c
460
u64 orig_type = evsel->core.attr.sample_type;
tools/perf/builtin-inject.c
461
u64 orig_branch_type = evsel->core.attr.branch_sample_type;
tools/perf/builtin-inject.c
478
evsel->core.attr.sample_type |= PERF_SAMPLE_BRANCH_STACK;
tools/perf/builtin-inject.c
479
evsel->core.attr.branch_sample_type |= PERF_SAMPLE_BRANCH_HW_INDEX;
tools/perf/builtin-inject.c
481
evsel->core.attr.sample_type &= ~PERF_SAMPLE_AUX;
tools/perf/builtin-inject.c
483
sz = perf_event__sample_event_size(sample, evsel->core.attr.sample_type,
tools/perf/builtin-inject.c
484
evsel->core.attr.read_format,
tools/perf/builtin-inject.c
485
evsel->core.attr.branch_sample_type);
tools/perf/builtin-inject.c
489
evsel->core.attr.sample_type = orig_type;
tools/perf/builtin-inject.c
490
evsel->core.attr.branch_sample_type = orig_branch_type;
tools/perf/builtin-inject.c
499
err = perf_event__synthesize_sample(event_copy, evsel->core.attr.sample_type,
tools/perf/builtin-inject.c
500
evsel->core.attr.read_format,
tools/perf/builtin-inject.c
501
evsel->core.attr.branch_sample_type, sample);
tools/perf/builtin-inject.c
503
evsel->core.attr.sample_type = orig_type;
tools/perf/builtin-inject.c
504
evsel->core.attr.branch_sample_type = orig_branch_type;
tools/perf/builtin-inject.c
513
(evsel->core.attr.sample_type & PERF_SAMPLE_AUX)) {
tools/perf/builtin-inject.c
528
struct evsel *evsel = sample->evsel;
tools/perf/builtin-inject.c
533
u64 sample_type = evsel->core.attr.sample_type;
tools/perf/builtin-inject.c
595
evsel->core.attr.read_format,
tools/perf/builtin-inject.c
596
evsel->core.attr.branch_sample_type);
tools/perf/builtin-inject.c
604
evsel->core.attr.read_format,
tools/perf/builtin-inject.c
605
evsel->core.attr.branch_sample_type, sample);
tools/perf/builtin-inject.c
663
static struct evsel *inject__mmap_evsel(struct perf_inject *inject)
tools/perf/builtin-inject.c
665
struct evsel *pos;
tools/perf/builtin-inject.c
729
if (!sample->evsel)
tools/perf/builtin-inject.c
730
sample->evsel = evlist__event2evsel(inject->session->evlist, event);
tools/perf/builtin-inject.c
732
if (sample->evsel) {
tools/perf/builtin-inject.c
761
struct evsel *saved_evsel = sample->evsel;
tools/perf/builtin-inject.c
763
sample->evsel = evlist__event2evsel(inject->session->evlist, event);
tools/perf/builtin-inject.c
764
if (sample->evsel && !dso_sought) {
tools/perf/builtin-inject.c
768
if (sample->evsel && dso &&
tools/perf/builtin-inject.c
776
sample->evsel = saved_evsel;
tools/perf/builtin-inject.c
780
sample->evsel = saved_evsel;
tools/perf/builtin-kmem.c
1004
if (evsel->handler != NULL) {
tools/perf/builtin-kmem.c
1005
tracepoint_handler f = evsel->handler;
tools/perf/builtin-kmem.c
1404
struct evsel *evsel;
tools/perf/builtin-kmem.c
1426
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-kmem.c
1427
if (evsel__name_is(evsel, "kmem:mm_page_alloc") &&
tools/perf/builtin-kmem.c
1428
evsel__field(evsel, "pfn")) {
tools/perf/builtin-kmem.c
202
if (evsel__field(sample->evsel, "node")) {
tools/perf/builtin-kmem.c
2039
struct evsel *evsel = evlist__find_tracepoint_by_name(session->evlist, "kmem:mm_page_alloc");
tools/perf/builtin-kmem.c
2040
const struct tep_event *tp_format = evsel ? evsel__tp_format(evsel) : NULL;
tools/perf/builtin-kmem.c
776
tp_format = evsel__tp_format(sample->evsel);
tools/perf/builtin-kmem.c
985
struct evsel *evsel = sample->evsel;
tools/perf/builtin-kvm.c
1490
struct evsel *pos;
tools/perf/builtin-kvm.c
821
if (evsel__name_is(sample->evsel, child_ops->name)) {
tools/perf/builtin-kvm.c
923
if (!thread__priv(thread) && kvm_entry_event(sample->evsel)) {
tools/perf/builtin-kwork.c
1139
static char *evsel__softirq_name(struct evsel *evsel, u64 num)
tools/perf/builtin-kwork.c
1144
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-kwork.c
1188
work->name = evsel__softirq_name(sample->evsel, num);
tools/perf/builtin-kwork.c
1754
struct evsel *evsel;
tools/perf/builtin-kwork.c
1817
list_for_each_entry(evsel, &session->evlist->core.entries, core.node) {
tools/perf/builtin-kwork.c
1818
if (kwork->show_callchain && !evsel__has_callchain(evsel)) {
tools/perf/builtin-kwork.c
1997
struct evsel *evsel = sample->evsel;
tools/perf/builtin-kwork.c
2000
if (evsel->handler != NULL) {
tools/perf/builtin-kwork.c
2001
tracepoint_handler f = evsel->handler;
tools/perf/builtin-lock.c
1431
struct evsel *evsel = sample->evsel;
tools/perf/builtin-lock.c
1443
if (evsel->handler != NULL) {
tools/perf/builtin-lock.c
1444
tracepoint_handler f = evsel->handler;
tools/perf/builtin-record.c
1350
struct evsel *pos;
tools/perf/builtin-record.c
1389
struct evsel *pos2;
tools/perf/builtin-record.c
1421
struct evsel *tmp;
tools/perf/builtin-record.c
1974
static void __record__save_lost_samples(struct record *rec, struct evsel *evsel,
tools/perf/builtin-record.c
1985
if (evsel->core.ids) {
tools/perf/builtin-record.c
1986
sid = xyarray__entry(evsel->core.sample_id, cpu_idx, thread_idx);
tools/perf/builtin-record.c
1991
evsel->core.attr.sample_type, &sample);
tools/perf/builtin-record.c
2002
struct evsel *evsel;
tools/perf/builtin-record.c
2008
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-record.c
2009
struct xyarray *xy = evsel->core.sample_id;
tools/perf/builtin-record.c
2012
if (xy == NULL || evsel->core.fd == NULL)
tools/perf/builtin-record.c
2014
if (xyarray__max_x(evsel->core.fd) != xyarray__max_x(xy) ||
tools/perf/builtin-record.c
2015
xyarray__max_y(evsel->core.fd) != xyarray__max_y(xy)) {
tools/perf/builtin-record.c
2024
if (perf_evsel__read(&evsel->core, x, y, &count) < 0) {
tools/perf/builtin-record.c
2032
__record__save_lost_samples(rec, evsel, &lost.lost,
tools/perf/builtin-record.c
2038
lost_count = perf_bpf_filter__lost_count(evsel);
tools/perf/builtin-record.c
2042
__record__save_lost_samples(rec, evsel, &lost.lost, 0, 0, lost_count,
tools/perf/builtin-record.c
894
struct evsel *evsel;
tools/perf/builtin-record.c
897
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-record.c
898
if (evsel->core.attr.text_poke)
tools/perf/builtin-record.c
902
evsel = evlist__add_dummy_on_all_cpus(evlist);
tools/perf/builtin-record.c
903
if (!evsel)
tools/perf/builtin-record.c
906
evsel->core.attr.text_poke = 1;
tools/perf/builtin-record.c
907
evsel->core.attr.ksymbol = 1;
tools/perf/builtin-record.c
908
evsel->immediate = true;
tools/perf/builtin-record.c
909
evsel__set_sample_bit(evsel, TIME);
tools/perf/builtin-record.c
922
struct evsel *evsel;
tools/perf/builtin-record.c
930
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-record.c
931
if (!evsel__is_dummy_event(evsel))
tools/perf/builtin-record.c
943
struct evsel *evsel;
tools/perf/builtin-record.c
959
evsel = evlist__findnew_tracking_event(evlist, system_wide);
tools/perf/builtin-record.c
960
if (!evsel)
tools/perf/builtin-record.c
967
if (opts->target.initial_delay && !evsel->immediate &&
tools/perf/builtin-record.c
969
evsel->core.attr.enable_on_exec = 1;
tools/perf/builtin-record.c
971
evsel->immediate = 1;
tools/perf/builtin-report.c
1056
struct evsel *pos;
tools/perf/builtin-report.c
283
if (evswitch__discard(&rep->evswitch, sample->evsel))
tools/perf/builtin-report.c
355
sample->evsel,
tools/perf/builtin-report.c
371
struct evsel *evsel;
tools/perf/builtin-report.c
431
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-report.c
432
if (strstr(evsel__name(evsel), "arm_spe") &&
tools/perf/builtin-report.c
434
evsel->core.attr.sample_type |= PERF_SAMPLE_DATA_SRC;
tools/perf/builtin-report.c
480
struct evsel *evsel = hists_to_evsel(hists);
tools/perf/builtin-report.c
493
if (evsel__is_group_event(evsel)) {
tools/perf/builtin-report.c
494
struct evsel *pos;
tools/perf/builtin-report.c
496
evsel__group_desc(evsel, buf, size);
tools/perf/builtin-report.c
499
for_each_group_member(pos, evsel) {
tools/perf/builtin-report.c
516
evsel->core.nr_members > 1 ? "s" : "", evname);
tools/perf/builtin-report.c
543
struct evsel *pos;
tools/perf/builtin-report.c
559
struct evsel *pos;
tools/perf/builtin-report.c
708
struct evsel *pos;
tools/perf/builtin-report.c
757
struct evsel *evsel = hists_to_evsel(he->hists);
tools/perf/builtin-report.c
759
symbol__annotate2(&he->ms, evsel, NULL);
tools/perf/builtin-report.c
768
struct evsel *pos;
tools/perf/builtin-report.c
784
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/builtin-report.c
796
struct evsel *evsel = sample->evsel;
tools/perf/builtin-report.c
798
if (!evsel)
tools/perf/builtin-report.c
799
evsel = evlist__id2evsel(rep->session->evlist, sample->id);
tools/perf/builtin-report.c
801
if (evsel) {
tools/perf/builtin-report.c
802
struct hists *hists = evsel__hists(evsel);
tools/perf/builtin-sched.c
1946
struct evsel *evsel = sample->evsel;
tools/perf/builtin-sched.c
1949
if (evsel->handler != NULL) {
tools/perf/builtin-sched.c
1950
tracepoint_handler f = evsel->handler;
tools/perf/builtin-sched.c
2057
static struct evsel_runtime *evsel__get_runtime(struct evsel *evsel)
tools/perf/builtin-sched.c
2059
struct evsel_runtime *r = evsel->priv;
tools/perf/builtin-sched.c
2063
evsel->priv = r;
tools/perf/builtin-sched.c
2072
static void evsel__save_time(struct evsel *evsel, u64 timestamp, u32 cpu)
tools/perf/builtin-sched.c
2074
struct evsel_runtime *r = evsel__get_runtime(evsel);
tools/perf/builtin-sched.c
2098
static u64 evsel__get_time(struct evsel *evsel, u32 cpu)
tools/perf/builtin-sched.c
2100
struct evsel_runtime *r = evsel__get_runtime(evsel);
tools/perf/builtin-sched.c
2394
if (evsel__name_is(sample->evsel, "sched:sched_switch"))
tools/perf/builtin-sched.c
2656
else if (evsel__name_is(sample->evsel, "sched:sched_switch"))
tools/perf/builtin-sched.c
2668
if (!evsel__name_is(sample->evsel, "sched:sched_switch"))
tools/perf/builtin-sched.c
2913
tprev = evsel__get_time(sample->evsel, sample->cpu);
tools/perf/builtin-sched.c
3010
evsel__save_time(sample->evsel, sample->time, sample->cpu);
tools/perf/builtin-sched.c
3280
struct evsel *evsel = sample->evsel;
tools/perf/builtin-sched.c
3291
if (evsel->handler != NULL) {
tools/perf/builtin-sched.c
3292
sched_handler f = evsel->handler;
tools/perf/builtin-sched.c
3303
struct evsel *evsel;
tools/perf/builtin-sched.c
3306
list_for_each_entry(evsel, &evlist->core.entries, core.node) {
tools/perf/builtin-sched.c
3307
er = evsel__get_runtime(evsel);
tools/perf/builtin-sched.c
3315
evsel__name_is(evsel, "sched:sched_switch") &&
tools/perf/builtin-sched.c
3316
!evsel__has_callchain(evsel)) {
tools/perf/builtin-sched.c
876
printf("sched_wakeup event %p\n", sample->evsel);
tools/perf/builtin-sched.c
904
printf("sched_switch event %p\n", sample->evsel);
tools/perf/builtin-script.c
1022
struct evsel *evsel, FILE *fp)
tools/perf/builtin-script.c
1060
struct evsel *evsel, FILE *fp)
tools/perf/builtin-script.c
1227
static int any_dump_insn(struct evsel *evsel __maybe_unused,
tools/perf/builtin-script.c
1253
struct evsel *evsel,
tools/perf/builtin-script.c
1260
printed += add_padding(fp, any_dump_insn(evsel, x, ip, inbuf, len, &ilen, fp), 30);
tools/perf/builtin-script.c
1277
struct evsel *pos = evsel__leader(evsel);
tools/perf/builtin-script.c
1280
perf_env__find_br_cntr_info(evsel__env(evsel), NULL, &width);
tools/perf/builtin-script.c
1283
evlist__for_each_entry_from(evsel->evlist, pos) {
tools/perf/builtin-script.c
1286
if (evsel__leader(pos) != evsel__leader(evsel))
tools/perf/builtin-script.c
1324
struct evsel *evsel, FILE *fp)
tools/perf/builtin-script.c
1363
struct evsel *evsel,
tools/perf/builtin-script.c
1400
x.cpumode, x.cpu, &lastsym, evsel, fp);
tools/perf/builtin-script.c
1403
evsel, thread, br_cntr);
tools/perf/builtin-script.c
1431
printed += ip__fprintf_sym(ip, thread, x.cpumode, x.cpu, &lastsym, evsel, fp);
tools/perf/builtin-script.c
1436
&total_cycles, evsel, thread, br_cntr);
tools/perf/builtin-script.c
1443
printed += any_dump_insn(evsel, &x, ip, buffer + off, len - off, &ilen, fp);
tools/perf/builtin-script.c
1482
printed += ip__fprintf_sym(start, thread, x.cpumode, x.cpu, &lastsym, evsel, fp);
tools/perf/builtin-script.c
1491
printed += any_dump_insn(evsel, &x, sample->ip, buffer, len, &ilen, fp);
tools/perf/builtin-script.c
1502
printed += any_dump_insn(evsel, &x, start + off, buffer + off, len - off, &ilen, fp);
tools/perf/builtin-script.c
1526
struct evsel *evsel, FILE *fp)
tools/perf/builtin-script.c
1532
if (!sample_addr_correlates_sym(&evsel->core.attr))
tools/perf/builtin-script.c
1553
struct evsel *evsel,
tools/perf/builtin-script.c
1562
if (sample_addr_correlates_sym(&evsel->core.attr)) {
tools/perf/builtin-script.c
1582
struct evsel *evsel,
tools/perf/builtin-script.c
1602
name = resolve_branch_sym(sample, evsel, thread, al, addr_al, &ip);
tools/perf/builtin-script.c
1632
struct evsel *evsel,
tools/perf/builtin-script.c
1653
printed += perf_sample__fprintf_brstackinsn(sample, evsel, thread, attr, machine, fp);
tools/perf/builtin-script.c
1659
struct evsel *evsel, FILE *fp)
tools/perf/builtin-script.c
1673
struct evsel *evsel,
tools/perf/builtin-script.c
1679
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-script.c
1680
unsigned int type = evsel__output_type(evsel);
tools/perf/builtin-script.c
1685
printed += perf_sample__fprintf_callindent(sample, evsel, thread, al, addr_al, fp);
tools/perf/builtin-script.c
1714
((evsel->core.attr.sample_type & PERF_SAMPLE_ADDR) &&
tools/perf/builtin-script.c
1717
printed += perf_sample__fprintf_addr(sample, thread, evsel, fp);
tools/perf/builtin-script.c
1720
printed += perf_sample__fprintf_ipc(sample, evsel, fp);
tools/perf/builtin-script.c
1725
printed += perf_sample__fprintf_insn(sample, evsel, attr, thread, machine, fp, al);
tools/perf/builtin-script.c
2037
struct evsel *evsel, FILE *fp)
tools/perf/builtin-script.c
2039
switch (evsel->core.attr.config) {
tools/perf/builtin-script.c
2069
struct evsel *evsel;
tools/perf/builtin-script.c
2072
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-script.c
2073
int len = strlen(evsel__name(evsel));
tools/perf/builtin-script.c
2106
struct evsel *evsel;
tools/perf/builtin-script.c
2119
perf_sample__fprintf_start(NULL, mctx->sample, mctx->thread, mctx->evsel,
tools/perf/builtin-script.c
2134
perf_sample__fprintf_start(NULL, mctx->sample, mctx->thread, mctx->evsel,
tools/perf/builtin-script.c
2144
static struct evsel *map_metric_evsel_to_script_evsel(struct evlist *script_evlist,
tools/perf/builtin-script.c
2145
struct evsel *metric_evsel)
tools/perf/builtin-script.c
2147
struct evsel *script_evsel;
tools/perf/builtin-script.c
2174
struct evsel *metric_evsel;
tools/perf/builtin-script.c
2196
struct evsel *script_evsel =
tools/perf/builtin-script.c
2198
struct evsel *new_metric_leader;
tools/perf/builtin-script.c
2230
struct evsel *script_evsel =
tools/perf/builtin-script.c
2289
struct evsel *evsel,
tools/perf/builtin-script.c
2300
.evsel = evsel,
tools/perf/builtin-script.c
2307
struct evsel *pos;
tools/perf/builtin-script.c
2312
.evlist = evsel->evlist,
tools/perf/builtin-script.c
2313
.system_wide = perf_thread_map__pid(evsel->core.threads, /*idx=*/0) == -1,
tools/perf/builtin-script.c
2324
cpu_aggr_map__new(evsel->evlist->core.user_requested_cpus,
tools/perf/builtin-script.c
2333
if (!evsel->stats) {
tools/perf/builtin-script.c
2334
if (evlist__alloc_stats(&stat_config, evsel->evlist, /*alloc_raw=*/true) < 0)
tools/perf/builtin-script.c
2337
if (!evsel->stats->aggr) {
tools/perf/builtin-script.c
2338
if (evlist__alloc_aggr_stats(evsel->evlist, stat_config.aggr_map->nr) < 0)
tools/perf/builtin-script.c
2343
cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, (struct perf_cpu){sample->cpu});
tools/perf/builtin-script.c
2346
if (perf_cpu_map__cpu(evsel->core.cpus, /*idx=*/0).cpu == -1 ||
tools/perf/builtin-script.c
2355
thread_map_idx = perf_thread_map__idx(evsel->core.threads, sample->tid);
tools/perf/builtin-script.c
2358
if (perf_thread_map__pid(evsel->core.threads, /*idx=*/0) == -1 ||
tools/perf/builtin-script.c
2367
count = perf_counts(evsel->counts, cpu_map_idx, thread_map_idx);
tools/perf/builtin-script.c
2368
old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread_map_idx);
tools/perf/builtin-script.c
2374
perf_stat_process_counter(&stat_config, evsel);
tools/perf/builtin-script.c
2377
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/builtin-script.c
2387
struct evsel *evsel,
tools/perf/builtin-script.c
2406
const char *name = resolve_branch_sym(sample, evsel, thread, al, addr_al,
tools/perf/builtin-script.c
2435
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2436
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-script.c
2437
unsigned int type = evsel__output_type(evsel);
tools/perf/builtin-script.c
2438
struct evsel_script *es = evsel->priv;
tools/perf/builtin-script.c
2448
perf_sample__fprintf_start(script, sample, thread, evsel,
tools/perf/builtin-script.c
2455
const char *evname = evsel__name(evsel);
tools/perf/builtin-script.c
2467
perf_sample__fprintf_bts(sample, evsel, thread, al, addr_al, machine, fp);
tools/perf/builtin-script.c
2472
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-script.c
2482
perf_sample__fprintf_synth(sample, evsel, fp);
tools/perf/builtin-script.c
2485
perf_sample__fprintf_addr(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2543
perf_sample__fprintf_brstack(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2545
perf_sample__fprintf_brstacksym(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2547
perf_sample__fprintf_brstackoff(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2549
if (evsel__is_bpf_output(evsel) && !evsel__is_offcpu_event(evsel) && PRINT_FIELD(BPF_OUTPUT))
tools/perf/builtin-script.c
2551
perf_sample__fprintf_insn(sample, evsel, attr, thread, machine, fp, al);
tools/perf/builtin-script.c
2562
perf_sample__fprintf_ipc(sample, evsel, fp);
tools/perf/builtin-script.c
2573
perf_sample__fprint_metric(thread, evsel, sample, fp);
tools/perf/builtin-script.c
2581
static void __process_stat(struct evsel *counter, u64 tstamp)
tools/perf/builtin-script.c
2613
static void process_stat(struct evsel *counter, u64 tstamp)
tools/perf/builtin-script.c
2660
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2669
ret = dlfilter__filter_event_early(dlfilter, event, sample, evsel, machine, &al, &addr_al);
tools/perf/builtin-script.c
2706
if (!show_event(sample, evsel, al.thread, &al, &addr_al))
tools/perf/builtin-script.c
2709
if (evswitch__discard(&scr->evswitch, evsel))
tools/perf/builtin-script.c
2712
ret = dlfilter__filter_event(dlfilter, event, sample, evsel, machine, &al, &addr_al);
tools/perf/builtin-script.c
2722
if ((evsel->core.attr.sample_type & PERF_SAMPLE_ADDR) &&
tools/perf/builtin-script.c
2723
sample_addr_correlates_sym(&evsel->core.attr)) {
tools/perf/builtin-script.c
2745
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2746
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-script.c
2747
struct evsel_script *es = evsel->priv;
tools/perf/builtin-script.c
2789
if (!show_event(sample, evsel, al.thread, &al, NULL))
tools/perf/builtin-script.c
2792
if (evswitch__discard(&scr->evswitch, evsel))
tools/perf/builtin-script.c
2795
perf_sample__fprintf_start(scr, sample, al.thread, evsel,
tools/perf/builtin-script.c
2836
struct evsel *evsel, *pos;
tools/perf/builtin-script.c
2846
evsel = evlist__last(*pevlist);
tools/perf/builtin-script.c
2848
if (!evsel->priv) {
tools/perf/builtin-script.c
2850
evsel->priv = evsel_script__new(evsel, scr->session->data);
tools/perf/builtin-script.c
2851
if (!evsel->priv)
tools/perf/builtin-script.c
2855
evsel->priv = &es_stdout;
tools/perf/builtin-script.c
2859
if (evsel->core.attr.type >= PERF_TYPE_MAX &&
tools/perf/builtin-script.c
2860
evsel->core.attr.type != PERF_TYPE_SYNTH)
tools/perf/builtin-script.c
2864
if (pos->core.attr.type == evsel->core.attr.type && pos != evsel)
tools/perf/builtin-script.c
2868
if (evsel->core.attr.sample_type) {
tools/perf/builtin-script.c
2869
err = evsel__check_attr(evsel, scr->session);
tools/perf/builtin-script.c
2879
e_machine = perf_session__e_machine(evsel__session(evsel), /*e_flags=*/NULL);
tools/perf/builtin-script.c
2888
int type = evsel__output_type(evsel);
tools/perf/builtin-script.c
2895
evsel__set_print_ip_opts(evsel);
tools/perf/builtin-script.c
2907
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2910
if (!evsel)
tools/perf/builtin-script.c
2911
evsel = evlist__id2evsel(session->evlist, sample->id);
tools/perf/builtin-script.c
2913
if (evsel && !evsel->core.attr.sample_id_all) {
tools/perf/builtin-script.c
2926
if (evsel) {
tools/perf/builtin-script.c
2927
struct evsel *saved_evsel = sample->evsel;
tools/perf/builtin-script.c
2929
sample->evsel = evsel;
tools/perf/builtin-script.c
2930
perf_sample__fprintf_start(script, sample, thread, evsel,
tools/perf/builtin-script.c
2932
sample->evsel = saved_evsel;
tools/perf/builtin-script.c
3139
struct evsel *evsel;
tools/perf/builtin-script.c
3141
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-script.c
3142
if (!evsel->priv)
tools/perf/builtin-script.c
3144
evsel_script__delete(evsel->priv);
tools/perf/builtin-script.c
3145
evsel->priv = NULL;
tools/perf/builtin-script.c
3151
struct evsel *evsel;
tools/perf/builtin-script.c
3153
evlist__for_each_entry(script->session->evlist, evsel) {
tools/perf/builtin-script.c
3161
if (evsel->priv != NULL)
tools/perf/builtin-script.c
3164
evsel->priv = evsel_script__new(evsel, script->session->data);
tools/perf/builtin-script.c
3165
if (evsel->priv == NULL)
tools/perf/builtin-script.c
3178
struct evsel *evsel;
tools/perf/builtin-script.c
3185
evlist__for_each_entry(script->session->evlist, evsel)
tools/perf/builtin-script.c
3186
evsel->priv = &es_stdout;
tools/perf/builtin-script.c
3193
struct evsel *evsel;
tools/perf/builtin-script.c
3195
evlist__for_each_entry(script->session->evlist, evsel) {
tools/perf/builtin-script.c
3196
struct evsel_script *es = evsel->priv;
tools/perf/builtin-script.c
3200
evsel->priv = NULL;
tools/perf/builtin-script.c
349
static struct evsel_script *evsel_script__new(struct evsel *evsel, struct perf_data *data)
tools/perf/builtin-script.c
354
if (asprintf(&es->filename, "%s.%s.dump", data->file.path, evsel__name(evsel)) < 0)
tools/perf/builtin-script.c
3876
struct evsel *counter;
tools/perf/builtin-script.c
399
static inline int evsel__output_type(struct evsel *evsel)
tools/perf/builtin-script.c
401
int type = evsel->script_output_type;
tools/perf/builtin-script.c
404
type = output_type(evsel->core.attr.type);
tools/perf/builtin-script.c
406
struct perf_pmu *pmu = evsel__find_pmu(evsel);
tools/perf/builtin-script.c
411
evsel->script_output_type = type;
tools/perf/builtin-script.c
441
#define PRINT_FIELD(x) (output[evsel__output_type(evsel)].fields & PERF_OUTPUT_##x)
tools/perf/builtin-script.c
443
static int evsel__do_check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg,
tools/perf/builtin-script.c
446
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-script.c
447
int type = evsel__output_type(evsel);
tools/perf/builtin-script.c
456
evname = evsel__name(evsel);
tools/perf/builtin-script.c
465
evname = evsel__name(evsel);
tools/perf/builtin-script.c
473
static int evsel__check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg,
tools/perf/builtin-script.c
476
return evsel__do_check_stype(evsel, sample_type, sample_msg, field, false);
tools/perf/builtin-script.c
479
static int evsel__check_attr(struct evsel *evsel, struct perf_session *session)
tools/perf/builtin-script.c
483
if (evsel__is_dummy_event(evsel))
tools/perf/builtin-script.c
497
if (evsel__check_stype(evsel, PERF_SAMPLE_IP, "IP", PERF_OUTPUT_IP))
tools/perf/builtin-script.c
502
evsel__do_check_stype(evsel, PERF_SAMPLE_ADDR, "ADDR", PERF_OUTPUT_ADDR, allow_user_set))
tools/perf/builtin-script.c
506
evsel__do_check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", PERF_OUTPUT_DATA_SRC, allow_user_set))
tools/perf/builtin-script.c
510
evsel__do_check_stype(evsel, PERF_SAMPLE_WEIGHT_TYPE, "WEIGHT", PERF_OUTPUT_WEIGHT, allow_user_set))
tools/perf/builtin-script.c
514
!(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) {
tools/perf/builtin-script.c
526
!(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) {
tools/perf/builtin-script.c
549
evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID", PERF_OUTPUT_TID|PERF_OUTPUT_PID))
tools/perf/builtin-script.c
553
evsel__check_stype(evsel, PERF_SAMPLE_TIME, "TIME", PERF_OUTPUT_TIME))
tools/perf/builtin-script.c
557
evsel__do_check_stype(evsel, PERF_SAMPLE_CPU, "CPU", PERF_OUTPUT_CPU, allow_user_set))
tools/perf/builtin-script.c
561
evsel__do_check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS", PERF_OUTPUT_IREGS, allow_user_set))
tools/perf/builtin-script.c
565
evsel__check_stype(evsel, PERF_SAMPLE_REGS_USER, "UREGS", PERF_OUTPUT_UREGS))
tools/perf/builtin-script.c
569
evsel__do_check_stype(evsel, PERF_SAMPLE_PHYS_ADDR, "PHYS_ADDR", PERF_OUTPUT_PHYS_ADDR, allow_user_set))
tools/perf/builtin-script.c
573
evsel__check_stype(evsel, PERF_SAMPLE_DATA_PAGE_SIZE, "DATA_PAGE_SIZE", PERF_OUTPUT_DATA_PAGE_SIZE))
tools/perf/builtin-script.c
577
evsel__check_stype(evsel, PERF_SAMPLE_CODE_PAGE_SIZE, "CODE_PAGE_SIZE", PERF_OUTPUT_CODE_PAGE_SIZE))
tools/perf/builtin-script.c
581
evsel__check_stype(evsel, PERF_SAMPLE_WEIGHT_STRUCT, "WEIGHT_STRUCT", PERF_OUTPUT_INS_LAT))
tools/perf/builtin-script.c
585
evsel__check_stype(evsel, PERF_SAMPLE_CGROUP, "CGROUP", PERF_OUTPUT_CGROUP)) {
tools/perf/builtin-script.c
591
evsel__check_stype(evsel, PERF_SAMPLE_WEIGHT_STRUCT, "WEIGHT_STRUCT", PERF_OUTPUT_RETIRE_LAT))
tools/perf/builtin-script.c
597
static void evsel__set_print_ip_opts(struct evsel *evsel)
tools/perf/builtin-script.c
599
unsigned int type = evsel__output_type(evsel);
tools/perf/builtin-script.c
621
static struct evsel *find_first_output_type(struct evlist *evlist,
tools/perf/builtin-script.c
624
struct evsel *evsel;
tools/perf/builtin-script.c
626
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-script.c
627
if (evsel__is_dummy_event(evsel))
tools/perf/builtin-script.c
629
if (evsel__output_type(evsel) == (int)type)
tools/perf/builtin-script.c
630
return evsel;
tools/perf/builtin-script.c
643
struct evsel *evsel;
tools/perf/builtin-script.c
646
evsel = find_first_output_type(session->evlist, j);
tools/perf/builtin-script.c
652
if (!evsel && output[j].user_set && !output[j].wildcard_set &&
tools/perf/builtin-script.c
660
if (evsel && output[j].fields &&
tools/perf/builtin-script.c
661
evsel__check_attr(evsel, session))
tools/perf/builtin-script.c
664
if (evsel == NULL)
tools/perf/builtin-script.c
671
evsel__set_print_ip_opts(evsel);
tools/perf/builtin-script.c
679
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-script.c
681
if (evsel__has_callchain(evsel) || evsel__is_offcpu_event(evsel)) {
tools/perf/builtin-script.c
698
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-script.c
699
if (evsel->core.attr.type != j)
tools/perf/builtin-script.c
702
if (evsel__has_callchain(evsel)) {
tools/perf/builtin-script.c
707
evsel__set_print_ip_opts(evsel);
tools/perf/builtin-script.c
823
struct evsel *evsel,
tools/perf/builtin-script.c
838
if (!annotation_br_cntr_abbr_list(&buf, evsel, true)) {
tools/perf/builtin-script.c
856
else if (PRINT_FIELD(IP) && evsel__has_callchain(evsel) && symbol_conf.use_callchain)
tools/perf/builtin-script.c
983
struct evsel *evsel, FILE *fp)
tools/perf/builtin-stat.c
192
struct evsel *evsel, *warned_leader = NULL;
tools/perf/builtin-stat.c
1938
const struct evsel *lhs = container_of(lhs_core, struct evsel, core);
tools/perf/builtin-stat.c
194
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-stat.c
1940
const struct evsel *rhs = container_of(rhs_core, struct evsel, core);
tools/perf/builtin-stat.c
1941
const struct evsel *lhs_leader = evsel__leader(lhs);
tools/perf/builtin-stat.c
1942
const struct evsel *rhs_leader = evsel__leader(rhs);
tools/perf/builtin-stat.c
195
struct evsel *leader = evsel__leader(evsel);
tools/perf/builtin-stat.c
1966
return strcmp(evsel__name((struct evsel *)lhs_leader),
tools/perf/builtin-stat.c
1967
evsel__name((struct evsel *)rhs_leader));
tools/perf/builtin-stat.c
1979
struct evsel *evsel;
tools/perf/builtin-stat.c
198
if (leader == evsel)
tools/perf/builtin-stat.c
200
if (perf_cpu_map__equal(leader->core.cpus, evsel->core.cpus))
tools/perf/builtin-stat.c
2127
evlist__for_each_entry(metric_evlist, evsel)
tools/perf/builtin-stat.c
2128
evsel->default_metricgroup = true;
tools/perf/builtin-stat.c
2141
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-stat.c
2146
if (!evsel__match(evsel, HARDWARE, HW_CPU_CYCLES))
tools/perf/builtin-stat.c
2147
evsel->skippable = true;
tools/perf/builtin-stat.c
219
cpu_map__snprint(evsel->core.cpus, buf, sizeof(buf));
tools/perf/builtin-stat.c
220
pr_warning(" %s: %s\n", evsel->name, buf);
tools/perf/builtin-stat.c
223
evsel__remove_from_group(evsel, leader);
tools/perf/builtin-stat.c
2418
struct evsel *counter;
tools/perf/builtin-stat.c
2625
struct evsel *counter;
tools/perf/builtin-stat.c
271
static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread,
tools/perf/builtin-stat.c
281
static int read_single_counter(struct evsel *counter, int cpu_map_idx, int thread)
tools/perf/builtin-stat.c
322
static int read_counter_cpu(struct evsel *counter, int cpu_map_idx)
tools/perf/builtin-stat.c
377
struct evsel *counter = evlist_cpu_itr.evsel;
tools/perf/builtin-stat.c
394
struct evsel *counter;
tools/perf/builtin-stat.c
410
struct evsel *counter;
tools/perf/builtin-stat.c
450
struct evsel *counter;
tools/perf/builtin-stat.c
498
struct evsel *evsel;
tools/perf/builtin-stat.c
501
evlist__for_each_entry(evsel_list, evsel) {
tools/perf/builtin-stat.c
502
if (!evsel__is_bpf(evsel))
tools/perf/builtin-stat.c
505
err = bpf_counter__enable(evsel);
tools/perf/builtin-stat.c
519
struct evsel *counter;
tools/perf/builtin-stat.c
547
static bool evsel__should_store_id(struct evsel *counter)
tools/perf/builtin-stat.c
659
static enum counter_recovery stat_handle_error(struct evsel *counter, int err)
tools/perf/builtin-stat.c
706
static int create_perf_stat_counter(struct evsel *evsel,
tools/perf/builtin-stat.c
710
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/builtin-stat.c
711
struct evsel *leader = evsel__leader(evsel);
tools/perf/builtin-stat.c
725
attr->inherit = !config->no_inherit && list_empty(&evsel->bpf_counter_list);
tools/perf/builtin-stat.c
751
if (evsel__is_group_leader(evsel)) {
tools/perf/builtin-stat.c
758
return evsel__open_per_cpu_and_thread(evsel, evsel__cpus(evsel), cpu_map_idx,
tools/perf/builtin-stat.c
759
evsel->core.threads);
tools/perf/builtin-stat.c
780
struct evsel *counter;
tools/perf/builtin-stat.c
815
counter = evlist_cpu_itr.evsel;
tools/perf/builtin-stat.c
859
counter = evlist_cpu_itr.evsel;
tools/perf/builtin-stat.c
868
counter = evlist_cpu_itr.evsel;
tools/perf/builtin-timechart.c
586
struct evsel *evsel = sample->evsel;
tools/perf/builtin-timechart.c
589
if (evsel->core.attr.sample_type & PERF_SAMPLE_TIME) {
tools/perf/builtin-timechart.c
596
if (evsel->handler != NULL) {
tools/perf/builtin-timechart.c
597
tracepoint_handler f = evsel->handler;
tools/perf/builtin-top.c
1003
if (evsel != evlist__first(evlist))
tools/perf/builtin-top.c
1016
struct evsel *counter;
tools/perf/builtin-top.c
115
struct evsel *evsel;
tools/perf/builtin-top.c
1151
struct evsel *evsel;
tools/perf/builtin-top.c
1168
evsel = sample.evsel;
tools/perf/builtin-top.c
1169
if (!evsel)
tools/perf/builtin-top.c
1170
evsel = evlist__id2evsel(session->evlist, sample.id);
tools/perf/builtin-top.c
1171
assert(evsel != NULL);
tools/perf/builtin-top.c
1174
if (evswitch__discard(&top->evswitch, evsel)) {
tools/perf/builtin-top.c
1217
perf_top__process_lost(top, event, evsel);
tools/perf/builtin-top.c
1219
perf_top__process_lost_samples(top, event, evsel);
tools/perf/builtin-top.c
125
evsel = hists_to_evsel(he->hists);
tools/perf/builtin-top.c
152
err = symbol__annotate(&he->ms, evsel, NULL);
tools/perf/builtin-top.c
245
struct evsel *evsel;
tools/perf/builtin-top.c
253
evsel = hists_to_evsel(he->hists);
tools/perf/builtin-top.c
260
symbol__calc_percent(symbol, evsel);
tools/perf/builtin-top.c
285
struct evsel *pos;
tools/perf/builtin-top.c
326
struct evsel *evsel = top->sym_evsel;
tools/perf/builtin-top.c
327
struct hists *hists = evsel__hists(evsel);
tools/perf/builtin-top.c
618
struct evsel *pos;
tools/perf/builtin-top.c
833
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/builtin-top.c
858
struct evsel *evsel)
tools/perf/builtin-top.c
862
evsel->evlist->stats.total_lost += event->lost.lost;
tools/perf/builtin-top.c
868
struct evsel *evsel)
tools/perf/builtin-top.c
872
evsel->evlist->stats.total_lost_samples += event->lost_samples.lost;
tools/perf/builtin-top.c
953
struct evsel *evsel;
tools/perf/builtin-top.c
956
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-top.c
958
config_terms = &evsel->config_terms;
tools/perf/builtin-top.c
979
if (evsel == evlist__first(evlist))
tools/perf/builtin-top.c
993
struct evsel *evsel)
tools/perf/builtin-top.c
997
struct evsel *counter;
tools/perf/builtin-trace.c
151
struct evsel *sys_enter,
tools/perf/builtin-trace.c
2257
static int evsel__init_tp_arg_scnprintf(struct evsel *evsel, bool *use_btf)
tools/perf/builtin-trace.c
2259
struct syscall_arg_fmt *fmt = evsel__syscall_arg_fmt(evsel);
tools/perf/builtin-trace.c
2262
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
2604
static struct syscall *trace__syscall_info(struct trace *trace, struct evsel *evsel,
tools/perf/builtin-trace.c
2625
id, evsel__name(evsel), ++n);
tools/perf/builtin-trace.c
2750
evsel__name(sample->evsel), ts,
tools/perf/builtin-trace.c
2801
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
2814
sc = trace__syscall_info(trace, evsel, e_machine, id);
tools/perf/builtin-trace.c
2843
if (evsel != trace->syscalls.events.sys_enter)
tools/perf/builtin-trace.c
2895
sc = trace__syscall_info(trace, sample->evsel, e_machine, id);
tools/perf/builtin-trace.c
2920
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
2922
int max_stack = evsel->core.attr.sample_max_stack ?
tools/perf/builtin-trace.c
2923
evsel->core.attr.sample_max_stack :
tools/perf/builtin-trace.c
2951
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
2963
sc = trace__syscall_info(trace, evsel, e_machine, id);
tools/perf/builtin-trace.c
3078
pr_err("Problem processing %s callchain, skipping...\n", evsel__name(evsel));
tools/perf/builtin-trace.c
3170
sample->evsel->name,
tools/perf/builtin-trace.c
3213
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
3216
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
3218
struct syscall_arg_fmt *arg = __evsel__syscall_arg_fmt(evsel);
tools/perf/builtin-trace.c
3244
offset = format_field__intval(field, sample, evsel->needs_swap);
tools/perf/builtin-trace.c
3253
val = format_field__intval(field, sample, evsel->needs_swap);
tools/perf/builtin-trace.c
3270
if (evsel__is_probe(evsel) && !strcmp(field->name, "__probe_ip")) {
tools/perf/builtin-trace.c
3306
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
3310
if (evsel->nr_events_printed >= evsel->max_events)
tools/perf/builtin-trace.c
3338
if (evsel == trace->syscalls.events.bpf_output) {
tools/perf/builtin-trace.c
3343
struct syscall *sc = trace__syscall_info(trace, evsel, e_machine, id);
tools/perf/builtin-trace.c
3359
fprintf(trace->output, "%s(", evsel->name);
tools/perf/builtin-trace.c
3361
if (evsel__is_bpf_output(evsel)) {
tools/perf/builtin-trace.c
3364
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
3384
pr_err("Problem processing %s callchain, skipping...\n", evsel__name(evsel));
tools/perf/builtin-trace.c
3388
if (evsel->max_events != ULONG_MAX && ++evsel->nr_events_printed == evsel->max_events) {
tools/perf/builtin-trace.c
3389
evsel__disable(evsel);
tools/perf/builtin-trace.c
3390
evsel__close(evsel);
tools/perf/builtin-trace.c
3443
if (sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ) {
tools/perf/builtin-trace.c
3460
sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
tools/perf/builtin-trace.c
3486
evsel__name(sample->evsel));
tools/perf/builtin-trace.c
3509
(sample->evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
tools/perf/builtin-trace.c
3519
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
3523
tracepoint_handler handler = evsel->handler;
tools/perf/builtin-trace.c
3614
struct evsel *evsel, *tmp;
tools/perf/builtin-trace.c
3624
evlist__for_each_entry_safe(evlist, evsel, tmp) {
tools/perf/builtin-trace.c
3625
if (!strstarts(evsel__name(evsel), "probe:vfs_getname"))
tools/perf/builtin-trace.c
3628
if (evsel__field(evsel, "pathname")) {
tools/perf/builtin-trace.c
3629
evsel->handler = trace__vfs_getname;
tools/perf/builtin-trace.c
3634
list_del_init(&evsel->core.node);
tools/perf/builtin-trace.c
3635
evsel->evlist = NULL;
tools/perf/builtin-trace.c
3636
evsel__delete(evsel);
tools/perf/builtin-trace.c
3642
static struct evsel *evsel__new_pgfault(u64 config)
tools/perf/builtin-trace.c
3644
struct evsel *evsel;
tools/perf/builtin-trace.c
3655
evsel = evsel__new(&attr);
tools/perf/builtin-trace.c
3656
if (evsel)
tools/perf/builtin-trace.c
3657
evsel->handler = trace__pgfault;
tools/perf/builtin-trace.c
3659
return evsel;
tools/perf/builtin-trace.c
3664
struct evsel *evsel;
tools/perf/builtin-trace.c
3666
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-trace.c
3667
evsel_trace__delete(evsel->priv);
tools/perf/builtin-trace.c
3668
evsel->priv = NULL;
tools/perf/builtin-trace.c
3681
if (sample->evsel == NULL)
tools/perf/builtin-trace.c
3682
sample->evsel = evlist__id2evsel(trace->evlist, sample->id);
tools/perf/builtin-trace.c
3684
if (sample->evsel == NULL) {
tools/perf/builtin-trace.c
3689
if (evswitch__discard(&trace->evswitch, sample->evsel))
tools/perf/builtin-trace.c
3694
if (sample->evsel->core.attr.type == PERF_TYPE_TRACEPOINT &&
tools/perf/builtin-trace.c
3697
evsel__name(sample->evsel), sample->tid,
tools/perf/builtin-trace.c
3700
tracepoint_handler handler = sample->evsel->handler;
tools/perf/builtin-trace.c
3713
struct evsel *sys_enter, *sys_exit;
tools/perf/builtin-trace.c
3761
struct evsel *sys_exit;
tools/perf/builtin-trace.c
377
static inline struct syscall_tp *__evsel__syscall_tp(struct evsel *evsel)
tools/perf/builtin-trace.c
379
struct evsel_trace *et = evsel->priv;
tools/perf/builtin-trace.c
384
static struct syscall_tp *evsel__syscall_tp(struct evsel *evsel)
tools/perf/builtin-trace.c
386
if (evsel->priv == NULL) {
tools/perf/builtin-trace.c
387
evsel->priv = evsel_trace__new();
tools/perf/builtin-trace.c
388
if (evsel->priv == NULL)
tools/perf/builtin-trace.c
392
return __evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
398
static inline struct syscall_arg_fmt *__evsel__syscall_arg_fmt(struct evsel *evsel)
tools/perf/builtin-trace.c
400
struct evsel_trace *et = evsel->priv;
tools/perf/builtin-trace.c
405
static struct syscall_arg_fmt *evsel__syscall_arg_fmt(struct evsel *evsel)
tools/perf/builtin-trace.c
407
struct evsel_trace *et = evsel->priv;
tools/perf/builtin-trace.c
409
if (evsel->priv == NULL) {
tools/perf/builtin-trace.c
410
et = evsel->priv = evsel_trace__new();
tools/perf/builtin-trace.c
417
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
427
return __evsel__syscall_arg_fmt(evsel);
tools/perf/builtin-trace.c
4286
static struct syscall_arg_fmt *evsel__find_syscall_arg_fmt_by_name(struct evsel *evsel, char *arg,
tools/perf/builtin-trace.c
4289
struct syscall_arg_fmt *fmt = __evsel__syscall_arg_fmt(evsel);
tools/perf/builtin-trace.c
4295
tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
430
evsel_trace__delete(evsel->priv);
tools/perf/builtin-trace.c
431
evsel->priv = NULL;
tools/perf/builtin-trace.c
4310
static int trace__expand_filter(struct trace *trace, struct evsel *evsel)
tools/perf/builtin-trace.c
4312
char *tok, *left = evsel->filter, *new_filter = evsel->filter;
tools/perf/builtin-trace.c
435
static int evsel__init_tp_uint_field(struct evsel *evsel, struct tp_field *field, const char *name)
tools/perf/builtin-trace.c
4350
fmt = evsel__find_syscall_arg_fmt_by_name(evsel, arg, &type);
tools/perf/builtin-trace.c
4353
arg, evsel->name, evsel->filter);
tools/perf/builtin-trace.c
437
struct tep_format_field *format_field = evsel__field(evsel, name);
tools/perf/builtin-trace.c
4381
if (new_filter != evsel->filter)
tools/perf/builtin-trace.c
4387
right_size, right, arg, evsel->name, evsel->filter);
tools/perf/builtin-trace.c
4392
arg, evsel->name, evsel->filter);
tools/perf/builtin-trace.c
4402
if (new_filter != evsel->filter) {
tools/perf/builtin-trace.c
4403
pr_debug("New filter for %s: %s\n", evsel->name, new_filter);
tools/perf/builtin-trace.c
4404
evsel__set_filter(evsel, new_filter);
tools/perf/builtin-trace.c
4411
static int trace__expand_filters(struct trace *trace, struct evsel **err_evsel)
tools/perf/builtin-trace.c
4414
struct evsel *evsel;
tools/perf/builtin-trace.c
4416
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-trace.c
4417
if (evsel->filter == NULL)
tools/perf/builtin-trace.c
442
return tp_field__init_uint(field, format_field, evsel->needs_swap);
tools/perf/builtin-trace.c
4420
if (trace__expand_filter(trace, evsel)) {
tools/perf/builtin-trace.c
4421
*err_evsel = evsel;
tools/perf/builtin-trace.c
4432
struct evsel *evsel, *pgfault_maj = NULL, *pgfault_min = NULL;
tools/perf/builtin-trace.c
445
#define perf_evsel__init_sc_tp_uint_field(evsel, name) \
tools/perf/builtin-trace.c
446
({ struct syscall_tp *sc = __evsel__syscall_tp(evsel);\
tools/perf/builtin-trace.c
447
evsel__init_tp_uint_field(evsel, &sc->name, #name); })
tools/perf/builtin-trace.c
449
static int evsel__init_tp_ptr_field(struct evsel *evsel, struct tp_field *field, const char *name)
tools/perf/builtin-trace.c
451
struct tep_format_field *format_field = evsel__field(evsel, name);
tools/perf/builtin-trace.c
4577
err = trace__expand_filters(trace, &evsel);
tools/perf/builtin-trace.c
4580
err = evlist__apply_filters(evlist, &evsel, &trace->opts.target);
tools/perf/builtin-trace.c
459
#define perf_evsel__init_sc_tp_ptr_field(evsel, name) \
tools/perf/builtin-trace.c
460
({ struct syscall_tp *sc = __evsel__syscall_tp(evsel);\
tools/perf/builtin-trace.c
461
evsel__init_tp_ptr_field(evsel, &sc->name, #name); })
tools/perf/builtin-trace.c
4614
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-trace.c
4615
if (evsel__has_callchain(evsel) &&
tools/perf/builtin-trace.c
4616
evsel->core.attr.sample_max_stack == 0)
tools/perf/builtin-trace.c
4617
evsel->core.attr.sample_max_stack = trace->max_stack;
tools/perf/builtin-trace.c
463
static void evsel__delete_priv(struct evsel *evsel)
tools/perf/builtin-trace.c
465
zfree(&evsel->priv);
tools/perf/builtin-trace.c
466
evsel__delete(evsel);
tools/perf/builtin-trace.c
469
static int evsel__init_syscall_tp(struct evsel *evsel)
tools/perf/builtin-trace.c
471
struct syscall_tp *sc = evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
4731
evsel->filter, evsel__name(evsel));
tools/perf/builtin-trace.c
474
if (evsel__init_tp_uint_field(evsel, &sc->id, "__syscall_nr") &&
tools/perf/builtin-trace.c
475
evsel__init_tp_uint_field(evsel, &sc->id, "nr"))
tools/perf/builtin-trace.c
4754
struct evsel *evsel;
tools/perf/builtin-trace.c
4794
evsel = evlist__find_tracepoint_by_name(session->evlist, "raw_syscalls:sys_enter");
tools/perf/builtin-trace.c
4795
trace->syscalls.events.sys_enter = evsel;
tools/perf/builtin-trace.c
4797
if (evsel == NULL)
tools/perf/builtin-trace.c
4798
evsel = evlist__find_tracepoint_by_name(session->evlist, "syscalls:sys_enter");
tools/perf/builtin-trace.c
4800
if (evsel &&
tools/perf/builtin-trace.c
4801
(evsel__init_raw_syscall_tp(evsel, trace__sys_enter) < 0 ||
tools/perf/builtin-trace.c
4802
perf_evsel__init_sc_tp_ptr_field(evsel, args))) {
tools/perf/builtin-trace.c
4807
evsel = evlist__find_tracepoint_by_name(session->evlist, "raw_syscalls:sys_exit");
tools/perf/builtin-trace.c
4808
trace->syscalls.events.sys_exit = evsel;
tools/perf/builtin-trace.c
4809
if (evsel == NULL)
tools/perf/builtin-trace.c
4810
evsel = evlist__find_tracepoint_by_name(session->evlist, "syscalls:sys_exit");
tools/perf/builtin-trace.c
4811
if (evsel &&
tools/perf/builtin-trace.c
4812
(evsel__init_raw_syscall_tp(evsel, trace__sys_exit) < 0 ||
tools/perf/builtin-trace.c
4813
perf_evsel__init_sc_tp_uint_field(evsel, ret))) {
tools/perf/builtin-trace.c
4818
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/builtin-trace.c
4819
if (evsel->core.attr.type == PERF_TYPE_SOFTWARE &&
tools/perf/builtin-trace.c
4820
(evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ||
tools/perf/builtin-trace.c
4821
evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MIN ||
tools/perf/builtin-trace.c
4822
evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS))
tools/perf/builtin-trace.c
4823
evsel->handler = trace__pgfault;
tools/perf/builtin-trace.c
484
static int evsel__init_augmented_syscall_tp(struct evsel *evsel, struct evsel *tp)
tools/perf/builtin-trace.c
486
struct syscall_tp *sc = evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
493
__tp_field__init_uint(&sc->id, syscall_id->size, syscall_id->offset, evsel->needs_swap))
tools/perf/builtin-trace.c
502
static int evsel__init_augmented_syscall_tp_args(struct evsel *evsel)
tools/perf/builtin-trace.c
504
struct syscall_tp *sc = __evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
509
static int evsel__init_augmented_syscall_tp_ret(struct evsel *evsel)
tools/perf/builtin-trace.c
511
struct syscall_tp *sc = __evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
513
return __tp_field__init_uint(&sc->ret, sizeof(u64), sc->id.offset + sizeof(u64), evsel->needs_swap);
tools/perf/builtin-trace.c
5141
struct evsel *evsel;
tools/perf/builtin-trace.c
5143
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-trace.c
5144
if (evsel->handler == NULL)
tools/perf/builtin-trace.c
5145
evsel->handler = handler;
tools/perf/builtin-trace.c
5149
static void evsel__set_syscall_arg_fmt(struct evsel *evsel, const char *name)
tools/perf/builtin-trace.c
5151
struct syscall_arg_fmt *fmt = evsel__syscall_arg_fmt(evsel);
tools/perf/builtin-trace.c
5157
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
516
static int evsel__init_raw_syscall_tp(struct evsel *evsel, void *handler)
tools/perf/builtin-trace.c
5175
struct evsel *evsel;
tools/perf/builtin-trace.c
5177
evlist__for_each_entry(evlist, evsel) {
tools/perf/builtin-trace.c
518
if (evsel__syscall_tp(evsel) != NULL) {
tools/perf/builtin-trace.c
5180
if (evsel->priv)
tools/perf/builtin-trace.c
5183
tp_format = evsel__tp_format(evsel);
tools/perf/builtin-trace.c
5188
evsel__init_tp_arg_scnprintf(evsel, use_btf);
tools/perf/builtin-trace.c
519
if (perf_evsel__init_sc_tp_uint_field(evsel, id))
tools/perf/builtin-trace.c
5192
if (evsel__init_syscall_tp(evsel))
tools/perf/builtin-trace.c
5196
struct syscall_tp *sc = __evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
5201
evsel__set_syscall_arg_fmt(evsel,
tools/perf/builtin-trace.c
5204
struct syscall_tp *sc = __evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
5208
evsel->needs_swap))
tools/perf/builtin-trace.c
5211
evsel__set_syscall_arg_fmt(evsel,
tools/perf/builtin-trace.c
522
evsel->handler = handler;
tools/perf/builtin-trace.c
529
static struct evsel *perf_evsel__raw_syscall_newtp(const char *direction, void *handler)
tools/perf/builtin-trace.c
531
struct evsel *evsel = evsel__newtp("raw_syscalls", direction);
tools/perf/builtin-trace.c
534
if (IS_ERR(evsel))
tools/perf/builtin-trace.c
535
evsel = evsel__newtp("syscalls", direction);
tools/perf/builtin-trace.c
537
if (IS_ERR(evsel))
tools/perf/builtin-trace.c
540
if (evsel__init_raw_syscall_tp(evsel, handler))
tools/perf/builtin-trace.c
543
return evsel;
tools/perf/builtin-trace.c
546
evsel__delete_priv(evsel);
tools/perf/builtin-trace.c
551
({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
tools/perf/builtin-trace.c
5548
struct evsel *evsel;
tools/perf/builtin-trace.c
555
({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
tools/perf/builtin-trace.c
5713
evlist__for_each_entry(trace.evlist, evsel) {
tools/perf/builtin-trace.c
5714
bool raw_syscalls_sys_exit = evsel__name_is(evsel, "raw_syscalls:sys_exit");
tools/perf/builtin-trace.c
5722
strstr(evsel__name(evsel), "syscalls:sys_enter")) {
tools/perf/builtin-trace.c
5723
struct evsel *augmented = trace.syscalls.events.bpf_output;
tools/perf/builtin-trace.c
5724
if (evsel__init_augmented_syscall_tp(augmented, evsel) ||
tools/perf/builtin-trace.c
5739
if (evsel__init_augmented_syscall_tp(evsel, evsel) ||
tools/perf/builtin-trace.c
5740
evsel__init_augmented_syscall_tp_args(evsel))
tools/perf/builtin-trace.c
5742
evsel->handler = trace__sys_enter;
tools/perf/builtin-trace.c
5745
if (strstarts(evsel__name(evsel), "syscalls:sys_exit_")) {
tools/perf/builtin-trace.c
5748
if (evsel__init_augmented_syscall_tp(evsel, evsel))
tools/perf/builtin-trace.c
5750
sc = __evsel__syscall_tp(evsel);
tools/perf/builtin-trace.c
5772
evsel__init_augmented_syscall_tp_ret(evsel);
tools/perf/builtin-trace.c
5773
evsel->handler = trace__sys_exit;
tools/perf/tests/backward-ring-buffer.c
90
struct evsel *evsel __maybe_unused;
tools/perf/tests/code-reading.c
705
struct evsel *evsel = NULL;
tools/perf/tests/code-reading.c
796
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/code-reading.c
797
evsel->core.attr.comm = 1;
tools/perf/tests/code-reading.c
798
evsel->core.attr.disabled = 1;
tools/perf/tests/code-reading.c
799
evsel->core.attr.enable_on_exec = 0;
tools/perf/tests/event-times.c
105
struct evsel *evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
107
return evsel__enable(evsel);
tools/perf/tests/event-times.c
112
struct evsel *evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
124
evsel->core.attr.disabled = 1;
tools/perf/tests/event-times.c
126
err = evsel__open_per_cpu(evsel, cpus, -1);
tools/perf/tests/event-times.c
136
return evsel__enable(evsel);
tools/perf/tests/event-times.c
141
struct evsel *evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
153
err = evsel__open_per_cpu(evsel, cpus, -1);
tools/perf/tests/event-times.c
166
struct evsel *evsel;
tools/perf/tests/event-times.c
181
evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
182
evsel->core.attr.read_format |=
tools/perf/tests/event-times.c
19
struct evsel *evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
199
perf_evsel__read(&evsel->core, 0, 0, &count);
tools/perf/tests/event-times.c
39
evsel->core.attr.enable_on_exec = 1;
tools/perf/tests/event-times.c
59
struct evsel *evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
71
evsel->core.attr.disabled = 1;
tools/perf/tests/event-times.c
73
err = evsel__open_per_thread(evsel, threads);
tools/perf/tests/event-times.c
80
return evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL;
tools/perf/tests/event-times.c
85
struct evsel *evsel = evlist__last(evlist);
tools/perf/tests/event-times.c
97
err = evsel__open_per_thread(evsel, threads);
tools/perf/tests/event_update.c
101
!perf_event__synthesize_event_update_unit(NULL, evsel, process_event_unit));
tools/perf/tests/event_update.c
103
evsel->scale = 0.123;
tools/perf/tests/event_update.c
106
!perf_event__synthesize_event_update_scale(NULL, evsel, process_event_scale));
tools/perf/tests/event_update.c
109
tmp.name = evsel__name(evsel);
tools/perf/tests/event_update.c
112
!perf_event__synthesize_event_update_name(&tmp.tool, evsel, process_event_name));
tools/perf/tests/event_update.c
114
perf_cpu_map__put(evsel->core.pmu_cpus);
tools/perf/tests/event_update.c
115
evsel->core.pmu_cpus = perf_cpu_map__new("1,2,3");
tools/perf/tests/event_update.c
118
!perf_event__synthesize_event_update_cpus(&tmp.tool, evsel, process_event_cpus));
tools/perf/tests/event_update.c
83
struct evsel *evsel;
tools/perf/tests/event_update.c
90
evsel = evlist__first(evlist);
tools/perf/tests/event_update.c
93
!perf_evsel__alloc_id(&evsel->core, 1, 1));
tools/perf/tests/event_update.c
95
perf_evlist__id_add(&evlist->core, &evsel->core, 0, 0, 123);
tools/perf/tests/event_update.c
97
free((char *)evsel->unit);
tools/perf/tests/event_update.c
98
evsel->unit = strdup("KRAVA");
tools/perf/tests/evsel-roundtrip-name.c
22
struct evsel *evsel;
tools/perf/tests/evsel-roundtrip-name.c
39
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/evsel-roundtrip-name.c
40
if (!evsel__name_is(evsel, name)) {
tools/perf/tests/evsel-roundtrip-name.c
41
pr_debug("%s != %s\n", evsel__name(evsel), name);
tools/perf/tests/evsel-roundtrip-name.c
58
struct evsel *evsel;
tools/perf/tests/evsel-roundtrip-name.c
73
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/evsel-roundtrip-name.c
74
if (!evsel__name_is(evsel, names[i])) {
tools/perf/tests/evsel-roundtrip-name.c
75
pr_debug("%s != %s\n", evsel__name(evsel), names[i]);
tools/perf/tests/evsel-tp-sched.c
10
struct tep_format_field *field = evsel__field(evsel, name);
tools/perf/tests/evsel-tp-sched.c
15
pr_debug("%s: \"%s\" field not found!\n", evsel->name, name);
tools/perf/tests/evsel-tp-sched.c
22
evsel->name, name, is_signed, should_be_signed);
tools/perf/tests/evsel-tp-sched.c
28
evsel->name, name, field->size, size);
tools/perf/tests/evsel-tp-sched.c
38
struct evsel *evsel = evsel__newtp("sched", "sched_switch");
tools/perf/tests/evsel-tp-sched.c
41
if (IS_ERR(evsel)) {
tools/perf/tests/evsel-tp-sched.c
42
pr_debug("evsel__newtp failed with %ld\n", PTR_ERR(evsel));
tools/perf/tests/evsel-tp-sched.c
43
return PTR_ERR(evsel) == -EACCES ? TEST_SKIP : TEST_FAIL;
tools/perf/tests/evsel-tp-sched.c
46
if (evsel__test_field(evsel, "prev_comm", 16, false))
tools/perf/tests/evsel-tp-sched.c
49
if (evsel__test_field(evsel, "prev_pid", 4, true))
tools/perf/tests/evsel-tp-sched.c
52
if (evsel__test_field(evsel, "prev_prio", 4, true))
tools/perf/tests/evsel-tp-sched.c
55
if (evsel__test_field(evsel, "prev_state", sizeof(long), true))
tools/perf/tests/evsel-tp-sched.c
58
if (evsel__test_field(evsel, "next_comm", 16, false))
tools/perf/tests/evsel-tp-sched.c
61
if (evsel__test_field(evsel, "next_pid", 4, true))
tools/perf/tests/evsel-tp-sched.c
64
if (evsel__test_field(evsel, "next_prio", 4, true))
tools/perf/tests/evsel-tp-sched.c
67
evsel__delete(evsel);
tools/perf/tests/evsel-tp-sched.c
69
evsel = evsel__newtp("sched", "sched_wakeup");
tools/perf/tests/evsel-tp-sched.c
71
if (IS_ERR(evsel)) {
tools/perf/tests/evsel-tp-sched.c
72
pr_debug("evsel__newtp failed with %ld\n", PTR_ERR(evsel));
tools/perf/tests/evsel-tp-sched.c
76
if (evsel__test_field(evsel, "comm", 16, false))
tools/perf/tests/evsel-tp-sched.c
79
if (evsel__test_field(evsel, "pid", 4, true))
tools/perf/tests/evsel-tp-sched.c
8
static int evsel__test_field(struct evsel *evsel, const char *name, int size, bool should_be_signed)
tools/perf/tests/evsel-tp-sched.c
82
if (evsel__test_field(evsel, "prio", 4, true))
tools/perf/tests/evsel-tp-sched.c
85
if (evsel__test_field(evsel, "target_cpu", 4, true))
tools/perf/tests/evsel-tp-sched.c
88
evsel__delete(evsel);
tools/perf/tests/expand-cgroup.c
27
struct evsel *evsel;
tools/perf/tests/expand-cgroup.c
38
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/expand-cgroup.c
39
ev_name[i] = strdup(evsel->name);
tools/perf/tests/expand-cgroup.c
63
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/expand-cgroup.c
64
if (!evsel__name_is(evsel, ev_name[i % nr_events])) {
tools/perf/tests/expand-cgroup.c
67
i, evsel->name, ev_name[i % nr_events]);
tools/perf/tests/expand-cgroup.c
70
if (strcmp(evsel->cgrp->name, cgrp_name[i / nr_events])) {
tools/perf/tests/expand-cgroup.c
73
i, evsel->cgrp->name, cgrp_name[i / nr_events]);
tools/perf/tests/expand-cgroup.c
78
if (evsel__is_group_event(evsel) != was_group_event) {
tools/perf/tests/expand-cgroup.c
80
evsel__is_group_event(evsel) ? "true" : "false",
tools/perf/tests/expand-cgroup.c
84
if (evsel->core.nr_members != nr_members) {
tools/perf/tests/expand-cgroup.c
86
evsel->core.nr_members, nr_members);
tools/perf/tests/hists_cumulate.c
163
typedef int (*test_fn_t)(struct evsel *, struct machine *);
tools/perf/tests/hists_cumulate.c
262
static int test1(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_cumulate.c
265
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_cumulate.c
295
evsel__reset_sample_bit(evsel, CALLCHAIN);
tools/perf/tests/hists_cumulate.c
313
static int test2(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_cumulate.c
316
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_cumulate.c
442
evsel__set_sample_bit(evsel, CALLCHAIN);
tools/perf/tests/hists_cumulate.c
461
static int test3(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_cumulate.c
464
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_cumulate.c
500
evsel__reset_sample_bit(evsel, CALLCHAIN);
tools/perf/tests/hists_cumulate.c
518
static int test4(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_cumulate.c
521
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_cumulate.c
684
evsel__set_sample_bit(evsel, CALLCHAIN);
tools/perf/tests/hists_cumulate.c
709
struct evsel *evsel;
tools/perf/tests/hists_cumulate.c
737
evsel = evlist__first(evlist);
tools/perf/tests/hists_cumulate.c
740
err = testcases[i](evsel, machine);
tools/perf/tests/hists_cumulate.c
83
struct evsel *evsel = hists_to_evsel(hists);
tools/perf/tests/hists_cumulate.c
84
struct perf_sample sample = { .evsel = evsel, .period = 1000, };
tools/perf/tests/hists_filter.c
121
struct evsel *evsel;
tools/perf/tests/hists_filter.c
154
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/hists_filter.c
155
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_filter.c
158
evsel__output_resort(evsel, NULL);
tools/perf/tests/hists_filter.c
52
struct evsel *evsel;
tools/perf/tests/hists_filter.c
63
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/hists_filter.c
70
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_filter.c
72
sample.evsel = evsel;
tools/perf/tests/hists_link.c
292
struct evsel *evsel, *first;
tools/perf/tests/hists_link.c
326
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/hists_link.c
327
hists = evsel__hists(evsel);
tools/perf/tests/hists_link.c
335
evsel = evlist__last(evlist);
tools/perf/tests/hists_link.c
338
hists = evsel__hists(evsel);
tools/perf/tests/hists_link.c
68
struct evsel *evsel;
tools/perf/tests/hists_link.c
80
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/hists_link.c
81
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_output.c
128
typedef int (*test_fn_t)(struct evsel *, struct machine *);
tools/perf/tests/hists_output.c
137
static int test1(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_output.c
140
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_output.c
170
evsel__output_resort(evsel, NULL);
tools/perf/tests/hists_output.c
239
static int test2(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_output.c
242
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_output.c
270
evsel__output_resort(evsel, NULL);
tools/perf/tests/hists_output.c
295
static int test3(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_output.c
298
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_output.c
324
evsel__output_resort(evsel, NULL);
tools/perf/tests/hists_output.c
369
static int test4(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_output.c
372
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_output.c
402
evsel__output_resort(evsel, NULL);
tools/perf/tests/hists_output.c
471
static int test5(struct evsel *evsel, struct machine *machine)
tools/perf/tests/hists_output.c
474
struct hists *hists = evsel__hists(evsel);
tools/perf/tests/hists_output.c
505
evsel__output_resort(evsel, NULL);
tools/perf/tests/hists_output.c
53
struct evsel *evsel = hists_to_evsel(hists);
tools/perf/tests/hists_output.c
54
struct perf_sample sample = { .evsel = evsel, .period = 100, };
tools/perf/tests/hists_output.c
595
struct evsel *evsel;
tools/perf/tests/hists_output.c
624
evsel = evlist__first(evlist);
tools/perf/tests/hists_output.c
627
err = testcases[i](evsel, machine);
tools/perf/tests/hwmon_pmu.c
159
struct evsel *evsel;
tools/perf/tests/hwmon_pmu.c
194
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/hwmon_pmu.c
195
if (!evsel->pmu || !evsel->pmu->name ||
tools/perf/tests/hwmon_pmu.c
196
strcmp(evsel->pmu->name, "hwmon_a_test_hwmon_pmu"))
tools/perf/tests/hwmon_pmu.c
199
if (evsel->core.attr.config != (u64)test_events[i].key.type_and_num) {
tools/perf/tests/hwmon_pmu.c
202
(uint64_t)evsel->core.attr.config,
tools/perf/tests/keep-tracking.c
100
evsel->core.attr.disabled = 1;
tools/perf/tests/keep-tracking.c
101
evsel->core.attr.enable_on_exec = 0;
tools/perf/tests/keep-tracking.c
136
evsel = evlist__last(evlist);
tools/perf/tests/keep-tracking.c
138
CHECK__(evsel__disable(evsel));
tools/perf/tests/keep-tracking.c
77
struct evsel *evsel = NULL;
tools/perf/tests/keep-tracking.c
97
evsel = evlist__first(evlist);
tools/perf/tests/keep-tracking.c
99
evsel->core.attr.comm = 1;
tools/perf/tests/mmap-basic.c
149
evsel = sample.evsel;
tools/perf/tests/mmap-basic.c
150
if (!evsel)
tools/perf/tests/mmap-basic.c
151
evsel = evlist__id2evsel(evlist, sample.id);
tools/perf/tests/mmap-basic.c
153
if (evsel == NULL) {
tools/perf/tests/mmap-basic.c
158
nr_events[evsel->core.idx]++;
tools/perf/tests/mmap-basic.c
165
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/mmap-basic.c
166
if (nr_events[evsel->core.idx] != expected_nr_events[evsel->core.idx]) {
tools/perf/tests/mmap-basic.c
168
expected_nr_events[evsel->core.idx],
tools/perf/tests/mmap-basic.c
169
evsel__name(evsel), nr_events[evsel->core.idx]);
tools/perf/tests/mmap-basic.c
253
struct perf_evsel *evsel = NULL;
tools/perf/tests/mmap-basic.c
271
evsel = perf_evsel__new(&attr);
tools/perf/tests/mmap-basic.c
272
if (!evsel) {
tools/perf/tests/mmap-basic.c
279
err = perf_evsel__open(evsel, NULL, threads);
tools/perf/tests/mmap-basic.c
287
err = perf_evsel__mmap(evsel, 0);
tools/perf/tests/mmap-basic.c
296
pc = perf_evsel__mmap_base(evsel, 0, 0);
tools/perf/tests/mmap-basic.c
330
perf_evsel__read(evsel, 0, 0, &counts);
tools/perf/tests/mmap-basic.c
343
perf_evsel__read(evsel, 0, 0, &counts);
tools/perf/tests/mmap-basic.c
348
perf_evsel__read(evsel, 0, 0, &counts);
tools/perf/tests/mmap-basic.c
363
perf_evsel__munmap(evsel);
tools/perf/tests/mmap-basic.c
365
perf_evsel__close(evsel);
tools/perf/tests/mmap-basic.c
366
perf_evsel__delete(evsel);
tools/perf/tests/mmap-basic.c
52
struct evsel *evsels[nsyscalls], *evsel;
tools/perf/tests/openat-syscall-all-cpus.c
102
if (evsel__read_on_cpu(evsel, idx, 0) < 0) {
tools/perf/tests/openat-syscall-all-cpus.c
109
if (perf_counts(evsel->counts, idx, 0)->val != expected) {
tools/perf/tests/openat-syscall-all-cpus.c
111
expected, cpu.cpu, perf_counts(evsel->counts, idx, 0)->val);
tools/perf/tests/openat-syscall-all-cpus.c
116
evsel__free_counts(evsel);
tools/perf/tests/openat-syscall-all-cpus.c
118
perf_evsel__close_fd(&evsel->core);
tools/perf/tests/openat-syscall-all-cpus.c
120
evsel__delete(evsel);
tools/perf/tests/openat-syscall-all-cpus.c
29
struct evsel *evsel;
tools/perf/tests/openat-syscall-all-cpus.c
49
evsel = evsel__newtp("syscalls", "sys_enter_openat");
tools/perf/tests/openat-syscall-all-cpus.c
50
if (IS_ERR(evsel)) {
tools/perf/tests/openat-syscall-all-cpus.c
57
if (evsel__open(evsel, cpus, threads) < 0) {
tools/perf/tests/openat-syscall-all-cpus.c
92
evsel->core.cpus = perf_cpu_map__get(cpus);
tools/perf/tests/openat-syscall-tp-fields.c
114
err = evsel__parse_sample(evsel, event, &sample);
tools/perf/tests/openat-syscall-tp-fields.c
41
struct evsel *evsel;
tools/perf/tests/openat-syscall-tp-fields.c
50
evsel = evsel__newtp("syscalls", "sys_enter_openat");
tools/perf/tests/openat-syscall-tp-fields.c
51
if (IS_ERR(evsel)) {
tools/perf/tests/openat-syscall-tp-fields.c
53
ret = PTR_ERR(evsel) == -EACCES ? TEST_SKIP : TEST_FAIL;
tools/perf/tests/openat-syscall-tp-fields.c
57
evlist__add(evlist, evsel);
tools/perf/tests/openat-syscall-tp-fields.c
65
evsel__config(evsel, &opts, NULL);
tools/perf/tests/openat-syscall.c
21
struct evsel *evsel;
tools/perf/tests/openat-syscall.c
32
evsel = evsel__newtp("syscalls", "sys_enter_openat");
tools/perf/tests/openat-syscall.c
33
if (IS_ERR(evsel)) {
tools/perf/tests/openat-syscall.c
40
if (evsel__open_per_thread(evsel, threads) < 0) {
tools/perf/tests/openat-syscall.c
53
if (evsel__read_on_cpu(evsel, 0, 0) < 0) {
tools/perf/tests/openat-syscall.c
58
if (perf_counts(evsel->counts, 0, 0)->val != nr_openat_calls) {
tools/perf/tests/openat-syscall.c
60
nr_openat_calls, perf_counts(evsel->counts, 0, 0)->val);
tools/perf/tests/openat-syscall.c
66
perf_evsel__close_fd(&evsel->core);
tools/perf/tests/openat-syscall.c
68
evsel__delete(evsel);
tools/perf/tests/parse-events.c
1002
TEST_ASSERT_EVSEL("unexpected event", evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1003
evsel);
tools/perf/tests/parse-events.c
1004
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1005
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1006
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1007
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1008
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1009
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1010
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1011
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1018
struct evsel *evsel, *group1_leader = NULL, *group2_leader = NULL;
tools/perf/tests/parse-events.c
1030
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
1031
if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) {
tools/perf/tests/parse-events.c
1033
group1_leader = evsel;
tools/perf/tests/parse-events.c
1035
evsel->core.attr.sample_type == PERF_TP_SAMPLE_TYPE,
tools/perf/tests/parse-events.c
1036
evsel);
tools/perf/tests/parse-events.c
1038
1 == evsel->core.attr.sample_period,
tools/perf/tests/parse-events.c
1039
evsel);
tools/perf/tests/parse-events.c
1040
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user,
tools/perf/tests/parse-events.c
1041
evsel);
tools/perf/tests/parse-events.c
1042
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel,
tools/perf/tests/parse-events.c
1043
evsel);
tools/perf/tests/parse-events.c
1044
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1045
TEST_ASSERT_EVSEL("wrong exclude guest", evsel->core.attr.exclude_guest,
tools/perf/tests/parse-events.c
1046
evsel);
tools/perf/tests/parse-events.c
1047
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host,
tools/perf/tests/parse-events.c
1048
evsel);
tools/perf/tests/parse-events.c
1049
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1050
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1051
TEST_ASSERT_EVSEL("wrong group name", !strcmp(evsel->group_name, "group1"),
tools/perf/tests/parse-events.c
1052
evsel);
tools/perf/tests/parse-events.c
1053
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2,
tools/perf/tests/parse-events.c
1054
evsel);
tools/perf/tests/parse-events.c
1055
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1056
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1059
if (evsel__match(evsel, HARDWARE, HW_CPU_CYCLES)) {
tools/perf/tests/parse-events.c
1060
if (evsel->core.attr.exclude_user) {
tools/perf/tests/parse-events.c
1063
evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1065
!evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1066
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv,
tools/perf/tests/parse-events.c
1067
evsel);
tools/perf/tests/parse-events.c
1069
!evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1071
!evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1073
evsel->core.attr.precise_ip == 3, evsel);
tools/perf/tests/parse-events.c
1074
if (evsel__has_leader(evsel, group1_leader)) {
tools/perf/tests/parse-events.c
1075
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name,
tools/perf/tests/parse-events.c
1076
evsel);
tools/perf/tests/parse-events.c
1078
evsel__group_idx(evsel) == 1,
tools/perf/tests/parse-events.c
1079
evsel);
tools/perf/tests/parse-events.c
1081
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1084
group2_leader = evsel;
tools/perf/tests/parse-events.c
1086
!evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1088
!evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1090
!evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1092
evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1093
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip,
tools/perf/tests/parse-events.c
1094
evsel);
tools/perf/tests/parse-events.c
1095
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel),
tools/perf/tests/parse-events.c
1096
evsel);
tools/perf/tests/parse-events.c
1097
if (evsel->core.nr_members == 2) {
tools/perf/tests/parse-events.c
1099
evsel__group_idx(evsel) == 0,
tools/perf/tests/parse-events.c
110
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1100
evsel);
tools/perf/tests/parse-events.c
1102
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1106
if (evsel->core.attr.type == 1) {
tools/perf/tests/parse-events.c
1108
TEST_ASSERT_EVSEL("wrong config", 3 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
1109
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user,
tools/perf/tests/parse-events.c
1110
evsel);
tools/perf/tests/parse-events.c
1111
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel,
tools/perf/tests/parse-events.c
1112
evsel);
tools/perf/tests/parse-events.c
1113
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1114
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest,
tools/perf/tests/parse-events.c
1115
evsel);
tools/perf/tests/parse-events.c
1116
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host,
tools/perf/tests/parse-events.c
1117
evsel);
tools/perf/tests/parse-events.c
1118
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1119
if (evsel__has_leader(evsel, group2_leader)) {
tools/perf/tests/parse-events.c
1120
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1,
tools/perf/tests/parse-events.c
1121
evsel);
tools/perf/tests/parse-events.c
1123
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1128
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
1129
evsel);
tools/perf/tests/parse-events.c
1130
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1131
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1132
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1133
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1134
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1135
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1136
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1137
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
114
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
1144
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1155
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1157
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1158
evsel);
tools/perf/tests/parse-events.c
1159
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
116
PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type, evsel);
tools/perf/tests/parse-events.c
1160
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1161
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1162
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1163
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1164
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip == 1, evsel);
tools/perf/tests/parse-events.c
1165
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1166
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1167
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1168
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1169
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
117
TEST_ASSERT_EVSEL("wrong sample_period", 1 == evsel->core.attr.sample_period, evsel);
tools/perf/tests/parse-events.c
1172
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1174
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
1175
evsel);
tools/perf/tests/parse-events.c
1176
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1177
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1178
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1179
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1180
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1181
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip == 2, evsel);
tools/perf/tests/parse-events.c
1182
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1183
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
1184
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1191
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1202
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1204
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1205
evsel);
tools/perf/tests/parse-events.c
1206
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1207
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1208
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1209
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1210
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1211
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1212
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1213
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1214
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1215
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1216
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1219
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1221
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
1222
evsel);
tools/perf/tests/parse-events.c
1223
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1224
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1225
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1226
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1227
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1228
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1229
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
123
struct evsel *evsel;
tools/perf/tests/parse-events.c
1230
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
1231
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1235
evsel = leader = evsel__next(evsel);
tools/perf/tests/parse-events.c
1237
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1238
evsel);
tools/perf/tests/parse-events.c
1239
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1240
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1241
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1242
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1243
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1244
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1245
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1246
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1247
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1248
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1249
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1252
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1254
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
1255
evsel);
tools/perf/tests/parse-events.c
1256
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1257
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1258
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1259
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1260
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1261
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1262
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1263
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
1267
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1269
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1270
evsel);
tools/perf/tests/parse-events.c
1271
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1272
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1273
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1274
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1275
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1276
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1277
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
128
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
1284
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1295
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1297
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1298
evsel);
tools/perf/tests/parse-events.c
1299
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
130
PERF_TYPE_TRACEPOINT == evsel->core.attr.type,
tools/perf/tests/parse-events.c
1300
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1301
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1302
TEST_ASSERT_EVSEL("wrong exclude guest", evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1303
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1304
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1305
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1306
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1307
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1308
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
131
evsel);
tools/perf/tests/parse-events.c
1311
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1313
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
1314
evsel);
tools/perf/tests/parse-events.c
1315
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1316
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1317
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1318
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1319
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1320
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1321
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1322
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
1329
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
133
PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type,
tools/perf/tests/parse-events.c
134
evsel);
tools/perf/tests/parse-events.c
1340
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1342
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1343
evsel);
tools/perf/tests/parse-events.c
1344
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1345
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1346
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1347
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1348
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1349
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1350
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1351
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1352
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1353
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1356
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1358
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
1359
evsel);
tools/perf/tests/parse-events.c
136
1 == evsel->core.attr.sample_period,
tools/perf/tests/parse-events.c
1360
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1361
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1362
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1363
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1364
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1365
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1366
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1367
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
137
evsel);
tools/perf/tests/parse-events.c
1374
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1385
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1387
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1388
evsel);
tools/perf/tests/parse-events.c
1389
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1390
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1391
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1392
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1393
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1394
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1395
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1396
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1397
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1398
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1401
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1403
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
1404
evsel);
tools/perf/tests/parse-events.c
1405
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1406
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1407
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1408
TEST_ASSERT_EVSEL("wrong exclude guest", evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1409
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1410
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1411
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1412
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
1419
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1430
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1432
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1433
evsel);
tools/perf/tests/parse-events.c
1434
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1435
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1436
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1437
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1438
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1439
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
144
struct evsel *evsel;
tools/perf/tests/parse-events.c
1440
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1441
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
1442
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
1443
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
1446
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1448
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
1449
evsel);
tools/perf/tests/parse-events.c
1450
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1451
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1452
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1453
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1454
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1455
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1456
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1457
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
1464
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1472
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1474
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1475
evsel);
tools/perf/tests/parse-events.c
1476
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1477
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1478
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1479
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1480
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1481
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1482
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1483
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1484
TEST_ASSERT_EVSEL("wrong sample_read", evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1487
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1489
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
149
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
1490
evsel);
tools/perf/tests/parse-events.c
1491
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1492
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1493
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1494
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1495
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1496
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1497
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1498
TEST_ASSERT_EVSEL("wrong sample_read", evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1501
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1503
evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES),
tools/perf/tests/parse-events.c
1504
evsel);
tools/perf/tests/parse-events.c
1505
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1506
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1507
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1508
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1509
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1510
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1511
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1512
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1513
TEST_ASSERT_EVSEL("wrong sample_read", evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1520
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1528
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
153
TEST_ASSERT_EVSEL("wrong config", test_hw_config(evsel, 0x1a), evsel);
tools/perf/tests/parse-events.c
1530
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
1531
evsel);
tools/perf/tests/parse-events.c
1532
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1533
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1534
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1535
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1536
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1537
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1538
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1539
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1540
TEST_ASSERT_EVSEL("wrong sample_read", evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
1543
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1545
evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES),
tools/perf/tests/parse-events.c
1546
evsel);
tools/perf/tests/parse-events.c
1547
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1548
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1549
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
155
evsel->core.attr.type == PERF_TYPE_RAW,
tools/perf/tests/parse-events.c
1550
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
1551
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
1552
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1553
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1554
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1555
TEST_ASSERT_EVSEL("wrong sample_read", evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
156
evsel);
tools/perf/tests/parse-events.c
1562
struct evsel *evsel = NULL;
tools/perf/tests/parse-events.c
1569
evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1570
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1571
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1572
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1573
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1574
TEST_ASSERT_EVSEL("wrong pinned", evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
1581
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1589
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1591
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1592
evsel);
tools/perf/tests/parse-events.c
1593
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1594
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1597
TEST_ASSERT_EVSEL("wrong pinned", evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
1600
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1602
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
1603
evsel);
tools/perf/tests/parse-events.c
1604
TEST_ASSERT_EVSEL("wrong pinned", !evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
1607
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1609
evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES),
tools/perf/tests/parse-events.c
1610
evsel);
tools/perf/tests/parse-events.c
1611
TEST_ASSERT_EVSEL("wrong pinned", !evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
1618
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1623
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1624
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1625
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1626
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1627
TEST_ASSERT_EVSEL("wrong exclusive", evsel->core.attr.exclusive, evsel);
tools/perf/tests/parse-events.c
1634
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
1642
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
1644
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
1645
evsel);
tools/perf/tests/parse-events.c
1646
TEST_ASSERT_EVSEL("wrong group name", !evsel->group_name, evsel);
tools/perf/tests/parse-events.c
1647
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
1650
TEST_ASSERT_EVSEL("wrong exclusive", evsel->core.attr.exclusive, evsel);
tools/perf/tests/parse-events.c
1653
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1655
evsel__match(evsel, HARDWARE, HW_CACHE_MISSES),
tools/perf/tests/parse-events.c
1656
evsel);
tools/perf/tests/parse-events.c
1657
TEST_ASSERT_EVSEL("wrong exclusive", !evsel->core.attr.exclusive, evsel);
tools/perf/tests/parse-events.c
1660
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1662
evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES),
tools/perf/tests/parse-events.c
1663
evsel);
tools/perf/tests/parse-events.c
1664
TEST_ASSERT_EVSEL("wrong exclusive", !evsel->core.attr.exclusive, evsel);
tools/perf/tests/parse-events.c
167
if (pmu->type == evsel->core.attr.type) {
tools/perf/tests/parse-events.c
1670
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1673
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
1674
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
1676
(HW_BREAKPOINT_R | HW_BREAKPOINT_W) == evsel->core.attr.bp_type,
tools/perf/tests/parse-events.c
1677
evsel);
tools/perf/tests/parse-events.c
1678
TEST_ASSERT_EVSEL("wrong bp_len", HW_BREAKPOINT_LEN_1 == evsel->core.attr.bp_len, evsel);
tools/perf/tests/parse-events.c
168
TEST_ASSERT_EVSEL("PMU type expected once", !type_matched, evsel);
tools/perf/tests/parse-events.c
1685
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1688
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
1689
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
1690
TEST_ASSERT_EVSEL("wrong bp_type", HW_BREAKPOINT_W == evsel->core.attr.bp_type, evsel);
tools/perf/tests/parse-events.c
1691
TEST_ASSERT_EVSEL("wrong bp_len", HW_BREAKPOINT_LEN_2 == evsel->core.attr.bp_len, evsel);
tools/perf/tests/parse-events.c
1699
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1702
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1703
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1704
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
1705
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
1712
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1717
TEST_ASSERT_EVSEL("wrong type/config", evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK), evsel);
tools/perf/tests/parse-events.c
1723
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1728
TEST_ASSERT_EVSEL("wrong name setting", evsel__name_is(evsel, "insn"), evsel);
tools/perf/tests/parse-events.c
1734
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1737
TEST_ASSERT_EVSEL("wrong name setting", evsel__name_is(evsel, "rawpmu"), evsel);
tools/perf/tests/parse-events.c
1743
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1746
TEST_ASSERT_EVSEL("wrong name setting", evsel__name_is(evsel, "numpmu"), evsel);
tools/perf/tests/parse-events.c
175
TEST_ASSERT_EVSEL("No PMU found for type", type_matched, evsel);
tools/perf/tests/parse-events.c
1752
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1757
TEST_ASSERT_EVSEL("wrong name setting", evsel__name_is(evsel, "cachepmu"), evsel);
tools/perf/tests/parse-events.c
1778
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1781
TEST_ASSERT_EVSEL("wrong name setting", evsel__name_is(evsel, "intel_pt//u"), evsel);
tools/perf/tests/parse-events.c
1799
struct evsel *evsel, *leader;
tools/perf/tests/parse-events.c
1803
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
1804
if (evsel != evsel__leader(evsel) ||
tools/perf/tests/parse-events.c
1805
!perf_pmu__has_format(evsel->pmu, "acr_mask")) {
tools/perf/tests/parse-events.c
1808
leader = evsel;
tools/perf/tests/parse-events.c
1823
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
1824
TEST_ASSERT_VAL("wrong config2", 0 == evsel->core.attr.config2);
tools/perf/tests/parse-events.c
1825
TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
tools/perf/tests/parse-events.c
1826
TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 0);
tools/perf/tests/parse-events.c
1827
TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1);
tools/perf/tests/parse-events.c
1829
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
183
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1830
evsel);
tools/perf/tests/parse-events.c
1835
TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period);
tools/perf/tests/parse-events.c
1842
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1848
evsel__name_is(evsel,
tools/perf/tests/parse-events.c
1850
evsel);
tools/perf/tests/parse-events.c
1856
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1859
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
186
TEST_ASSERT_EVSEL("wrong type", 1 == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
1860
TEST_ASSERT_EVSEL("wrong config", 0x1a == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
1866
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
187
TEST_ASSERT_EVSEL("wrong config", 1 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
1871
TEST_ASSERT_EVSEL("unexpected event", evsel__match(evsel, HARDWARE, HW_CPU_CYCLES), evsel);
tools/perf/tests/parse-events.c
1872
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
1878
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1883
TEST_ASSERT_EVSEL("unexpected event", evsel__match(evsel, HARDWARE, HW_CPU_CYCLES), evsel);
tools/perf/tests/parse-events.c
1884
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
1890
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1895
TEST_ASSERT_EVSEL("unexpected event", evsel__match(evsel, HARDWARE, HW_CPU_CYCLES), evsel);
tools/perf/tests/parse-events.c
1896
TEST_ASSERT_EVSEL("wrong name setting", strcmp(evsel->name, "name") == 0, evsel);
tools/perf/tests/parse-events.c
1902
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
1907
TEST_ASSERT_EVSEL("unexpected event", evsel__match(evsel, HARDWARE, HW_CPU_CYCLES), evsel);
tools/perf/tests/parse-events.c
1908
TEST_ASSERT_EVSEL("wrong name setting", strcmp(evsel->name, "l1d") == 0, evsel);
tools/perf/tests/parse-events.c
194
struct evsel *evsel;
tools/perf/tests/parse-events.c
198
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
200
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
201
evsel);
tools/perf/tests/parse-events.c
208
struct evsel *evsel;
tools/perf/tests/parse-events.c
212
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
214
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
215
evsel);
tools/perf/tests/parse-events.c
220
TEST_ASSERT_EVSEL("wrong period", 0 == evsel->core.attr.sample_period, evsel);
tools/perf/tests/parse-events.c
221
TEST_ASSERT_EVSEL("wrong config1", 0 == evsel->core.attr.config1, evsel);
tools/perf/tests/parse-events.c
222
TEST_ASSERT_EVSEL("wrong config2", 1 == evsel->core.attr.config2, evsel);
tools/perf/tests/parse-events.c
229
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
232
TEST_ASSERT_EVSEL("wrong type/config", evsel__match(evsel, SOFTWARE, SW_PAGE_FAULTS),
tools/perf/tests/parse-events.c
233
evsel);
tools/perf/tests/parse-events.c
239
struct evsel *evsel;
tools/perf/tests/parse-events.c
243
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
244
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_HW_CACHE == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
245
TEST_ASSERT_EVSEL("wrong config", test_hw_config(evsel, 1 << 16), evsel);
tools/perf/tests/parse-events.c
252
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
255
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
256
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
258
(HW_BREAKPOINT_R | HW_BREAKPOINT_W) == evsel->core.attr.bp_type,
tools/perf/tests/parse-events.c
259
evsel);
tools/perf/tests/parse-events.c
260
TEST_ASSERT_EVSEL("wrong bp_len", HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len, evsel);
tools/perf/tests/parse-events.c
266
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
269
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
270
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
271
TEST_ASSERT_EVSEL("wrong bp_type", HW_BREAKPOINT_X == evsel->core.attr.bp_type, evsel);
tools/perf/tests/parse-events.c
272
TEST_ASSERT_EVSEL("wrong bp_len", default_breakpoint_len() == evsel->core.attr.bp_len,
tools/perf/tests/parse-events.c
273
evsel);
tools/perf/tests/parse-events.c
279
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
282
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
283
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
284
TEST_ASSERT_EVSEL("wrong bp_type", HW_BREAKPOINT_R == evsel->core.attr.bp_type, evsel);
tools/perf/tests/parse-events.c
285
TEST_ASSERT_EVSEL("wrong bp_len", HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len, evsel);
tools/perf/tests/parse-events.c
2875
struct evsel *evsel1 = evlist__first(evlist);
tools/perf/tests/parse-events.c
2876
struct evsel *evsel2 = evlist__last(evlist);
tools/perf/tests/parse-events.c
291
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
294
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
295
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
296
TEST_ASSERT_EVSEL("wrong bp_type", HW_BREAKPOINT_W == evsel->core.attr.bp_type, evsel);
tools/perf/tests/parse-events.c
297
TEST_ASSERT_EVSEL("wrong bp_len", HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len, evsel);
tools/perf/tests/parse-events.c
303
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
306
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
307
TEST_ASSERT_EVSEL("wrong config", 0 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
309
(HW_BREAKPOINT_R|HW_BREAKPOINT_W) == evsel->core.attr.bp_type,
tools/perf/tests/parse-events.c
310
evsel);
tools/perf/tests/parse-events.c
311
TEST_ASSERT_EVSEL("wrong bp_len", HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len, evsel);
tools/perf/tests/parse-events.c
317
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
320
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
321
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
322
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
323
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
331
struct evsel *evsel;
tools/perf/tests/parse-events.c
335
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
336
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
337
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
338
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
339
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
347
struct evsel *evsel;
tools/perf/tests/parse-events.c
351
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
352
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
353
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
354
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
355
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
362
struct evsel *evsel;
tools/perf/tests/parse-events.c
366
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
367
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
368
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
369
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
370
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
377
struct evsel *evsel;
tools/perf/tests/parse-events.c
383
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
384
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
385
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
386
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
387
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
394
struct evsel *evsel;
tools/perf/tests/parse-events.c
400
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
401
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
402
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
409
struct evsel *evsel;
tools/perf/tests/parse-events.c
41
static bool check_evsel(const char *test, int line, bool cond, struct evsel *evsel)
tools/perf/tests/parse-events.c
415
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
416
TEST_ASSERT_EVSEL("wrong exclude guest", evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
417
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
424
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
427
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
428
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
429
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
430
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
437
struct evsel *evsel;
tools/perf/tests/parse-events.c
443
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
444
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
445
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
446
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
447
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
454
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
460
TEST_ASSERT_EVSEL("wrong exclude idle", evsel->core.attr.exclude_idle, evsel);
tools/perf/tests/parse-events.c
461
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
462
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
463
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
464
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
465
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
466
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
473
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
479
TEST_ASSERT_EVSEL("wrong exclude idle", evsel->core.attr.exclude_idle, evsel);
tools/perf/tests/parse-events.c
480
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
481
TEST_ASSERT_EVSEL("wrong exclude host", evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
482
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
483
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
484
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
485
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
49
evsel__fprintf(evsel, &details, debug_file());
tools/perf/tests/parse-events.c
492
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
495
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
496
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
497
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
498
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
499
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "mem:0:u"), evsel);
tools/perf/tests/parse-events.c
506
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
508
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
509
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
510
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
511
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
512
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "mem:0:x:k"), evsel);
tools/perf/tests/parse-events.c
519
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
52
#define TEST_ASSERT_EVSEL(test, cond, evsel) \
tools/perf/tests/parse-events.c
521
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
522
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
523
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
524
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
525
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "mem:0:r:hp"), evsel);
tools/perf/tests/parse-events.c
53
if (!check_evsel(test, __LINE__, cond, evsel)) \
tools/perf/tests/parse-events.c
532
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
534
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
535
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
536
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
537
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
538
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "mem:0:w:up"), evsel);
tools/perf/tests/parse-events.c
545
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
547
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
548
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
549
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
550
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
551
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "mem:0:rw:kp"), evsel);
tools/perf/tests/parse-events.c
558
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
560
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
561
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
562
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
563
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
564
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint"), evsel);
tools/perf/tests/parse-events.c
571
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
573
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
574
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
575
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
576
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
577
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint"), evsel);
tools/perf/tests/parse-events.c
584
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
586
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
587
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
588
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
589
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
590
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint"), evsel);
tools/perf/tests/parse-events.c
597
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
599
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
600
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
601
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
602
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
603
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint"), evsel);
tools/perf/tests/parse-events.c
610
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
612
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
613
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
614
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
615
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
616
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint"), evsel);
tools/perf/tests/parse-events.c
623
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
625
TEST_ASSERT_EVSEL("wrong number of entries", 2 == evlist->core.nr_entries, evsel);
tools/perf/tests/parse-events.c
627
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
628
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint1"), evsel);
tools/perf/tests/parse-events.c
630
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
632
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
633
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "breakpoint2"), evsel);
tools/perf/tests/parse-events.c
641
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
644
TEST_ASSERT_EVSEL("wrong number of entries", 1 == evlist->core.nr_entries, evsel);
tools/perf/tests/parse-events.c
645
TEST_ASSERT_EVSEL("wrong type", core_pmu->type == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
646
TEST_ASSERT_EVSEL("wrong config", test_hw_config(evsel, 10), evsel);
tools/perf/tests/parse-events.c
647
TEST_ASSERT_EVSEL("wrong config1", 1 == evsel->core.attr.config1, evsel);
tools/perf/tests/parse-events.c
648
TEST_ASSERT_EVSEL("wrong config2", 3 == evsel->core.attr.config2, evsel);
tools/perf/tests/parse-events.c
649
TEST_ASSERT_EVSEL("wrong config3", 0 == evsel->core.attr.config3, evsel);
tools/perf/tests/parse-events.c
65
struct evsel *evsel;
tools/perf/tests/parse-events.c
650
TEST_ASSERT_EVSEL("wrong config4", 0 == evsel->core.attr.config4, evsel);
tools/perf/tests/parse-events.c
655
TEST_ASSERT_EVSEL("wrong period", 0 == evsel->core.attr.sample_period, evsel);
tools/perf/tests/parse-events.c
662
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
664
TEST_ASSERT_EVSEL("wrong number of entries", 3 <= evlist->core.nr_entries, evsel);
tools/perf/tests/parse-events.c
667
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_TRACEPOINT != evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
668
while (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) {
tools/perf/tests/parse-events.c
669
TEST_ASSERT_EVSEL("wrong config", 1 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
67
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
670
TEST_ASSERT_EVSEL("wrong config1", 0 == evsel->core.attr.config1, evsel);
tools/perf/tests/parse-events.c
671
TEST_ASSERT_EVSEL("wrong config2", 0 == evsel->core.attr.config2, evsel);
tools/perf/tests/parse-events.c
672
TEST_ASSERT_EVSEL("wrong config3", 0 == evsel->core.attr.config3, evsel);
tools/perf/tests/parse-events.c
673
TEST_ASSERT_EVSEL("wrong config4", 0 == evsel->core.attr.config4, evsel);
tools/perf/tests/parse-events.c
674
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
675
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
676
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
677
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
678
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
68
if (!evsel->pmu->is_core)
tools/perf/tests/parse-events.c
682
TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
683
TEST_ASSERT_EVSEL("wrong sample_type", PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type,
tools/perf/tests/parse-events.c
684
evsel);
tools/perf/tests/parse-events.c
685
TEST_ASSERT_EVSEL("wrong sample_period", 1 == evsel->core.attr.sample_period, evsel);
tools/perf/tests/parse-events.c
686
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
687
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
688
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
689
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
692
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
693
TEST_ASSERT_EVSEL("wrong type", 1 == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
694
TEST_ASSERT_EVSEL("wrong config", 1 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
695
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
696
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
697
TEST_ASSERT_EVSEL("wrong exclude_hv", !evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
698
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
70
if (core_pmu != evsel->pmu && core_pmu != NULL)
tools/perf/tests/parse-events.c
705
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
711
TEST_ASSERT_EVSEL("wrong type", core_pmu->type == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
712
TEST_ASSERT_EVSEL("wrong config", 1 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
713
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, "krava"), evsel);
tools/perf/tests/parse-events.c
716
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
717
TEST_ASSERT_EVSEL("wrong number of entries", 2 == evlist->core.nr_entries, evsel);
tools/perf/tests/parse-events.c
718
TEST_ASSERT_EVSEL("wrong type", core_pmu->type == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
719
TEST_ASSERT_EVSEL("wrong config", 2 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
72
core_pmu = evsel->pmu;
tools/perf/tests/parse-events.c
721
TEST_ASSERT_EVSEL("wrong name", evsel__name_is(evsel, buf), evsel);
tools/perf/tests/parse-events.c
728
struct evsel *evsel = evlist__first(evlist);
tools/perf/tests/parse-events.c
733
TEST_ASSERT_EVSEL("wrong type", core_pmu->type == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
734
TEST_ASSERT_EVSEL("wrong config", 1 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
739
TEST_ASSERT_EVSEL("wrong period", 0 == evsel->core.attr.sample_period, evsel);
tools/perf/tests/parse-events.c
740
TEST_ASSERT_EVSEL("wrong callgraph", !evsel__has_callchain(evsel), evsel);
tools/perf/tests/parse-events.c
741
TEST_ASSERT_EVSEL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type), evsel);
tools/perf/tests/parse-events.c
744
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
745
TEST_ASSERT_EVSEL("wrong type", core_pmu->type == evsel->core.attr.type, evsel);
tools/perf/tests/parse-events.c
746
TEST_ASSERT_EVSEL("wrong config", 2 == evsel->core.attr.config, evsel);
tools/perf/tests/parse-events.c
751
TEST_ASSERT_EVSEL("wrong period", 0 == evsel->core.attr.sample_period, evsel);
tools/perf/tests/parse-events.c
752
TEST_ASSERT_EVSEL("wrong callgraph", !evsel__has_callchain(evsel), evsel);
tools/perf/tests/parse-events.c
753
TEST_ASSERT_EVSEL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type), evsel);
tools/perf/tests/parse-events.c
760
struct evsel *evsel;
tools/perf/tests/parse-events.c
765
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
767
core_pmu->type == evsel->core.attr.type ||
tools/perf/tests/parse-events.c
768
!strncmp(evsel__name(evsel), evsel->pmu->name,
tools/perf/tests/parse-events.c
769
strlen(evsel->pmu->name)),
tools/perf/tests/parse-events.c
77
static bool test_hw_config(const struct evsel *evsel, __u64 expected_config)
tools/perf/tests/parse-events.c
770
evsel);
tools/perf/tests/parse-events.c
771
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
772
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
773
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
774
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
775
TEST_ASSERT_EVSEL("wrong pinned", !evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
776
TEST_ASSERT_EVSEL("wrong exclusive", !evsel->core.attr.exclusive, evsel);
tools/perf/tests/parse-events.c
784
struct evsel *evsel = NULL;
tools/perf/tests/parse-events.c
79
return (evsel->core.attr.config & PERF_HW_EVENT_MASK) == expected_config;
tools/perf/tests/parse-events.c
792
evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
794
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
795
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
796
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
797
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
798
TEST_ASSERT_EVSEL("wrong pinned", !evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
799
TEST_ASSERT_EVSEL("wrong exclusive", !evsel->core.attr.exclusive, evsel);
tools/perf/tests/parse-events.c
802
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
803
TEST_ASSERT_EVSEL("wrong type", evsel__find_pmu(evsel)->is_core, evsel);
tools/perf/tests/parse-events.c
804
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
805
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
806
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
807
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
808
TEST_ASSERT_EVSEL("wrong pinned", !evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
809
TEST_ASSERT_EVSEL("wrong exclusive", !evsel->core.attr.pinned, evsel);
tools/perf/tests/parse-events.c
905
struct evsel *evsel = NULL, *leader;
tools/perf/tests/parse-events.c
916
evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel));
tools/perf/tests/parse-events.c
918
evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS),
tools/perf/tests/parse-events.c
919
evsel);
tools/perf/tests/parse-events.c
920
TEST_ASSERT_EVSEL("wrong exclude_user", evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
921
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
922
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
923
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
924
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
925
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
926
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
927
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2, evsel);
tools/perf/tests/parse-events.c
928
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
929
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
932
evsel = evsel__next(evsel);
tools/perf/tests/parse-events.c
933
TEST_ASSERT_EVSEL("unexpected event", evsel__match(evsel, HARDWARE, HW_CPU_CYCLES),
tools/perf/tests/parse-events.c
934
evsel);
tools/perf/tests/parse-events.c
935
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user, evsel);
tools/perf/tests/parse-events.c
936
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel, evsel);
tools/perf/tests/parse-events.c
937
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
938
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest, evsel);
tools/perf/tests/parse-events.c
939
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host, evsel);
tools/perf/tests/parse-events.c
940
TEST_ASSERT_EVSEL("wrong precise_ip", evsel->core.attr.precise_ip == 2, evsel);
tools/perf/tests/parse-events.c
941
TEST_ASSERT_EVSEL("wrong leader", evsel__has_leader(evsel, leader), evsel);
tools/perf/tests/parse-events.c
942
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1, evsel);
tools/perf/tests/parse-events.c
943
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
950
struct evsel *evsel, *leader = NULL;
tools/perf/tests/parse-events.c
961
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-events.c
962
if (evsel__match(evsel, SOFTWARE, SW_PAGE_FAULTS)) {
tools/perf/tests/parse-events.c
964
leader = evsel;
tools/perf/tests/parse-events.c
965
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user,
tools/perf/tests/parse-events.c
966
evsel);
tools/perf/tests/parse-events.c
967
TEST_ASSERT_EVSEL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel,
tools/perf/tests/parse-events.c
968
evsel);
tools/perf/tests/parse-events.c
969
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
970
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest,
tools/perf/tests/parse-events.c
971
evsel);
tools/perf/tests/parse-events.c
972
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host,
tools/perf/tests/parse-events.c
973
evsel);
tools/perf/tests/parse-events.c
974
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
975
TEST_ASSERT_EVSEL("wrong leader", evsel__is_group_leader(evsel), evsel);
tools/perf/tests/parse-events.c
976
TEST_ASSERT_EVSEL("wrong core.nr_members", evsel->core.nr_members == 2,
tools/perf/tests/parse-events.c
977
evsel);
tools/perf/tests/parse-events.c
978
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 0, evsel);
tools/perf/tests/parse-events.c
979
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-events.c
982
if (evsel__match(evsel, HARDWARE, HW_BRANCH_INSTRUCTIONS)) {
tools/perf/tests/parse-events.c
984
TEST_ASSERT_EVSEL("wrong exclude_user", !evsel->core.attr.exclude_user,
tools/perf/tests/parse-events.c
985
evsel);
tools/perf/tests/parse-events.c
986
TEST_ASSERT_EVSEL("wrong exclude_kernel", evsel->core.attr.exclude_kernel,
tools/perf/tests/parse-events.c
987
evsel);
tools/perf/tests/parse-events.c
988
TEST_ASSERT_EVSEL("wrong exclude_hv", evsel->core.attr.exclude_hv, evsel);
tools/perf/tests/parse-events.c
989
TEST_ASSERT_EVSEL("wrong exclude guest", !evsel->core.attr.exclude_guest,
tools/perf/tests/parse-events.c
990
evsel);
tools/perf/tests/parse-events.c
991
TEST_ASSERT_EVSEL("wrong exclude host", !evsel->core.attr.exclude_host,
tools/perf/tests/parse-events.c
992
evsel);
tools/perf/tests/parse-events.c
993
TEST_ASSERT_EVSEL("wrong precise_ip", !evsel->core.attr.precise_ip, evsel);
tools/perf/tests/parse-events.c
994
if (evsel__has_leader(evsel, leader)) {
tools/perf/tests/parse-events.c
995
TEST_ASSERT_EVSEL("wrong group_idx", evsel__group_idx(evsel) == 1,
tools/perf/tests/parse-events.c
996
evsel);
tools/perf/tests/parse-events.c
998
TEST_ASSERT_EVSEL("wrong sample_read", !evsel->sample_read, evsel);
tools/perf/tests/parse-metric.c
36
struct evsel *evsel;
tools/perf/tests/parse-metric.c
40
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-metric.c
41
count = find_value(evsel->name, vals);
tools/perf/tests/parse-metric.c
42
evsel->supported = true;
tools/perf/tests/parse-metric.c
43
evsel->stats->aggr->counts.val = count;
tools/perf/tests/parse-metric.c
44
evsel->stats->aggr->counts.ena = 1;
tools/perf/tests/parse-metric.c
45
evsel->stats->aggr->counts.run = 1;
tools/perf/tests/parse-metric.c
53
struct evsel *evsel;
tools/perf/tests/parse-metric.c
55
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/parse-metric.c
56
me = metricgroup__lookup(&evlist->metric_events, evsel, false);
tools/perf/tests/perf-record.c
126
evsel = evlist__first(evlist);
tools/perf/tests/perf-record.c
127
evsel__set_sample_bit(evsel, CPU);
tools/perf/tests/perf-record.c
128
evsel__set_sample_bit(evsel, TID);
tools/perf/tests/perf-record.c
129
evsel__set_sample_bit(evsel, TIME);
tools/perf/tests/perf-record.c
61
struct evsel *evsel;
tools/perf/tests/perf-time-to-tsc.c
109
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/perf-time-to-tsc.c
110
evsel->core.attr.comm = 1;
tools/perf/tests/perf-time-to-tsc.c
111
evsel->core.attr.disabled = 1;
tools/perf/tests/perf-time-to-tsc.c
112
evsel->core.attr.enable_on_exec = 0;
tools/perf/tests/perf-time-to-tsc.c
163
CHECK_NOT_NULL__(evsel = evlist__event2evsel(evlist, event));
tools/perf/tests/perf-time-to-tsc.c
164
CHECK__(evsel__parse_sample(evsel, event, &sample));
tools/perf/tests/perf-time-to-tsc.c
168
CHECK_NOT_NULL__(evsel = evlist__event2evsel(evlist, event));
tools/perf/tests/perf-time-to-tsc.c
169
CHECK__(evsel__parse_sample(evsel, event, &sample));
tools/perf/tests/perf-time-to-tsc.c
82
struct evsel *evsel = NULL;
tools/perf/tests/pfm.c
18
struct perf_evsel *evsel;
tools/perf/tests/pfm.c
21
perf_evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/pmu-events.c
849
struct evsel *evsel;
tools/perf/tests/pmu-events.c
893
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/pmu-events.c
894
evsel->stats->aggr->counts.val = k;
tools/perf/tests/pmu-events.c
897
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/pmu-events.c
898
struct metric_event *me = metricgroup__lookup(&evlist->metric_events, evsel, false);
tools/perf/tests/pmu.c
214
struct evsel *evsel;
tools/perf/tests/pmu.c
238
evsel = evlist__first(evlist);
tools/perf/tests/pmu.c
242
evsel__config_exists(evsel, "krava01"), true);
tools/perf/tests/pmu.c
244
evsel__config_exists(evsel, "krava99"), false);
tools/perf/tests/pmu.c
253
evsel__set_config_if_unset(evsel, "krava01", 16);
tools/perf/tests/pmu.c
254
evsel__get_config_val(evsel, "krava01", &val);
tools/perf/tests/pmu.c
257
evsel__set_config_if_unset(evsel, "krava11", 45);
tools/perf/tests/pmu.c
258
evsel__get_config_val(evsel, "krava11", &val);
tools/perf/tests/pmu.c
261
evsel__set_config_if_unset(evsel, "krava02", 32);
tools/perf/tests/pmu.c
262
evsel__get_config_val(evsel, "krava02", &val);
tools/perf/tests/pmu.c
265
evsel__set_config_if_unset(evsel, "krava03", 0);
tools/perf/tests/pmu.c
266
evsel__get_config_val(evsel, "krava03", &val);
tools/perf/tests/pmu.c
274
evsel__set_config_if_unset(evsel, "krava13", 5);
tools/perf/tests/pmu.c
275
evsel__get_config_val(evsel, "krava13", &val);
tools/perf/tests/pmu.c
283
evsel__set_config_if_unset(evsel, "krava21", 13905);
tools/perf/tests/pmu.c
284
evsel__get_config_val(evsel, "krava21", &val);
tools/perf/tests/pmu.c
287
evsel__set_config_if_unset(evsel, "krava22", 11);
tools/perf/tests/pmu.c
288
evsel__get_config_val(evsel, "krava22", &val);
tools/perf/tests/pmu.c
291
evsel__set_config_if_unset(evsel, "krava23", 0);
tools/perf/tests/pmu.c
292
evsel__get_config_val(evsel, "krava23", &val);
tools/perf/tests/pmu.c
307
struct evsel *evsel;
tools/perf/tests/pmu.c
331
evsel = evlist__first(evlist);
tools/perf/tests/pmu.c
332
attr = &evsel->core.attr;
tools/perf/tests/sample-parsing.c
208
struct evsel evsel = {
tools/perf/tests/sample-parsing.c
293
evsel.core.attr.sample_regs_user = sample_regs;
tools/perf/tests/sample-parsing.c
296
evsel.core.attr.sample_regs_intr = sample_regs;
tools/perf/tests/sample-parsing.c
299
evsel.core.attr.branch_sample_type |= PERF_SAMPLE_BRANCH_HW_INDEX;
tools/perf/tests/sample-parsing.c
314
evsel.core.attr.branch_sample_type);
tools/perf/tests/sample-parsing.c
328
evsel.core.attr.branch_sample_type, &sample);
tools/perf/tests/sample-parsing.c
346
evsel.sample_size = __evsel__sample_size(sample_type);
tools/perf/tests/sample-parsing.c
348
err = evsel__parse_sample(&evsel, event, &sample_out);
tools/perf/tests/sample-parsing.c
355
if (!samples_same(&sample, &sample_out, sample_type, read_format, evsel.needs_swap)) {
tools/perf/tests/sample-parsing.c
362
evsel.needs_swap = true;
tools/perf/tests/sample-parsing.c
363
evsel.sample_size = __evsel__sample_size(sample_type);
tools/perf/tests/sample-parsing.c
364
err = evsel__parse_sample(&evsel, event, &sample_out_endian);
tools/perf/tests/sample-parsing.c
371
if (!samples_same(&sample, &sample_out_endian, sample_type, read_format, evsel.needs_swap)) {
tools/perf/tests/sw-clock.c
37
struct evsel *evsel;
tools/perf/tests/sw-clock.c
59
evsel = evsel__new(&attr);
tools/perf/tests/sw-clock.c
60
if (evsel == NULL) {
tools/perf/tests/sw-clock.c
64
evlist__add(evlist, evsel);
tools/perf/tests/switch-tracking.c
130
struct evsel *evsel;
tools/perf/tests/switch-tracking.c
141
evsel = sample.evsel;
tools/perf/tests/switch-tracking.c
142
if (!evsel)
tools/perf/tests/switch-tracking.c
143
evsel = evlist__id2evsel(evlist, sample.id);
tools/perf/tests/switch-tracking.c
145
if (evsel == switch_tracking->switch_evsel) {
tools/perf/tests/switch-tracking.c
167
if (evsel == switch_tracking->cycles_evsel) {
tools/perf/tests/switch-tracking.c
354
struct evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
tools/perf/tests/switch-tracking.c
355
struct evsel *switch_evsel, *tracking_evsel;
tools/perf/tests/switch-tracking.c
459
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/switch-tracking.c
460
if (evsel != tracking_evsel) {
tools/perf/tests/switch-tracking.c
461
if (evsel->core.attr.mmap || evsel->core.attr.comm) {
tools/perf/tests/switch-tracking.c
64
struct evsel *switch_evsel;
tools/perf/tests/switch-tracking.c
65
struct evsel *cycles_evsel;
tools/perf/tests/task-exit.c
46
struct evsel *evsel;
tools/perf/tests/task-exit.c
88
evsel = evlist__first(evlist);
tools/perf/tests/task-exit.c
89
evsel->core.attr.task = 1;
tools/perf/tests/task-exit.c
91
evsel->core.attr.sample_freq = 1000000;
tools/perf/tests/task-exit.c
93
evsel->core.attr.sample_freq = 1;
tools/perf/tests/task-exit.c
95
evsel->core.attr.inherit = 0;
tools/perf/tests/task-exit.c
96
evsel->core.attr.watermark = 0;
tools/perf/tests/task-exit.c
97
evsel->core.attr.wakeup_events = 1;
tools/perf/tests/task-exit.c
98
evsel->core.attr.exclude_kernel = 1;
tools/perf/tests/tool_pmu.c
11
struct evsel *evsel;
tools/perf/tests/tool_pmu.c
50
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/tool_pmu.c
51
if (perf_pmu__is_tool(evsel->pmu)) {
tools/perf/tests/tool_pmu.c
52
if (evsel->core.attr.config != ev) {
tools/perf/tests/tool_pmu.c
54
__FILE__, __LINE__, str, evsel->core.attr.config, ev);
tools/perf/tests/uncore-event-sorting.c
153
evlist__for_each_entry(evlist, evsel) {
tools/perf/tests/uncore-event-sorting.c
154
struct evsel *next;
tools/perf/tests/uncore-event-sorting.c
156
if (!evsel__is_group_leader(evsel))
tools/perf/tests/uncore-event-sorting.c
159
next = evsel__next(evsel);
tools/perf/tests/uncore-event-sorting.c
160
CHECK_EQUAL(evsel->core.nr_members, 2, "Group size is 2");
tools/perf/tests/uncore-event-sorting.c
161
CHECK_COND(evsel->pmu == next->pmu, "PMU match");
tools/perf/tests/uncore-event-sorting.c
162
CHECK_COND(strstr(evsel__name(evsel), m.event1) != NULL, "First event name");
tools/perf/tests/uncore-event-sorting.c
86
struct evsel *evsel;
tools/perf/ui/browsers/annotate-data.c
113
int nr = add_child_entries(browser, entry, adt, pos, evsel,
tools/perf/ui/browsers/annotate-data.c
157
struct evsel *evsel = hists_to_evsel(he->hists);
tools/perf/ui/browsers/annotate-data.c
161
add_child_entries(browser, /*parent=*/NULL, adt, &adt->self, evsel,
tools/perf/ui/browsers/annotate-data.c
394
struct evsel *leader = hists_to_evsel(he->hists);
tools/perf/ui/browsers/annotate-data.c
395
struct evsel *evsel;
tools/perf/ui/browsers/annotate-data.c
418
for_each_group_evsel(evsel, leader) {
tools/perf/ui/browsers/annotate-data.c
419
struct type_hist *h = adt->histograms[evsel->core.idx];
tools/perf/ui/browsers/annotate-data.c
422
evsel__hists(evsel)->stats.nr_samples == 0)
tools/perf/ui/browsers/annotate-data.c
518
struct evsel *evsel __maybe_unused,
tools/perf/ui/browsers/annotate-data.c
53
struct evsel *leader)
tools/perf/ui/browsers/annotate-data.c
570
int hist_entry__annotate_data_tui(struct hist_entry *he, struct evsel *evsel,
tools/perf/ui/browsers/annotate-data.c
587
if (evsel__is_group_event(evsel)) {
tools/perf/ui/browsers/annotate-data.c
588
struct evsel *pos;
tools/perf/ui/browsers/annotate-data.c
591
for_each_group_evsel(pos, evsel) {
tools/perf/ui/browsers/annotate-data.c
60
struct evsel *evsel;
tools/perf/ui/browsers/annotate-data.c
608
ret = annotated_data_browser__run(&browser, evsel, hbt);
tools/perf/ui/browsers/annotate-data.c
64
for_each_group_evsel(evsel, leader) {
tools/perf/ui/browsers/annotate-data.c
66
evsel__hists(evsel)->stats.nr_samples == 0)
tools/perf/ui/browsers/annotate-data.c
69
h = adt->histograms[evsel->core.idx];
tools/perf/ui/browsers/annotate-data.c
80
struct evsel *evsel, int indent)
tools/perf/ui/browsers/annotate-data.c
99
if (get_member_overhead(adt, entry, evsel) < 0) {
tools/perf/ui/browsers/annotate.c
1005
if (annotate_browser__toggle_source(browser, evsel))
tools/perf/ui/browsers/annotate.c
1009
annotate_browser__calc_percent(browser, evsel);
tools/perf/ui/browsers/annotate.c
1074
else if (!(annotate_browser__jump(browser, evsel, hbt) ||
tools/perf/ui/browsers/annotate.c
1075
annotate_browser__callq(browser, evsel, hbt))) {
tools/perf/ui/browsers/annotate.c
1082
map_symbol__annotation_dump(ms, evsel, browser->he);
tools/perf/ui/browsers/annotate.c
1150
int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel,
tools/perf/ui/browsers/annotate.c
1158
return __hist_entry__tui_annotate(he, &he->ms, evsel, hbt, al_addr);
tools/perf/ui/browsers/annotate.c
1162
struct evsel *evsel,
tools/perf/ui/browsers/annotate.c
1178
.evsel = evsel,
tools/perf/ui/browsers/annotate.c
1192
err = symbol__annotate2(ms, evsel, &browser.arch);
tools/perf/ui/browsers/annotate.c
1250
ret = annotate_browser__run(&browser, evsel, hbt);
tools/perf/ui/browsers/annotate.c
138
.evsel = ab->evsel,
tools/perf/ui/browsers/annotate.c
339
struct evsel *evsel)
tools/perf/ui/browsers/annotate.c
350
symbol__calc_percent(sym, evsel);
tools/perf/ui/browsers/annotate.c
40
struct evsel *evsel;
tools/perf/ui/browsers/annotate.c
446
struct evsel *evsel)
tools/perf/ui/browsers/annotate.c
473
symbol__annotate2(ms, evsel, &browser->arch);
tools/perf/ui/browsers/annotate.c
585
struct evsel *evsel,
tools/perf/ui/browsers/annotate.c
600
if (!symbol__hists(dl->ops.target.sym, evsel->evlist->core.nr_entries)) {
tools/perf/ui/browsers/annotate.c
611
__hist_entry__tui_annotate(browser->he, &target_ms, evsel, hbt, NO_ADDR);
tools/perf/ui/browsers/annotate.c
641
struct evsel *evsel,
tools/perf/ui/browsers/annotate.c
652
annotate_browser__callq(browser, evsel, hbt);
tools/perf/ui/browsers/annotate.c
881
struct evsel *evsel,
tools/perf/ui/browsers/annotate.c
885
struct hists *hists = evsel__hists(evsel);
tools/perf/ui/browsers/annotate.c
899
annotate_browser__calc_percent(browser, evsel);
tools/perf/ui/browsers/annotate.c
913
annotation_br_cntr_abbr_list(&br_cntr_text, evsel, false);
tools/perf/ui/browsers/annotate.c
921
annotate_browser__calc_percent(browser, evsel);
tools/perf/ui/browsers/annotate.c
937
symbol__annotate_decay_histogram(sym, evsel);
tools/perf/ui/browsers/hists.c
2293
perf_evsel_browser__new(struct evsel *evsel,
tools/perf/ui/browsers/hists.c
2297
struct hist_browser *browser = hist_browser__new(evsel__hists(evsel));
tools/perf/ui/browsers/hists.c
2469
struct evsel *evsel;
tools/perf/ui/browsers/hists.c
2483
evsel = browser->block_evsel;
tools/perf/ui/browsers/hists.c
2485
evsel = hists_to_evsel(browser->hists);
tools/perf/ui/browsers/hists.c
2488
err = __hist_entry__tui_annotate(he, &act->ms, evsel, browser->hbt, NO_ADDR);
tools/perf/ui/browsers/hists.c
2999
static int evsel__hists_browse(struct evsel *evsel, int nr_events, const char *helpline,
tools/perf/ui/browsers/hists.c
3003
struct hists *hists = evsel__hists(evsel);
tools/perf/ui/browsers/hists.c
3004
struct hist_browser *browser = perf_evsel_browser__new(evsel, hbt, env);
tools/perf/ui/browsers/hists.c
3110
evsel->core.nr_members < 2) {
tools/perf/ui/browsers/hists.c
3122
if (symbol_conf.group_sort_idx >= evsel->core.nr_members) {
tools/perf/ui/browsers/hists.c
3125
evsel->core.nr_members - 1,
tools/perf/ui/browsers/hists.c
3126
evsel->core.nr_members - 1);
tools/perf/ui/browsers/hists.c
3237
tui__header_window(evsel__session(evsel));
tools/perf/ui/browsers/hists.c
3457
struct evsel *selection;
tools/perf/ui/browsers/hists.c
3468
struct evsel *evsel = list_entry(entry, struct evsel, core.node);
tools/perf/ui/browsers/hists.c
3469
struct hists *hists = evsel__hists(evsel);
tools/perf/ui/browsers/hists.c
3472
const char *ev_name = evsel__name(evsel);
tools/perf/ui/browsers/hists.c
3480
if (evsel__is_group_event(evsel)) {
tools/perf/ui/browsers/hists.c
3481
struct evsel *pos;
tools/perf/ui/browsers/hists.c
3483
ev_name = evsel__group_name(evsel);
tools/perf/ui/browsers/hists.c
3485
for_each_group_member(pos, evsel) {
tools/perf/ui/browsers/hists.c
3496
nr_events = evsel->evlist->stats.nr_events[PERF_RECORD_LOST];
tools/perf/ui/browsers/hists.c
3510
menu->selection = evsel;
tools/perf/ui/browsers/hists.c
3519
struct evsel *pos;
tools/perf/ui/browsers/hists.c
3606
struct evsel *evsel = list_entry(entry, struct evsel, core.node);
tools/perf/ui/browsers/hists.c
3608
if (symbol_conf.event_group && !evsel__is_group_leader(evsel))
tools/perf/ui/browsers/hists.c
3618
struct evsel *pos;
tools/perf/ui/browsers/hists.c
3655
struct evsel *last = evlist__last(evlist);
tools/perf/ui/browsers/hists.c
3671
struct evsel *first = evlist__first(evlist);
tools/perf/ui/browsers/hists.c
3679
struct evsel *pos;
tools/perf/ui/browsers/hists.c
3710
int block_hists_tui_browse(struct block_hist *bh, struct evsel *evsel,
tools/perf/ui/browsers/hists.c
3726
browser->block_evsel = evsel;
tools/perf/ui/browsers/hists.c
3738
if (!annotation_br_cntr_abbr_list(&br_cntr_text, evsel, false))
tools/perf/ui/browsers/hists.c
676
struct evsel *evsel = hists_to_evsel(browser->hists);
tools/perf/ui/browsers/hists.c
691
(evsel->evlist->stats.nr_lost_warned !=
tools/perf/ui/browsers/hists.c
692
evsel->evlist->stats.nr_events[PERF_RECORD_LOST])) {
tools/perf/ui/browsers/hists.c
693
evsel->evlist->stats.nr_lost_warned =
tools/perf/ui/browsers/hists.c
694
evsel->evlist->stats.nr_events[PERF_RECORD_LOST];
tools/perf/ui/browsers/hists.h
17
struct evsel *block_evsel;
tools/perf/ui/browsers/hists.h
7
struct evsel;
tools/perf/ui/browsers/res_sample.c
32
struct evsel *evsel, enum rstype rstype)
tools/perf/ui/browsers/res_sample.c
74
attr_to_script(extra_format, &evsel->core.attr);
tools/perf/ui/browsers/scripts.c
117
struct evsel *pos;
tools/perf/ui/browsers/scripts.c
259
struct evsel *evsel)
tools/perf/ui/browsers/scripts.c
280
if (evsel)
tools/perf/ui/browsers/scripts.c
281
attr_to_script(scriptc.extra_format, &evsel->core.attr);
tools/perf/ui/browsers/scripts.c
346
int script_browse(const char *script_opt, struct evsel *evsel)
tools/perf/ui/browsers/scripts.c
352
if (list_scripts(script_name, &custom, evsel))
tools/perf/ui/gtk/annotate.c
104
struct evsel *evsel,
tools/perf/ui/gtk/annotate.c
142
if (evsel__is_group_event(evsel)) {
tools/perf/ui/gtk/annotate.c
143
struct evsel *cur_evsel;
tools/perf/ui/gtk/annotate.c
145
for_each_group_evsel(cur_evsel, evsel__leader(evsel)) {
tools/perf/ui/gtk/annotate.c
153
ret = perf_gtk__get_percent(s, sizeof(s), sym, pos, evsel);
tools/perf/ui/gtk/annotate.c
174
static int symbol__gtk_annotate(struct map_symbol *ms, struct evsel *evsel,
tools/perf/ui/gtk/annotate.c
188
err = symbol__annotate(ms, evsel, NULL);
tools/perf/ui/gtk/annotate.c
198
symbol__calc_percent(sym, evsel);
tools/perf/ui/gtk/annotate.c
251
perf_gtk__annotate_symbol(scrolled_window, ms, evsel, hbt);
tools/perf/ui/gtk/annotate.c
256
struct evsel *evsel,
tools/perf/ui/gtk/annotate.c
259
return symbol__gtk_annotate(&he->ms, evsel, hbt);
tools/perf/ui/gtk/annotate.c
30
struct disasm_line *dl, const struct evsel *evsel)
tools/perf/ui/gtk/annotate.c
46
symhist = annotation__histogram(notes, evsel);
tools/perf/ui/gtk/annotate.c
47
entry = annotated_source__hist_entry(notes->src, evsel, dl->al.offset);
tools/perf/ui/gtk/gtk.h
55
struct evsel;
tools/perf/ui/gtk/gtk.h
63
struct evsel *evsel,
tools/perf/ui/gtk/hists.c
596
struct evsel *pos;
tools/perf/ui/hist.c
1211
struct evsel *evsel;
tools/perf/ui/hist.c
1219
evlist__for_each_entry(evlist, evsel) {
tools/perf/ui/hist.c
1220
hists = evsel__hists(evsel);
tools/perf/ui/hist.c
1239
struct evsel *evsel;
tools/perf/ui/hist.c
1256
evlist__for_each_entry(evlist, evsel) {
tools/perf/ui/hist.c
1257
struct hists *hists = evsel__hists(evsel);
tools/perf/ui/hist.c
219
struct evsel *evsel = hists_to_evsel(pair->hists);
tools/perf/ui/hist.c
220
fa[evsel__group_idx(evsel)] = get_field(pair);
tools/perf/ui/hist.c
224
struct evsel *evsel = hists_to_evsel(pair->hists);
tools/perf/ui/hist.c
225
fb[evsel__group_idx(evsel)] = get_field(pair);
tools/perf/ui/hist.c
241
struct evsel *evsel = hists_to_evsel(a->hists);
tools/perf/ui/hist.c
246
if (!evsel__is_group_event(evsel))
tools/perf/ui/hist.c
249
nr_members = evsel->core.nr_members;
tools/perf/ui/hist.c
283
struct evsel *evsel;
tools/perf/ui/hist.c
295
evsel = hists_to_evsel(a->hists);
tools/perf/ui/hist.c
296
if (!evsel__is_group_event(evsel))
tools/perf/ui/hist.c
299
nr_members = evsel->core.nr_members;
tools/perf/ui/hist.c
378
struct evsel *evsel = hists_to_evsel(hists);
tools/perf/ui/hist.c
382
struct evsel *pos;
tools/perf/ui/hist.c
384
for_each_group_evsel(pos, evsel) {
tools/perf/ui/hist.c
65
struct evsel *evsel = hists_to_evsel(hists);
tools/perf/ui/hist.c
66
struct evsel *pos;
tools/perf/ui/hist.c
72
if (evsel__is_group_event(evsel))
tools/perf/ui/hist.c
73
nr_members = evsel->core.nr_members;
tools/perf/ui/hist.c
79
values[0].hists = evsel__hists(evsel);
tools/perf/ui/hist.c
83
if (evsel__is_group_event(evsel)) {
tools/perf/ui/hist.c
86
for_each_group_member(pos, evsel)
tools/perf/ui/hist.c
913
struct evsel *evsel;
tools/perf/ui/hist.c
932
evlist__for_each_entry(evlist, evsel) {
tools/perf/ui/hist.c
933
struct hists *hists = evsel__hists(evsel);
tools/perf/ui/hist.c
953
struct evsel *evsel;
tools/perf/ui/hist.c
968
evlist__for_each_entry(evlist, evsel) {
tools/perf/ui/hist.c
969
struct hists *hists = evsel__hists(evsel);
tools/perf/util/amd-sample-raw.c
379
struct evsel *evsel;
tools/perf/util/amd-sample-raw.c
384
evsel = evlist__event2evsel(evlist, event);
tools/perf/util/amd-sample-raw.c
385
if (!evsel)
tools/perf/util/amd-sample-raw.c
388
if (evsel->core.attr.type == ibs_fetch_type) {
tools/perf/util/amd-sample-raw.c
394
} else if (evsel->core.attr.type == ibs_op_type) {
tools/perf/util/annotate-data.c
1823
struct evsel *evsel, int offset,
tools/perf/util/annotate-data.c
1832
int nr = evsel->evlist->core.nr_entries;
tools/perf/util/annotate-data.c
1841
h = adt->histograms[evsel->core.idx];
tools/perf/util/annotate-data.c
1850
static void print_annotated_data_header(struct hist_entry *he, struct evsel *evsel)
tools/perf/util/annotate-data.c
1858
if (evsel__is_group_event(evsel)) {
tools/perf/util/annotate-data.c
1868
if (evsel__is_group_event(evsel)) {
tools/perf/util/annotate-data.c
1869
struct evsel *pos;
tools/perf/util/annotate-data.c
1873
for_each_group_evsel(pos, evsel) {
tools/perf/util/annotate-data.c
1911
struct evsel *evsel, int indent)
tools/perf/util/annotate-data.c
1914
struct type_hist *h = mem_type->histograms[evsel->core.idx];
tools/perf/util/annotate-data.c
1918
struct evsel *pos;
tools/perf/util/annotate-data.c
1920
for_each_group_evsel(pos, evsel) {
tools/perf/util/annotate-data.c
1945
print_annotated_data_type(mem_type, child, evsel, indent + 4);
tools/perf/util/annotate-data.c
1952
int hist_entry__annotate_data_tty(struct hist_entry *he, struct evsel *evsel)
tools/perf/util/annotate-data.c
1954
print_annotated_data_header(he, evsel);
tools/perf/util/annotate-data.c
1955
print_annotated_data_type(he->mem_type, &he->mem_type->self, evsel, 0);
tools/perf/util/annotate-data.h
18
struct evsel;
tools/perf/util/annotate-data.h
236
struct evsel *evsel, int offset,
tools/perf/util/annotate-data.h
246
int hist_entry__annotate_data_tty(struct hist_entry *he, struct evsel *evsel);
tools/perf/util/annotate-data.h
278
struct evsel *evsel __maybe_unused,
tools/perf/util/annotate-data.h
295
struct evsel *evsel __maybe_unused)
tools/perf/util/annotate-data.h
311
int hist_entry__annotate_data_tui(struct hist_entry *he, struct evsel *evsel,
tools/perf/util/annotate-data.h
315
struct evsel *evsel __maybe_unused,
tools/perf/util/annotate.c
1010
int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,
tools/perf/util/annotate.c
1041
if (evsel__is_group_event(evsel)) {
tools/perf/util/annotate.c
1042
struct evsel *pos;
tools/perf/util/annotate.c
1044
for_each_group_evsel(pos, evsel) {
tools/perf/util/annotate.c
1186
static void symbol__annotate_hits(struct symbol *sym, struct evsel *evsel)
tools/perf/util/annotate.c
1189
struct sym_hist *h = annotation__histogram(notes, evsel);
tools/perf/util/annotate.c
1195
entry = annotated_source__hist_entry(notes->src, evsel, offset);
tools/perf/util/annotate.c
1216
int hist_entry__annotate_printf(struct hist_entry *he, struct evsel *evsel)
tools/perf/util/annotate.c
1224
const char *evsel_name = evsel__name(evsel);
tools/perf/util/annotate.c
1226
struct sym_hist *h = annotation__histogram(notes, evsel);
tools/perf/util/annotate.c
1231
.evsel = evsel,
tools/perf/util/annotate.c
1249
if (evsel__is_group_event(evsel)) {
tools/perf/util/annotate.c
1250
evsel__group_desc(evsel, buf, sizeof(buf));
tools/perf/util/annotate.c
1265
symbol__annotate_hits(sym, evsel);
tools/perf/util/annotate.c
1392
int map_symbol__annotation_dump(struct map_symbol *ms, struct evsel *evsel,
tools/perf/util/annotate.c
1395
const char *ev_name = evsel__name(evsel);
tools/perf/util/annotate.c
1402
.evsel = evsel,
tools/perf/util/annotate.c
1412
if (evsel__is_group_event(evsel)) {
tools/perf/util/annotate.c
1413
evsel__group_desc(evsel, buf, sizeof(buf));
tools/perf/util/annotate.c
1428
void symbol__annotate_zero_histogram(struct symbol *sym, struct evsel *evsel)
tools/perf/util/annotate.c
1431
struct sym_hist *h = annotation__histogram(notes, evsel);
tools/perf/util/annotate.c
1436
void symbol__annotate_decay_histogram(struct symbol *sym, struct evsel *evsel)
tools/perf/util/annotate.c
1439
struct sym_hist *h = annotation__histogram(notes, evsel);
tools/perf/util/annotate.c
1449
entry = annotated_source__hist_entry(notes->src, evsel, al->offset);
tools/perf/util/annotate.c
1664
int hist_entry__tty_annotate2(struct hist_entry *he, struct evsel *evsel)
tools/perf/util/annotate.c
1670
struct hists *hists = evsel__hists(evsel);
tools/perf/util/annotate.c
1673
.evsel = evsel,
tools/perf/util/annotate.c
1678
err = symbol__annotate2(ms, evsel, NULL);
tools/perf/util/annotate.c
1704
int hist_entry__tty_annotate(struct hist_entry *he, struct evsel *evsel)
tools/perf/util/annotate.c
1712
err = symbol__annotate(ms, evsel, NULL);
tools/perf/util/annotate.c
1722
symbol__calc_percent(sym, evsel);
tools/perf/util/annotate.c
1730
hist_entry__annotate_printf(he, evsel);
tools/perf/util/annotate.c
1811
int annotation_br_cntr_abbr_list(char **str, struct evsel *evsel, bool header)
tools/perf/util/annotate.c
1813
struct evsel *pos;
tools/perf/util/annotate.c
1816
if (evsel->evlist->nr_br_cntr <= 0)
tools/perf/util/annotate.c
1824
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/util/annotate.c
1857
struct evsel *evsel)
tools/perf/util/annotate.c
1859
struct evsel *pos = evsel ? evlist__first(evsel->evlist) : NULL;
tools/perf/util/annotate.c
1875
evlist__for_each_entry_from(evsel->evlist, pos) {
tools/perf/util/annotate.c
1911
evlist__for_each_entry_from(evsel->evlist, pos) {
tools/perf/util/annotate.c
2119
al->num_aggr, al->evsel)) {
tools/perf/util/annotate.c
219
struct evsel *evsel = sample->evsel;
tools/perf/util/annotate.c
2204
int symbol__annotate2(struct map_symbol *ms, struct evsel *evsel,
tools/perf/util/annotate.c
2212
err = symbol__annotate(ms, evsel, parch);
tools/perf/util/annotate.c
2216
symbol__calc_percent(sym, evsel);
tools/perf/util/annotate.c
2221
err = annotation__compute_ipc(notes, size, evsel);
tools/perf/util/annotate.c
236
h = annotated_source__histogram(src, evsel);
tools/perf/util/annotate.c
244
hash_key = offset << 16 | evsel->core.idx;
tools/perf/util/annotate.c
261
sym->start, sym->name, addr, addr - sym->start, evsel->core.idx,
tools/perf/util/annotate.c
2870
struct evsel *evsel = hists_to_evsel(he->hists);
tools/perf/util/annotate.c
2872
annotated_data_type__update_samples(mem_type, evsel,
tools/perf/util/annotate.c
2897
struct evsel *evsel = hists_to_evsel(he->hists);
tools/perf/util/annotate.c
2938
if (symbol__annotate(ms, evsel, &arch) < 0) {
tools/perf/util/annotate.c
331
src = symbol__hists(sym, sample->evsel->evlist->core.nr_entries);
tools/perf/util/annotate.c
336
struct evsel *evsel,
tools/perf/util/annotate.c
340
unsigned int br_cntr_nr = evsel__leader(evsel)->br_cntr_nr;
tools/perf/util/annotate.c
341
unsigned int base = evsel__leader(evsel)->br_cntr_idx;
tools/perf/util/annotate.c
342
unsigned int off = offset * evsel->evlist->nr_br_cntr;
tools/perf/util/annotate.c
349
perf_env__find_br_cntr_info(evsel__env(evsel), NULL, &width);
tools/perf/util/annotate.c
363
unsigned cycles, struct evsel *evsel,
tools/perf/util/annotate.c
372
branch = symbol__find_branch_hist(sym, evsel->evlist->nr_br_cntr);
tools/perf/util/annotate.c
393
return symbol__account_br_cntr(branch, evsel, offset, br_cntr);
tools/perf/util/annotate.c
399
struct evsel *evsel,
tools/perf/util/annotate.c
426
err = symbol__account_cycles(ams->al_addr, saddr, ams->ms.sym, cycles, evsel, br_cntr);
tools/perf/util/annotate.c
512
struct evsel *evsel)
tools/perf/util/annotate.c
514
unsigned int br_cntr_nr = evsel->evlist->nr_br_cntr;
tools/perf/util/annotate.c
559
al->evsel = evsel;
tools/perf/util/annotate.c
910
struct evsel *evsel,
tools/perf/util/annotate.c
914
struct hists *hists = evsel__hists(evsel);
tools/perf/util/annotate.c
915
struct sym_hist *sym_hist = annotation__histogram(notes, evsel);
tools/perf/util/annotate.c
922
entry = annotated_source__hist_entry(notes->src, evsel, offset);
tools/perf/util/annotate.c
947
struct evsel *leader, s64 len)
tools/perf/util/annotate.c
950
struct evsel *evsel;
tools/perf/util/annotate.c
962
for_each_group_evsel(evsel, leader) {
tools/perf/util/annotate.c
968
evsel__hists(evsel)->stats.nr_samples == 0)
tools/perf/util/annotate.c
973
calc_percent(notes, evsel, data, al->offset, end);
tools/perf/util/annotate.c
978
void symbol__calc_percent(struct symbol *sym, struct evsel *evsel)
tools/perf/util/annotate.c
982
annotation__calc_percent(notes, evsel, symbol__size(sym));
tools/perf/util/annotate.h
124
struct evsel *evsel;
tools/perf/util/annotate.h
204
struct evsel *evsel;
tools/perf/util/annotate.h
219
struct evsel *evsel,
tools/perf/util/annotate.h
223
void symbol__calc_percent(struct symbol *sym, struct evsel *evsel);
tools/perf/util/annotate.h
398
const struct evsel *evsel)
tools/perf/util/annotate.h
400
return &src->histograms[evsel->core.idx];
tools/perf/util/annotate.h
404
const struct evsel *evsel)
tools/perf/util/annotate.h
406
return annotated_source__histogram(notes->src, evsel);
tools/perf/util/annotate.h
410
annotated_source__hist_entry(struct annotated_source *src, const struct evsel *evsel, u64 offset)
tools/perf/util/annotate.h
413
long key = offset << 16 | evsel->core.idx;
tools/perf/util/annotate.h
432
struct evsel *evsel,
tools/perf/util/annotate.h
441
struct evsel *evsel,
tools/perf/util/annotate.h
444
struct evsel *evsel,
tools/perf/util/annotate.h
472
void symbol__annotate_zero_histogram(struct symbol *sym, struct evsel *evsel);
tools/perf/util/annotate.h
473
void symbol__annotate_decay_histogram(struct symbol *sym, struct evsel *evsel);
tools/perf/util/annotate.h
476
int map_symbol__annotation_dump(struct map_symbol *ms, struct evsel *evsel,
tools/perf/util/annotate.h
481
int hist_entry__annotate_printf(struct hist_entry *he, struct evsel *evsel);
tools/perf/util/annotate.h
482
int hist_entry__tty_annotate(struct hist_entry *he, struct evsel *evsel);
tools/perf/util/annotate.h
483
int hist_entry__tty_annotate2(struct hist_entry *he, struct evsel *evsel);
tools/perf/util/annotate.h
584
int num_aggr, struct evsel *evsel);
tools/perf/util/annotate.h
585
int annotation_br_cntr_abbr_list(char **str, struct evsel *evsel, bool header);
tools/perf/util/arm-spe.c
1331
struct evsel *evsel;
tools/perf/util/arm-spe.c
1339
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/arm-spe.c
1340
if ((evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
tools/perf/util/arm-spe.c
1671
struct evsel *evsel)
tools/perf/util/arm-spe.c
1675
return evsel->core.attr.type == spe->pmu_type;
tools/perf/util/arm-spe.c
1738
struct evsel *evsel;
tools/perf/util/arm-spe.c
1740
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/arm-spe.c
1741
if (evsel->core.id && evsel->core.id[0] == id) {
tools/perf/util/arm-spe.c
1742
if (evsel->name)
tools/perf/util/arm-spe.c
1743
zfree(&evsel->name);
tools/perf/util/arm-spe.c
1744
evsel->name = strdup(name);
tools/perf/util/arm-spe.c
1754
struct evsel *evsel;
tools/perf/util/arm-spe.c
1760
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/arm-spe.c
1761
if (evsel->core.attr.type == spe->pmu_type) {
tools/perf/util/arm-spe.c
1775
attr.sample_type = evsel->core.attr.sample_type &
tools/perf/util/arm-spe.c
1787
attr.exclude_user = evsel->core.attr.exclude_user;
tools/perf/util/arm-spe.c
1788
attr.exclude_kernel = evsel->core.attr.exclude_kernel;
tools/perf/util/arm-spe.c
1789
attr.exclude_hv = evsel->core.attr.exclude_hv;
tools/perf/util/arm-spe.c
1790
attr.exclude_host = evsel->core.attr.exclude_host;
tools/perf/util/arm-spe.c
1791
attr.exclude_guest = evsel->core.attr.exclude_guest;
tools/perf/util/arm-spe.c
1792
attr.sample_id_all = evsel->core.attr.sample_id_all;
tools/perf/util/arm-spe.c
1793
attr.read_format = evsel->core.attr.read_format;
tools/perf/util/arm-spe.c
1797
id = auxtrace_synth_id_range_start(evsel);
tools/perf/util/arm-spe.c
493
struct evsel *evsel = sample->evsel;
tools/perf/util/arm-spe.c
497
if (!evsel && spe->session && spe->session->evlist)
tools/perf/util/arm-spe.c
498
evsel = evlist__id2evsel(spe->session->evlist, sample->id);
tools/perf/util/arm-spe.c
500
if (evsel)
tools/perf/util/arm-spe.c
501
branch_sample_type = evsel->core.attr.branch_sample_type;
tools/perf/util/aslr.c
1112
if (evsel__is_offcpu_event(evsel)) {
tools/perf/util/aslr.c
1121
evsel->sample_size = __evsel__sample_size(sample_type);
tools/perf/util/aslr.c
1122
evsel->core.attr.sample_type = sample_type;
tools/perf/util/aslr.c
1123
evsel->core.attr.sample_regs_user = 0;
tools/perf/util/aslr.c
1124
evsel->core.attr.sample_regs_intr = 0;
tools/perf/util/aslr.c
1126
ret = __evsel__parse_sample(evsel, new_event, &new_sample, /*needs_swap=*/false);
tools/perf/util/aslr.c
1130
evsel->sample_size = orig_sample_size;
tools/perf/util/aslr.c
1131
evsel->core.attr.sample_type = orig_sample_type;
tools/perf/util/aslr.c
1132
evsel->core.attr.sample_regs_user = orig_regs_user;
tools/perf/util/aslr.c
1133
evsel->core.attr.sample_regs_intr = orig_regs_intr;
tools/perf/util/aslr.c
1138
new_sample.evsel = evsel;
tools/perf/util/aslr.c
1143
evsel->sample_size = orig_sample_size;
tools/perf/util/aslr.c
1144
evsel->core.attr.sample_type = orig_sample_type;
tools/perf/util/aslr.c
1145
evsel->core.attr.sample_regs_user = orig_regs_user;
tools/perf/util/aslr.c
1146
evsel->core.attr.sample_regs_intr = orig_regs_intr;
tools/perf/util/aslr.c
1345
int aslr_tool__cache_orig_attrs(struct perf_tool *tool, struct evsel *evsel)
tools/perf/util/aslr.c
1355
priv->orig_sample_type = evsel->core.attr.sample_type;
tools/perf/util/aslr.c
1356
priv->orig_sample_regs_user = evsel->core.attr.sample_regs_user;
tools/perf/util/aslr.c
1357
priv->orig_sample_regs_intr = evsel->core.attr.sample_regs_intr;
tools/perf/util/aslr.c
1358
priv->orig_sample_size = evsel->sample_size;
tools/perf/util/aslr.c
1360
err = hashmap__add(&aslr->evsel_orig_attrs, evsel, priv);
tools/perf/util/aslr.c
1370
struct evsel *evsel;
tools/perf/util/aslr.c
1372
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/aslr.c
1373
evsel->core.attr.sample_type &= ASLR_SUPPORTED_SAMPLE_TYPE;
tools/perf/util/aslr.c
1374
evsel->core.attr.sample_regs_user = 0;
tools/perf/util/aslr.c
1375
evsel->core.attr.sample_regs_intr = 0;
tools/perf/util/aslr.c
1376
evsel->sample_size = __evsel__sample_size(evsel->core.attr.sample_type);
tools/perf/util/aslr.c
1377
evsel__calc_id_pos(evsel);
tools/perf/util/aslr.c
1379
if (evsel->core.attr.type == PERF_TYPE_BREAKPOINT) {
tools/perf/util/aslr.c
1380
evsel->core.attr.bp_addr = 0;
tools/perf/util/aslr.c
1381
} else if (evsel->core.attr.type >= PERF_TYPE_MAX) {
tools/perf/util/aslr.c
1382
struct perf_pmu *pmu = perf_pmus__find_by_type(evsel->core.attr.type);
tools/perf/util/aslr.c
1386
evsel->core.attr.config1 = 0;
tools/perf/util/aslr.c
1387
evsel->core.attr.config2 = 0;
tools/perf/util/aslr.c
1397
struct evsel *evsel;
tools/perf/util/aslr.c
1400
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/aslr.c
1401
if (hashmap__find(&aslr->evsel_orig_attrs, evsel, &priv)) {
tools/perf/util/aslr.c
1402
evsel->core.attr.sample_type = priv->orig_sample_type;
tools/perf/util/aslr.c
1403
evsel->core.attr.sample_regs_user = priv->orig_sample_regs_user;
tools/perf/util/aslr.c
1404
evsel->core.attr.sample_regs_intr = priv->orig_sample_regs_intr;
tools/perf/util/aslr.c
1405
evsel->sample_size = priv->orig_sample_size;
tools/perf/util/aslr.c
1406
evsel__calc_id_pos(evsel);
tools/perf/util/aslr.c
705
struct evsel *evsel = sample->evsel;
tools/perf/util/aslr.c
732
if (evsel__is_dummy_event(evsel))
tools/perf/util/aslr.c
737
if (hashmap__find(&aslr->evsel_orig_attrs, evsel, &priv)) {
tools/perf/util/aslr.c
742
orig_sample_type = evsel->core.attr.sample_type;
tools/perf/util/aslr.c
743
orig_regs_user = evsel->core.attr.sample_regs_user;
tools/perf/util/aslr.c
744
orig_regs_intr = evsel->core.attr.sample_regs_intr;
tools/perf/util/aslr.c
747
orig_sample_size = evsel->sample_size;
tools/perf/util/aslr.c
836
if ((evsel->core.attr.read_format & PERF_FORMAT_GROUP) == 0) {
tools/perf/util/aslr.c
838
if (evsel->core.attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
tools/perf/util/aslr.c
840
if (evsel->core.attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
tools/perf/util/aslr.c
842
if (evsel->core.attr.read_format & PERF_FORMAT_ID)
tools/perf/util/aslr.c
844
if (evsel->core.attr.read_format & PERF_FORMAT_LOST)
tools/perf/util/aslr.c
855
if (evsel->core.attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
tools/perf/util/aslr.c
857
if (evsel->core.attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
tools/perf/util/aslr.c
861
if (evsel->core.attr.read_format & PERF_FORMAT_ID)
tools/perf/util/aslr.c
863
if (evsel->core.attr.read_format & PERF_FORMAT_LOST)
tools/perf/util/aslr.c
963
if (evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX)
tools/perf/util/aslr.c
985
if (evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_COUNTERS) {
tools/perf/util/aslr.h
32
struct evsel;
tools/perf/util/aslr.h
40
int aslr_tool__cache_orig_attrs(struct perf_tool *tool, struct evsel *evsel);
tools/perf/util/auxtrace.c
100
} else if (evsel == leader) {
tools/perf/util/auxtrace.c
103
if (evsel == last)
tools/perf/util/auxtrace.c
108
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
110
if (!evsel__has_leader(evsel, leader)) {
tools/perf/util/auxtrace.c
111
evsel__set_leader(evsel, leader);
tools/perf/util/auxtrace.c
116
} else if (evsel == leader) {
tools/perf/util/auxtrace.c
119
if (evsel == last)
tools/perf/util/auxtrace.c
1361
static void unleader_evsel(struct evlist *evlist, struct evsel *leader)
tools/perf/util/auxtrace.c
1363
struct evsel *new_leader = NULL;
tools/perf/util/auxtrace.c
1364
struct evsel *evsel;
tools/perf/util/auxtrace.c
1367
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
1368
if (!evsel__has_leader(evsel, leader) || evsel == leader)
tools/perf/util/auxtrace.c
1371
new_leader = evsel;
tools/perf/util/auxtrace.c
1372
evsel__set_leader(evsel, new_leader);
tools/perf/util/auxtrace.c
1388
struct evsel *evsel;
tools/perf/util/auxtrace.c
1390
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/auxtrace.c
1391
if (auxtrace__evsel_is_auxtrace(session, evsel) &&
tools/perf/util/auxtrace.c
1392
evsel__is_group_leader(evsel)) {
tools/perf/util/auxtrace.c
1393
unleader_evsel(session->evlist, evsel);
tools/perf/util/auxtrace.c
192
struct evsel *evsel, int idx)
tools/perf/util/auxtrace.c
196
mp->mmap_needed = evsel->needs_auxtrace_mmap;
tools/perf/util/auxtrace.c
2858
static int parse_addr_filter(struct evsel *evsel, const char *filter,
tools/perf/util/auxtrace.c
2891
if (evsel__append_addr_filter(evsel, new_filter)) {
tools/perf/util/auxtrace.c
2909
static int evsel__nr_addr_filter(struct evsel *evsel)
tools/perf/util/auxtrace.c
2911
struct perf_pmu *pmu = evsel__find_pmu(evsel);
tools/perf/util/auxtrace.c
2924
struct evsel *evsel;
tools/perf/util/auxtrace.c
2928
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
2929
filter = evsel->filter;
tools/perf/util/auxtrace.c
2930
max_nr = evsel__nr_addr_filter(evsel);
tools/perf/util/auxtrace.c
2933
evsel->filter = NULL;
tools/perf/util/auxtrace.c
2934
err = parse_addr_filter(evsel, filter, max_nr);
tools/perf/util/auxtrace.c
2938
pr_debug("Address filter: %s\n", evsel->filter);
tools/perf/util/auxtrace.c
2988
struct evsel *evsel)
tools/perf/util/auxtrace.c
2993
return session->auxtrace->evsel_is_auxtrace(session, evsel);
tools/perf/util/auxtrace.c
669
static int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx)
tools/perf/util/auxtrace.c
675
int cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, evlist_cpu);
tools/perf/util/auxtrace.c
679
return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx);
tools/perf/util/auxtrace.c
682
return perf_evsel__enable_thread(&evsel->core, idx);
tools/perf/util/auxtrace.c
687
struct evsel *evsel;
tools/perf/util/auxtrace.c
692
evlist__for_each_entry(itr->evlist, evsel) {
tools/perf/util/auxtrace.c
693
if (evsel__is_aux_event(evsel)) {
tools/perf/util/auxtrace.c
694
if (evsel->disabled)
tools/perf/util/auxtrace.c
696
return evlist__enable_event_idx(itr->evlist, evsel, idx);
tools/perf/util/auxtrace.c
71
u64 auxtrace_synth_id_range_start(struct evsel *evsel)
tools/perf/util/auxtrace.c
715
struct evsel *evsel;
tools/perf/util/auxtrace.c
719
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
720
sz = evsel->core.attr.aux_sample_size;
tools/perf/util/auxtrace.c
721
if (evsel__is_group_leader(evsel)) {
tools/perf/util/auxtrace.c
722
has_aux_leader = evsel__is_aux_event(evsel);
tools/perf/util/auxtrace.c
73
u64 id = evsel->core.id[0] + AUXTRACE_SYNTH_EVENT_ID_OFFSET;
tools/perf/util/auxtrace.c
741
evsel__set_sample_bit(evsel, AUX);
tools/perf/util/auxtrace.c
744
evsel__reset_sample_bit(evsel, AUX);
tools/perf/util/auxtrace.c
766
struct evsel *aux_evsel;
tools/perf/util/auxtrace.c
769
struct evsel *evsel;
tools/perf/util/auxtrace.c
794
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
795
if (evsel__is_group_leader(evsel)) {
tools/perf/util/auxtrace.c
796
has_aux_leader = evsel__is_aux_event(evsel);
tools/perf/util/auxtrace.c
798
evsel->core.attr.aux_sample_size = sz;
tools/perf/util/auxtrace.c
804
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
805
if (evsel__is_aux_event(evsel))
tools/perf/util/auxtrace.c
806
aux_evsel = evsel;
tools/perf/util/auxtrace.c
807
term = evsel__get_config_term(evsel, AUX_SAMPLE_SIZE);
tools/perf/util/auxtrace.c
810
evsel->core.attr.aux_sample_size = term->val.aux_sample_size;
tools/perf/util/auxtrace.c
812
if (aux_evsel && evsel->core.attr.aux_sample_size)
tools/perf/util/auxtrace.c
813
evlist__regroup(evlist, aux_evsel, evsel);
tools/perf/util/auxtrace.c
85
static int evlist__regroup(struct evlist *evlist, struct evsel *leader, struct evsel *last)
tools/perf/util/auxtrace.c
856
struct evsel *aux_evsel = NULL;
tools/perf/util/auxtrace.c
857
struct evsel *evsel;
tools/perf/util/auxtrace.c
859
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
860
bool is_aux_event = evsel__is_aux_event(evsel);
tools/perf/util/auxtrace.c
864
aux_evsel = evsel;
tools/perf/util/auxtrace.c
865
term = evsel__get_config_term(evsel, AUX_ACTION);
tools/perf/util/auxtrace.c
867
if (evsel__get_config_term(evsel, AUX_OUTPUT))
tools/perf/util/auxtrace.c
87
struct evsel *evsel;
tools/perf/util/auxtrace.c
886
evsel->core.attr.aux_action = opt->aux_action;
tools/perf/util/auxtrace.c
890
evlist__regroup(evlist, aux_evsel, evsel);
tools/perf/util/auxtrace.c
891
if (!evsel__is_aux_event(evsel__leader(evsel))) {
tools/perf/util/auxtrace.c
94
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/auxtrace.c
96
if (!(evsel__leader(evsel) == leader ||
tools/perf/util/auxtrace.c
97
(evsel__leader(evsel) == evsel &&
tools/perf/util/auxtrace.c
98
evsel->core.nr_members <= 1)))
tools/perf/util/auxtrace.h
20
struct evsel;
tools/perf/util/auxtrace.h
221
struct evsel *evsel);
tools/perf/util/auxtrace.h
502
struct evsel *evsel, int idx);
tools/perf/util/auxtrace.h
646
struct evsel *evsel);
tools/perf/util/auxtrace.h
647
u64 auxtrace_synth_id_range_start(struct evsel *evsel);
tools/perf/util/block-info.c
106
u64 *br_cntr, struct evsel *evsel)
tools/perf/util/block-info.c
125
bi->evsel = evsel;
tools/perf/util/block-info.c
367
bi->num_aggr, bi->evsel))
tools/perf/util/block-info.c
476
struct evsel *pos;
tools/perf/util/block-info.c
503
struct evsel *evsel, struct perf_env *env)
tools/perf/util/block-info.c
515
ret = block_hists_tui_browse(bh, evsel, min_percent, env);
tools/perf/util/block-info.h
23
struct evsel *evsel;
tools/perf/util/block-info.h
72
struct evsel *evsel, struct perf_env *env);
tools/perf/util/bpf-filter.c
121
static int check_sample_flags(struct evsel *evsel, struct perf_bpf_filter_expr *expr)
tools/perf/util/bpf-filter.c
126
(evsel->core.attr.sample_type & (1 << (expr->term - PBF_TERM_SAMPLE_START))))
tools/perf/util/bpf-filter.c
138
if (check_sample_flags(evsel, group) < 0)
tools/perf/util/bpf-filter.c
147
evsel__name(evsel), expr->term);
tools/perf/util/bpf-filter.c
151
pr_err("Error: %s event does not have %s\n", evsel__name(evsel), info->name);
tools/perf/util/bpf-filter.c
157
static int get_filter_entries(struct evsel *evsel, struct perf_bpf_filter_entry *entry)
tools/perf/util/bpf-filter.c
162
list_for_each_entry(expr, &evsel->bpf_filters, list) {
tools/perf/util/bpf-filter.c
163
if (check_sample_flags(evsel, expr) < 0)
tools/perf/util/bpf-filter.c
287
static u64 create_event_hash(struct evsel *evsel)
tools/perf/util/bpf-filter.c
298
for (x = 0; x < xyarray__max_x(evsel->core.fd); x++) {
tools/perf/util/bpf-filter.c
299
for (y = 0; y < xyarray__max_y(evsel->core.fd); y++) {
tools/perf/util/bpf-filter.c
300
int ret = ioctl(FD(evsel, x, y), PERF_EVENT_IOC_ID, &id);
tools/perf/util/bpf-filter.c
332
threads = perf_evsel__threads(&pfi->evsel->core);
tools/perf/util/bpf-filter.c
351
static int create_idx_hash(struct evsel *evsel, struct perf_bpf_filter_entry *entry)
tools/perf/util/bpf-filter.c
383
pfi->evsel = evsel;
tools/perf/util/bpf-filter.c
386
event_id = create_event_hash(evsel);
tools/perf/util/bpf-filter.c
394
threads = perf_evsel__threads(&evsel->core);
tools/perf/util/bpf-filter.c
434
tgid, evsel__name(evsel), filter_idx);
tools/perf/util/bpf-filter.c
447
int perf_bpf_filter__prepare(struct evsel *evsel, struct target *target)
tools/perf/util/bpf-filter.c
466
ret = get_filter_entries(evsel, entry);
tools/perf/util/bpf-filter.c
476
ret = create_idx_hash(evsel, entry);
tools/perf/util/bpf-filter.c
496
for (x = 0; x < xyarray__max_x(evsel->core.fd); x++) {
tools/perf/util/bpf-filter.c
497
for (y = 0; y < xyarray__max_y(evsel->core.fd); y++) {
tools/perf/util/bpf-filter.c
498
ret = ioctl(FD(evsel, x, y), PERF_EVENT_IOC_SET_BPF, fd);
tools/perf/util/bpf-filter.c
530
for (x = 0; x < xyarray__max_x(evsel->core.fd); x++) {
tools/perf/util/bpf-filter.c
531
for (y = 0; y < xyarray__max_y(evsel->core.fd); y++) {
tools/perf/util/bpf-filter.c
532
link = bpf_program__attach_perf_event_opts(prog, FD(evsel, x, y),
tools/perf/util/bpf-filter.c
542
evsel->bpf_skel = skel;
tools/perf/util/bpf-filter.c
560
int perf_bpf_filter__destroy(struct evsel *evsel)
tools/perf/util/bpf-filter.c
565
list_for_each_entry_safe(expr, tmp, &evsel->bpf_filters, list) {
tools/perf/util/bpf-filter.c
569
sample_filter_bpf__destroy(evsel->bpf_skel);
tools/perf/util/bpf-filter.c
579
u64 perf_bpf_filter__lost_count(struct evsel *evsel)
tools/perf/util/bpf-filter.c
583
if (list_empty(&evsel->bpf_filters))
tools/perf/util/bpf-filter.c
594
if (pfi->evsel != evsel)
tools/perf/util/bpf-filter.c
601
} else if (evsel->bpf_skel) {
tools/perf/util/bpf-filter.c
602
struct sample_filter_bpf *skel = evsel->bpf_skel;
tools/perf/util/bpf-filter.c
76
struct evsel *evsel;
tools/perf/util/bpf-filter.h
19
struct evsel;
tools/perf/util/bpf-filter.h
31
int perf_bpf_filter__prepare(struct evsel *evsel, struct target *target);
tools/perf/util/bpf-filter.h
32
int perf_bpf_filter__destroy(struct evsel *evsel);
tools/perf/util/bpf-filter.h
33
u64 perf_bpf_filter__lost_count(struct evsel *evsel);
tools/perf/util/bpf-filter.h
48
static inline int perf_bpf_filter__prepare(struct evsel *evsel __maybe_unused,
tools/perf/util/bpf-filter.h
53
static inline int perf_bpf_filter__destroy(struct evsel *evsel __maybe_unused)
tools/perf/util/bpf-filter.h
57
static inline u64 perf_bpf_filter__lost_count(struct evsel *evsel __maybe_unused)
tools/perf/util/bpf_counter.c
106
static int bpf_program_profiler__destroy(struct evsel *evsel)
tools/perf/util/bpf_counter.c
111
&evsel->bpf_counter_list, list) {
tools/perf/util/bpf_counter.c
116
assert(list_empty(&evsel->bpf_counter_list));
tools/perf/util/bpf_counter.c
160
static int bpf_program_profiler_load_one(struct evsel *evsel, u32 prog_id)
tools/perf/util/bpf_counter.c
186
skel->rodata->num_cpu = evsel__nr_cpus(evsel);
tools/perf/util/bpf_counter.c
188
bpf_map__set_max_entries(skel->maps.events, evsel__nr_cpus(evsel));
tools/perf/util/bpf_counter.c
215
list_add(&counter->list, &evsel->bpf_counter_list);
tools/perf/util/bpf_counter.c
227
static int bpf_program_profiler__load(struct evsel *evsel, struct target *target)
tools/perf/util/bpf_counter.c
247
ret = bpf_program_profiler_load_one(evsel, prog_id);
tools/perf/util/bpf_counter.c
249
bpf_program_profiler__destroy(evsel);
tools/perf/util/bpf_counter.c
259
static int bpf_program_profiler__enable(struct evsel *evsel)
tools/perf/util/bpf_counter.c
264
list_for_each_entry(counter, &evsel->bpf_counter_list, list) {
tools/perf/util/bpf_counter.c
268
bpf_program_profiler__destroy(evsel);
tools/perf/util/bpf_counter.c
275
static int bpf_program_profiler__disable(struct evsel *evsel)
tools/perf/util/bpf_counter.c
279
list_for_each_entry(counter, &evsel->bpf_counter_list, list) {
tools/perf/util/bpf_counter.c
286
static int bpf_program_profiler__read(struct evsel *evsel)
tools/perf/util/bpf_counter.c
300
if (list_empty(&evsel->bpf_counter_list))
tools/perf/util/bpf_counter.c
303
perf_cpu_map__for_each_idx(idx, evsel__cpus(evsel)) {
tools/perf/util/bpf_counter.c
304
counts = perf_counts(evsel->counts, idx, 0);
tools/perf/util/bpf_counter.c
309
list_for_each_entry(counter, &evsel->bpf_counter_list, list) {
tools/perf/util/bpf_counter.c
322
int i = perf_cpu_map__idx(evsel__cpus(evsel),
tools/perf/util/bpf_counter.c
327
counts = perf_counts(evsel->counts, i, 0);
tools/perf/util/bpf_counter.c
336
static int bpf_program_profiler__install_pe(struct evsel *evsel, int cpu_map_idx,
tools/perf/util/bpf_counter.c
341
int cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx).cpu;
tools/perf/util/bpf_counter.c
344
list_for_each_entry(counter, &evsel->bpf_counter_list, list) {
tools/perf/util/bpf_counter.c
426
static int bperf_check_target(struct evsel *evsel,
tools/perf/util/bpf_counter.c
431
if (evsel->core.leader->nr_members > 1) {
tools/perf/util/bpf_counter.c
442
*filter_entry_cnt = perf_cpu_map__nr(evsel__cpus(evsel));
tools/perf/util/bpf_counter.c
445
*filter_entry_cnt = perf_thread_map__nr(evsel->core.threads);
tools/perf/util/bpf_counter.c
446
} else if (target->pid || evsel->evlist->workload.pid != -1) {
tools/perf/util/bpf_counter.c
448
*filter_entry_cnt = perf_thread_map__nr(evsel->core.threads);
tools/perf/util/bpf_counter.c
459
static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,
tools/perf/util/bpf_counter.c
490
err = bpf_map_update_elem(attr_map_fd, &evsel->core.attr, entry, BPF_ANY);
tools/perf/util/bpf_counter.c
493
evsel->bperf_leader_link_fd = bpf_link_get_fd_by_id(entry->link_id);
tools/perf/util/bpf_counter.c
494
assert(evsel->bperf_leader_link_fd >= 0);
tools/perf/util/bpf_counter.c
500
evsel->leader_skel = skel;
tools/perf/util/bpf_counter.c
501
assert(!perf_cpu_map__has_any_cpu_or_is_empty(evsel->core.cpus));
tools/perf/util/bpf_counter.c
504
evsel__open(evsel, evsel->core.cpus, threads);
tools/perf/util/bpf_counter.c
533
static int bperf__load(struct evsel *evsel, struct target *target)
tools/perf/util/bpf_counter.c
540
if (bperf_check_target(evsel, target, &filter_type, &filter_entry_cnt))
tools/perf/util/bpf_counter.c
543
evsel->bperf_leader_prog_fd = -1;
tools/perf/util/bpf_counter.c
544
evsel->bperf_leader_link_fd = -1;
tools/perf/util/bpf_counter.c
558
err = bpf_map_lookup_elem(attr_map_fd, &evsel->core.attr, &entry);
tools/perf/util/bpf_counter.c
560
err = bpf_map_update_elem(attr_map_fd, &evsel->core.attr, &entry, BPF_ANY);
tools/perf/util/bpf_counter.c
565
evsel->bperf_leader_link_fd = bpf_link_get_fd_by_id(entry.link_id);
tools/perf/util/bpf_counter.c
566
if (evsel->bperf_leader_link_fd < 0 &&
tools/perf/util/bpf_counter.c
567
bperf_reload_leader_program(evsel, attr_map_fd, &entry)) {
tools/perf/util/bpf_counter.c
576
evsel->bperf_leader_prog_fd = bpf_prog_get_fd_by_id(
tools/perf/util/bpf_counter.c
577
bpf_link_get_prog_id(evsel->bperf_leader_link_fd));
tools/perf/util/bpf_counter.c
578
assert(evsel->bperf_leader_prog_fd >= 0);
tools/perf/util/bpf_counter.c
587
err = bperf_trigger_reading(evsel->bperf_leader_prog_fd, 0);
tools/perf/util/bpf_counter.c
595
evsel->follower_skel = bperf_follower_bpf__open();
tools/perf/util/bpf_counter.c
596
if (!evsel->follower_skel) {
tools/perf/util/bpf_counter.c
603
bpf_program__set_attach_target(evsel->follower_skel->progs.fexit_XXX,
tools/perf/util/bpf_counter.c
604
evsel->bperf_leader_prog_fd, "on_switch");
tools/perf/util/bpf_counter.c
607
bpf_map__reuse_fd(evsel->follower_skel->maps.diff_readings, diff_map_fd);
tools/perf/util/bpf_counter.c
610
bpf_map__set_max_entries(evsel->follower_skel->maps.accum_readings,
tools/perf/util/bpf_counter.c
612
err = bperf_follower_bpf__load(evsel->follower_skel);
tools/perf/util/bpf_counter.c
615
bperf_follower_bpf__destroy(evsel->follower_skel);
tools/perf/util/bpf_counter.c
616
evsel->follower_skel = NULL;
tools/perf/util/bpf_counter.c
627
key = perf_thread_map__pid(evsel->core.threads, i);
tools/perf/util/bpf_counter.c
629
key = perf_cpu_map__cpu(evsel->core.cpus, i).cpu;
tools/perf/util/bpf_counter.c
633
filter_map_fd = bpf_map__fd(evsel->follower_skel->maps.filter);
tools/perf/util/bpf_counter.c
637
evsel->follower_skel->bss->type = filter_type;
tools/perf/util/bpf_counter.c
638
evsel->follower_skel->bss->inherit = target->inherit;
tools/perf/util/bpf_counter.c
640
err = bperf_attach_follower_program(evsel->follower_skel, filter_type,
tools/perf/util/bpf_counter.c
644
if (err && evsel->bperf_leader_link_fd >= 0)
tools/perf/util/bpf_counter.c
645
close(evsel->bperf_leader_link_fd);
tools/perf/util/bpf_counter.c
646
if (err && evsel->bperf_leader_prog_fd >= 0)
tools/perf/util/bpf_counter.c
647
close(evsel->bperf_leader_prog_fd);
tools/perf/util/bpf_counter.c
657
static int bperf__install_pe(struct evsel *evsel, int cpu_map_idx, int fd)
tools/perf/util/bpf_counter.c
659
struct bperf_leader_bpf *skel = evsel->leader_skel;
tools/perf/util/bpf_counter.c
660
int cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx).cpu;
tools/perf/util/bpf_counter.c
670
static int bperf_sync_counters(struct evsel *evsel)
tools/perf/util/bpf_counter.c
675
perf_cpu_map__for_each_cpu(cpu, idx, evsel->core.cpus)
tools/perf/util/bpf_counter.c
676
bperf_trigger_reading(evsel->bperf_leader_prog_fd, cpu.cpu);
tools/perf/util/bpf_counter.c
681
static int bperf__enable(struct evsel *evsel)
tools/perf/util/bpf_counter.c
683
evsel->follower_skel->bss->enabled = 1;
tools/perf/util/bpf_counter.c
687
static int bperf__disable(struct evsel *evsel)
tools/perf/util/bpf_counter.c
689
evsel->follower_skel->bss->enabled = 0;
tools/perf/util/bpf_counter.c
693
static int bperf__read(struct evsel *evsel)
tools/perf/util/bpf_counter.c
695
struct bperf_follower_bpf *skel = evsel->follower_skel;
tools/perf/util/bpf_counter.c
701
bperf_sync_counters(evsel);
tools/perf/util/bpf_counter.c
711
switch (evsel->follower_skel->bss->type) {
tools/perf/util/bpf_counter.c
716
perf_cpu_map__for_each_cpu(entry, j, evsel__cpus(evsel)) {
tools/perf/util/bpf_counter.c
717
counts = perf_counts(evsel->counts, j, 0);
tools/perf/util/bpf_counter.c
725
cpu = perf_cpu_map__cpu(evsel__cpus(evsel), i).cpu;
tools/perf/util/bpf_counter.c
727
counts = perf_counts(evsel->counts, i, 0);
tools/perf/util/bpf_counter.c
734
counts = perf_counts(evsel->counts, 0, i);
tools/perf/util/bpf_counter.c
753
static int bperf__destroy(struct evsel *evsel)
tools/perf/util/bpf_counter.c
755
bperf_follower_bpf__destroy(evsel->follower_skel);
tools/perf/util/bpf_counter.c
756
close(evsel->bperf_leader_prog_fd);
tools/perf/util/bpf_counter.c
757
close(evsel->bperf_leader_link_fd);
tools/perf/util/bpf_counter.c
847
static bool bpf_counter_skip(struct evsel *evsel)
tools/perf/util/bpf_counter.c
849
return evsel->bpf_counter_ops == NULL;
tools/perf/util/bpf_counter.c
852
int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd)
tools/perf/util/bpf_counter.c
854
if (bpf_counter_skip(evsel))
tools/perf/util/bpf_counter.c
856
return evsel->bpf_counter_ops->install_pe(evsel, cpu_map_idx, fd);
tools/perf/util/bpf_counter.c
859
int bpf_counter__load(struct evsel *evsel, struct target *target)
tools/perf/util/bpf_counter.c
862
evsel->bpf_counter_ops = &bpf_program_profiler_ops;
tools/perf/util/bpf_counter.c
864
evsel->bpf_counter_ops = &bperf_cgrp_ops;
tools/perf/util/bpf_counter.c
865
else if (target->use_bpf || evsel->bpf_counter ||
tools/perf/util/bpf_counter.c
866
evsel__match_bpf_counter_events(evsel->name))
tools/perf/util/bpf_counter.c
867
evsel->bpf_counter_ops = &bperf_ops;
tools/perf/util/bpf_counter.c
869
if (evsel->bpf_counter_ops)
tools/perf/util/bpf_counter.c
870
return evsel->bpf_counter_ops->load(evsel, target);
tools/perf/util/bpf_counter.c
874
int bpf_counter__enable(struct evsel *evsel)
tools/perf/util/bpf_counter.c
876
if (bpf_counter_skip(evsel))
tools/perf/util/bpf_counter.c
878
return evsel->bpf_counter_ops->enable(evsel);
tools/perf/util/bpf_counter.c
881
int bpf_counter__disable(struct evsel *evsel)
tools/perf/util/bpf_counter.c
883
if (bpf_counter_skip(evsel))
tools/perf/util/bpf_counter.c
885
return evsel->bpf_counter_ops->disable(evsel);
tools/perf/util/bpf_counter.c
888
int bpf_counter__read(struct evsel *evsel)
tools/perf/util/bpf_counter.c
890
if (bpf_counter_skip(evsel))
tools/perf/util/bpf_counter.c
892
return evsel->bpf_counter_ops->read(evsel);
tools/perf/util/bpf_counter.c
895
void bpf_counter__destroy(struct evsel *evsel)
tools/perf/util/bpf_counter.c
897
if (bpf_counter_skip(evsel))
tools/perf/util/bpf_counter.c
899
evsel->bpf_counter_ops->destroy(evsel);
tools/perf/util/bpf_counter.c
900
evsel->bpf_counter_ops = NULL;
tools/perf/util/bpf_counter.c
901
evsel->bpf_skel = NULL;
tools/perf/util/bpf_counter.h
10
typedef int (*bpf_counter_evsel_op)(struct evsel *evsel);
tools/perf/util/bpf_counter.h
11
typedef int (*bpf_counter_evsel_target_op)(struct evsel *evsel,
tools/perf/util/bpf_counter.h
13
typedef int (*bpf_counter_evsel_install_pe_op)(struct evsel *evsel,
tools/perf/util/bpf_counter.h
27
int bpf_counter__load(struct evsel *evsel, struct target *target);
tools/perf/util/bpf_counter.h
28
int bpf_counter__enable(struct evsel *evsel);
tools/perf/util/bpf_counter.h
29
int bpf_counter__disable(struct evsel *evsel);
tools/perf/util/bpf_counter.h
30
int bpf_counter__read(struct evsel *evsel);
tools/perf/util/bpf_counter.h
31
void bpf_counter__destroy(struct evsel *evsel);
tools/perf/util/bpf_counter.h
32
int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd);
tools/perf/util/bpf_counter.h
41
static inline int bpf_counter__load(struct evsel *evsel __maybe_unused,
tools/perf/util/bpf_counter.h
47
static inline int bpf_counter__enable(struct evsel *evsel __maybe_unused)
tools/perf/util/bpf_counter.h
5
struct evsel;
tools/perf/util/bpf_counter.h
52
static inline int bpf_counter__disable(struct evsel *evsel __maybe_unused)
tools/perf/util/bpf_counter.h
57
static inline int bpf_counter__read(struct evsel *evsel __maybe_unused)
tools/perf/util/bpf_counter.h
62
static inline void bpf_counter__destroy(struct evsel *evsel __maybe_unused)
tools/perf/util/bpf_counter.h
66
static inline int bpf_counter__install_pe(struct evsel *evsel __maybe_unused,
tools/perf/util/bpf_counter_cgroup.c
151
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/bpf_counter_cgroup.c
152
if (cgrp == NULL || evsel->cgrp == leader_cgrp) {
tools/perf/util/bpf_counter_cgroup.c
155
leader_cgrp = evsel->cgrp;
tools/perf/util/bpf_counter_cgroup.c
156
evsel->cgrp = NULL;
tools/perf/util/bpf_counter_cgroup.c
159
err = evsel__open_per_cpu(evsel, evsel->core.cpus, -1);
tools/perf/util/bpf_counter_cgroup.c
161
evsel->supported = true;
tools/perf/util/bpf_counter_cgroup.c
164
perf_cpu_map__for_each_cpu(cpu, j, evsel->core.cpus) {
tools/perf/util/bpf_counter_cgroup.c
165
int fd = FD(evsel, j);
tools/perf/util/bpf_counter_cgroup.c
166
__u32 idx = evsel->core.idx * total_cpus + cpu.cpu;
tools/perf/util/bpf_counter_cgroup.c
171
evsel->cgrp = leader_cgrp;
tools/perf/util/bpf_counter_cgroup.c
174
if (evsel->cgrp == cgrp)
tools/perf/util/bpf_counter_cgroup.c
177
cgrp = evsel->cgrp;
tools/perf/util/bpf_counter_cgroup.c
199
struct evsel *leader;
tools/perf/util/bpf_counter_cgroup.c
202
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/bpf_counter_cgroup.c
203
leader = evlist__find_evsel(evlist, evsel->core.idx % num_events);
tools/perf/util/bpf_counter_cgroup.c
205
evsel->supported = leader->supported;
tools/perf/util/bpf_counter_cgroup.c
225
static int bperf_cgrp__load(struct evsel *evsel,
tools/perf/util/bpf_counter_cgroup.c
230
evsel->bperf_leader_prog_fd = -1;
tools/perf/util/bpf_counter_cgroup.c
231
evsel->bperf_leader_link_fd = -1;
tools/perf/util/bpf_counter_cgroup.c
233
if (!bperf_loaded && bperf_load_program(evsel->evlist))
tools/perf/util/bpf_counter_cgroup.c
238
evsel->follower_skel = (struct bperf_follower_bpf *)skel;
tools/perf/util/bpf_counter_cgroup.c
243
static int bperf_cgrp__install_pe(struct evsel *evsel __maybe_unused,
tools/perf/util/bpf_counter_cgroup.c
267
static int bperf_cgrp__enable(struct evsel *evsel)
tools/perf/util/bpf_counter_cgroup.c
269
if (evsel->core.idx)
tools/perf/util/bpf_counter_cgroup.c
272
bperf_cgrp__sync_counters(evsel->evlist);
tools/perf/util/bpf_counter_cgroup.c
278
static int bperf_cgrp__disable(struct evsel *evsel)
tools/perf/util/bpf_counter_cgroup.c
280
if (evsel->core.idx)
tools/perf/util/bpf_counter_cgroup.c
283
bperf_cgrp__sync_counters(evsel->evlist);
tools/perf/util/bpf_counter_cgroup.c
289
static int bperf_cgrp__read(struct evsel *evsel)
tools/perf/util/bpf_counter_cgroup.c
291
struct evlist *evlist = evsel->evlist;
tools/perf/util/bpf_counter_cgroup.c
297
if (evsel->core.idx)
tools/perf/util/bpf_counter_cgroup.c
300
bperf_cgrp__sync_counters(evsel->evlist);
tools/perf/util/bpf_counter_cgroup.c
308
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/bpf_counter_cgroup.c
309
__u32 idx = evsel->core.idx;
tools/perf/util/bpf_counter_cgroup.c
316
idx, evsel__name(evsel), evsel->cgrp->name);
tools/perf/util/bpf_counter_cgroup.c
320
perf_cpu_map__for_each_cpu(cpu, i, evsel->core.cpus) {
tools/perf/util/bpf_counter_cgroup.c
321
counts = perf_counts(evsel->counts, i, 0);
tools/perf/util/bpf_counter_cgroup.c
333
static int bperf_cgrp__destroy(struct evsel *evsel)
tools/perf/util/bpf_counter_cgroup.c
335
if (evsel->core.idx)
tools/perf/util/bpf_counter_cgroup.c
41
static struct evsel *cgrp_switch;
tools/perf/util/bpf_counter_cgroup.c
98
struct evsel *evsel;
tools/perf/util/bpf_off_cpu.c
276
struct evsel *evsel;
tools/perf/util/bpf_off_cpu.c
281
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/bpf_off_cpu.c
282
struct cgroup *cgrp = evsel->cgrp;
tools/perf/util/bpf_off_cpu.c
324
struct evsel *evsel;
tools/perf/util/bpf_off_cpu.c
337
evsel = evlist__find_evsel_by_str(session->evlist, OFFCPU_EVENT);
tools/perf/util/bpf_off_cpu.c
338
if (evsel == NULL) {
tools/perf/util/bpf_off_cpu.c
343
sample_type = evsel->core.attr.sample_type;
tools/perf/util/bpf_off_cpu.c
352
if (evsel->core.id)
tools/perf/util/bpf_off_cpu.c
353
sid = evsel->core.id[0];
tools/perf/util/bpf_off_cpu.c
47
struct evsel *evsel;
tools/perf/util/bpf_off_cpu.c
55
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/bpf_off_cpu.c
56
if (evsel__is_offcpu_event(evsel)) {
tools/perf/util/bpf_off_cpu.c
57
evsel->core.system_wide = true;
tools/perf/util/bpf_off_cpu.c
68
struct evsel *evsel;
tools/perf/util/bpf_off_cpu.c
85
evsel = evlist__find_evsel_by_str(evlist, OFFCPU_EVENT);
tools/perf/util/bpf_off_cpu.c
86
if (evsel == NULL) {
tools/perf/util/bpf_off_cpu.c
91
perf_cpu_map__for_each_cpu(pcpu, i, evsel->core.cpus) {
tools/perf/util/bpf_off_cpu.c
96
xyarray__entry(evsel->core.fd, cpu_nr, 0),
tools/perf/util/bpf_trace_augment.c
11
static struct evsel *bpf_output;
tools/perf/util/cgroup.c
104
struct evsel *counter;
tools/perf/util/cgroup.c
156
struct evsel *counter;
tools/perf/util/cgroup.c
202
static void evsel__set_default_cgroup(struct evsel *evsel, struct cgroup *cgroup)
tools/perf/util/cgroup.c
204
if (evsel->cgrp == NULL)
tools/perf/util/cgroup.c
205
evsel->cgrp = cgroup__get(cgroup);
tools/perf/util/cgroup.c
210
struct evsel *evsel;
tools/perf/util/cgroup.c
212
evlist__for_each_entry(evlist, evsel)
tools/perf/util/cgroup.c
213
evsel__set_default_cgroup(evsel, cgroup);
tools/perf/util/cgroup.c
364
struct evsel *counter;
tools/perf/util/cgroup.c
454
struct evsel *pos;
tools/perf/util/cgroup.c
472
struct evsel *evsel = evsel__clone(/*dest=*/NULL, pos);
tools/perf/util/cgroup.c
474
if (evsel == NULL)
tools/perf/util/cgroup.c
478
pos->priv = evsel;
tools/perf/util/cgroup.c
479
cgroup__put(evsel->cgrp);
tools/perf/util/cgroup.c
480
evsel->cgrp = cgroup__get(cgrp);
tools/perf/util/cgroup.c
482
evlist__add(tmp_list, evsel);
tools/perf/util/cgroup.c
486
struct evsel *evsel = pos->priv;
tools/perf/util/cgroup.c
489
evsel__set_leader(evsel, evsel__leader(pos)->priv);
tools/perf/util/cgroup.c
492
evsel->metric_leader = pos->metric_leader->priv;
tools/perf/util/cgroup.c
495
evsel->first_wildcard_match = pos->first_wildcard_match->priv;
tools/perf/util/counts.c
53
void evsel__reset_counts(struct evsel *evsel)
tools/perf/util/counts.c
55
perf_counts__reset(evsel->counts);
tools/perf/util/counts.c
58
int evsel__alloc_counts(struct evsel *evsel)
tools/perf/util/counts.c
60
struct perf_cpu_map *cpus = evsel__cpus(evsel);
tools/perf/util/counts.c
61
int nthreads = perf_thread_map__nr(evsel->core.threads);
tools/perf/util/counts.c
63
evsel->counts = perf_counts__new(perf_cpu_map__nr(cpus), nthreads);
tools/perf/util/counts.c
64
return evsel->counts != NULL ? 0 : -ENOMEM;
tools/perf/util/counts.c
67
void evsel__free_counts(struct evsel *evsel)
tools/perf/util/counts.c
69
perf_counts__delete(evsel->counts);
tools/perf/util/counts.c
70
evsel->counts = NULL;
tools/perf/util/counts.h
10
struct evsel;
tools/perf/util/counts.h
41
void evsel__reset_counts(struct evsel *evsel);
tools/perf/util/counts.h
42
int evsel__alloc_counts(struct evsel *evsel);
tools/perf/util/counts.h
43
void evsel__free_counts(struct evsel *evsel);
tools/perf/util/cs-etm.c
1036
struct evsel *evsel)
tools/perf/util/cs-etm.c
1042
return evsel->core.attr.type == aux->pmu_type;
tools/perf/util/cs-etm.c
1465
struct evsel *evsel = sample->evsel;
tools/perf/util/cs-etm.c
1469
if (!evsel && etm->session && etm->session->evlist)
tools/perf/util/cs-etm.c
1470
evsel = evlist__id2evsel(etm->session->evlist, sample->id);
tools/perf/util/cs-etm.c
1472
if (evsel)
tools/perf/util/cs-etm.c
1473
branch_sample_type = evsel->core.attr.branch_sample_type;
tools/perf/util/cs-etm.c
1762
struct evsel *evsel;
tools/perf/util/cs-etm.c
1768
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/cs-etm.c
1769
if (evsel->core.attr.type == etm->pmu_type) {
tools/perf/util/cs-etm.c
1783
attr.sample_type = evsel->core.attr.sample_type & PERF_SAMPLE_MASK;
tools/perf/util/cs-etm.c
1791
attr.exclude_user = evsel->core.attr.exclude_user;
tools/perf/util/cs-etm.c
1792
attr.exclude_kernel = evsel->core.attr.exclude_kernel;
tools/perf/util/cs-etm.c
1793
attr.exclude_hv = evsel->core.attr.exclude_hv;
tools/perf/util/cs-etm.c
1794
attr.exclude_host = evsel->core.attr.exclude_host;
tools/perf/util/cs-etm.c
1795
attr.exclude_guest = evsel->core.attr.exclude_guest;
tools/perf/util/cs-etm.c
1796
attr.sample_id_all = evsel->core.attr.sample_id_all;
tools/perf/util/cs-etm.c
1797
attr.read_format = evsel->core.attr.read_format;
tools/perf/util/cs-etm.c
1800
id = auxtrace_synth_id_range_start(evsel);
tools/perf/util/cs-etm.c
3217
struct evsel *evsel;
tools/perf/util/cs-etm.c
3235
evsel = evlist__event2evsel(session->evlist, event);
tools/perf/util/cs-etm.c
3236
if (!evsel)
tools/perf/util/cs-etm.c
3239
ret = evsel__parse_sample(evsel, event, &sample);
tools/perf/util/cs-etm.c
510
struct evsel *evsel;
tools/perf/util/cs-etm.c
531
evsel = evlist__event2evsel(session->evlist, event);
tools/perf/util/cs-etm.c
532
if (!evsel)
tools/perf/util/cs-etm.c
535
err = evsel__parse_sample(evsel, event, &sample);
tools/perf/util/data-convert-bt.c
1076
struct evsel *evsel,
tools/perf/util/data-convert-bt.c
1079
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/data-convert-bt.c
1110
static int add_generic_types(struct ctf_writer *cw, struct evsel *evsel,
tools/perf/util/data-convert-bt.c
1113
u64 type = evsel->core.attr.sample_type;
tools/perf/util/data-convert-bt.c
1176
static int add_event(struct ctf_writer *cw, struct evsel *evsel)
tools/perf/util/data-convert-bt.c
1180
const char *name = evsel__name(evsel);
tools/perf/util/data-convert-bt.c
1183
if (evsel->priv) {
tools/perf/util/data-convert-bt.c
1187
pr("Adding event '%s' (type %d)\n", name, evsel->core.attr.type);
tools/perf/util/data-convert-bt.c
1193
ret = add_generic_types(cw, evsel, event_class);
tools/perf/util/data-convert-bt.c
1197
if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) {
tools/perf/util/data-convert-bt.c
1198
ret = add_tracepoint_types(cw, evsel, event_class);
tools/perf/util/data-convert-bt.c
1203
if (evsel__is_bpf_output(evsel)) {
tools/perf/util/data-convert-bt.c
1220
evsel->priv = priv;
tools/perf/util/data-convert-bt.c
1239
struct evsel *evsel;
tools/perf/util/data-convert-bt.c
1242
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/data-convert-bt.c
1243
bool is_tracepoint = evsel->core.attr.type == PERF_TYPE_TRACEPOINT;
tools/perf/util/data-convert-bt.c
1251
ret = add_event(cw, evsel);
tools/perf/util/data-convert-bt.c
1354
struct evsel *evsel;
tools/perf/util/data-convert-bt.c
1356
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/data-convert-bt.c
1359
priv = evsel->priv;
tools/perf/util/data-convert-bt.c
1362
zfree(&evsel->priv);
tools/perf/util/data-convert-bt.c
432
struct evsel *evsel,
tools/perf/util/data-convert-bt.c
435
const struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/data-convert-bt.c
604
struct evsel *evsel,
tools/perf/util/data-convert-bt.c
607
u64 type = evsel->core.attr.sample_type;
tools/perf/util/data-convert-bt.c
773
struct evsel *evsel)
tools/perf/util/data-convert-bt.c
777
if (evsel->core.attr.sample_type & PERF_SAMPLE_CPU)
tools/perf/util/data-convert-bt.c
808
struct evsel *evsel = sample->evsel;
tools/perf/util/data-convert-bt.c
809
struct evsel_priv *priv = evsel->priv;
tools/perf/util/data-convert-bt.c
815
unsigned long type = evsel->core.attr.sample_type;
tools/perf/util/data-convert-bt.c
841
ret = add_generic_values(cw, event, evsel, sample);
tools/perf/util/data-convert-bt.c
845
if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) {
tools/perf/util/data-convert-bt.c
847
evsel, sample);
tools/perf/util/data-convert-bt.c
859
if (evsel__is_bpf_output(evsel)) {
tools/perf/util/data-convert-bt.c
865
cs = ctf_stream(cw, get_sample_cpu(cw, sample, evsel));
tools/perf/util/data-convert-json.c
168
u64 sample_type = __evlist__combined_sample_type(sample->evsel->evlist);
tools/perf/util/data-convert-json.c
249
struct tep_event *tp_format = evsel__tp_format(sample->evsel);
tools/perf/util/db-export.c
35
int db_export__evsel(struct db_export *dbe, struct evsel *evsel)
tools/perf/util/db-export.c
366
err = db_export__evsel(dbe, sample->evsel);
tools/perf/util/db-export.c
37
if (evsel->db_id)
tools/perf/util/db-export.c
40
evsel->db_id = ++dbe->evsel_last_db_id;
tools/perf/util/db-export.c
43
return dbe->export_evsel(dbe, evsel);
tools/perf/util/db-export.h
13
struct evsel;
tools/perf/util/db-export.h
41
int (*export_evsel)(struct db_export *dbe, struct evsel *evsel);
tools/perf/util/db-export.h
81
int db_export__evsel(struct db_export *dbe, struct evsel *evsel);
tools/perf/util/disasm.h
14
struct evsel;
tools/perf/util/dlfilter.c
284
return &d->evsel->core.attr;
tools/perf/util/dlfilter.c
493
struct evsel *evsel,
tools/perf/util/dlfilter.c
506
d->evsel = evsel;
tools/perf/util/dlfilter.c
563
(evsel->core.attr.sample_type & PERF_SAMPLE_ADDR) &&
tools/perf/util/dlfilter.c
564
sample_addr_correlates_sym(&evsel->core.attr);
tools/perf/util/dlfilter.c
566
d_sample.event = evsel__name(evsel);
tools/perf/util/dlfilter.h
13
struct evsel;
tools/perf/util/dlfilter.h
33
struct evsel *evsel;
tools/perf/util/dlfilter.h
61
struct evsel *evsel,
tools/perf/util/dlfilter.h
72
struct evsel *evsel,
tools/perf/util/dlfilter.h
79
return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, false);
tools/perf/util/dlfilter.h
85
struct evsel *evsel,
tools/perf/util/dlfilter.h
92
return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, true);
tools/perf/util/drm_pmu.c
515
int evsel__drm_pmu_open(struct evsel *evsel,
tools/perf/util/drm_pmu.c
519
(void)evsel;
tools/perf/util/drm_pmu.c
621
static uint64_t drm_pmu__read_system_wide(struct drm_pmu *drm, struct evsel *evsel)
tools/perf/util/drm_pmu.c
625
.match = drm->events[evsel->core.attr.config].name,
tools/perf/util/drm_pmu.c
626
.unit = drm->events[evsel->core.attr.config].unit,
tools/perf/util/drm_pmu.c
633
static uint64_t drm_pmu__read_for_pid(struct drm_pmu *drm, struct evsel *evsel, int pid)
tools/perf/util/drm_pmu.c
637
.match = drm->events[evsel->core.attr.config].name,
tools/perf/util/drm_pmu.c
638
.unit = drm->events[evsel->core.attr.config].unit,
tools/perf/util/drm_pmu.c
659
int evsel__drm_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/drm_pmu.c
661
struct drm_pmu *drm = container_of(evsel->pmu, struct drm_pmu, pmu);
tools/perf/util/drm_pmu.c
663
int pid = perf_thread_map__pid(evsel->core.threads, thread);
tools/perf/util/drm_pmu.c
667
counter = drm_pmu__read_for_pid(drm, evsel, pid);
tools/perf/util/drm_pmu.c
669
counter = drm_pmu__read_system_wide(drm, evsel);
tools/perf/util/drm_pmu.c
671
if (evsel->prev_raw_counts)
tools/perf/util/drm_pmu.c
672
old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread);
tools/perf/util/drm_pmu.c
674
count = perf_counts(evsel->counts, cpu_map_idx, thread);
tools/perf/util/drm_pmu.c
69
bool evsel__is_drm(const struct evsel *evsel)
tools/perf/util/drm_pmu.c
71
return perf_pmu__is_drm(evsel->pmu);
tools/perf/util/drm_pmu.h
30
bool evsel__is_drm(const struct evsel *evsel);
tools/perf/util/drm_pmu.h
34
int evsel__drm_pmu_open(struct evsel *evsel,
tools/perf/util/drm_pmu.h
37
int evsel__drm_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
tools/perf/util/evlist.c
107
struct evsel *evsel;
tools/perf/util/evlist.c
1114
int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel,
tools/perf/util/evlist.c
1117
struct evsel *evsel;
tools/perf/util/evlist.c
1120
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1125
if (evsel->filter) {
tools/perf/util/evlist.c
1126
err = perf_evsel__apply_filter(&evsel->core, evsel->filter);
tools/perf/util/evlist.c
1128
*err_evsel = evsel;
tools/perf/util/evlist.c
1136
if (!list_empty(&evsel->bpf_filters)) {
tools/perf/util/evlist.c
1137
err = perf_bpf_filter__prepare(evsel, target);
tools/perf/util/evlist.c
1139
*err_evsel = evsel;
tools/perf/util/evlist.c
1150
struct evsel *evsel;
tools/perf/util/evlist.c
1156
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1157
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/evlist.c
1160
err = evsel__set_filter(evsel, filter);
tools/perf/util/evlist.c
1170
struct evsel *evsel;
tools/perf/util/evlist.c
1176
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1177
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/evlist.c
1180
err = evsel__append_tp_filter(evsel, filter);
tools/perf/util/evlist.c
1239
struct evsel *pos;
tools/perf/util/evlist.c
1258
struct evsel *evsel;
tools/perf/util/evlist.c
1263
evlist__for_each_entry(evlist, evsel)
tools/perf/util/evlist.c
1264
evlist->combined_sample_type |= evsel->core.attr.sample_type;
tools/perf/util/evlist.c
1277
struct evsel *evsel;
tools/perf/util/evlist.c
1280
evlist__for_each_entry(evlist, evsel)
tools/perf/util/evlist.c
1281
branch_type |= evsel->core.attr.branch_sample_type;
tools/perf/util/evlist.c
1285
static struct evsel *
tools/perf/util/evlist.c
1286
evlist__find_dup_event_from_prev(struct evlist *evlist, struct evsel *event)
tools/perf/util/evlist.c
1288
struct evsel *pos;
tools/perf/util/evlist.c
1333
struct evsel *evsel, *dup;
tools/perf/util/evlist.c
1336
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1337
if (evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_COUNTERS) {
tools/perf/util/evlist.c
1338
evsel->br_cntr_idx = i++;
tools/perf/util/evlist.c
1339
evsel__leader(evsel)->br_cntr_nr++;
tools/perf/util/evlist.c
1341
dup = evlist__find_dup_event_from_prev(evlist, evsel);
tools/perf/util/evlist.c
1343
memcpy(evsel->abbr_name, dup->abbr_name, 3 * sizeof(char));
tools/perf/util/evlist.c
1345
evlist__new_abbr_name(evsel->abbr_name);
tools/perf/util/evlist.c
135
evlist__for_each_entry(evlist, evsel)
tools/perf/util/evlist.c
1353
struct evsel *first = evlist__first(evlist), *pos = first;
tools/perf/util/evlist.c
136
evsel__set_sample_id(evsel, /*can_sample_identifier=*/false);
tools/perf/util/evlist.c
1375
struct evsel *first = evlist__first(evlist);
tools/perf/util/evlist.c
1382
struct evsel *first = evlist__first(evlist), *pos = first;
tools/perf/util/evlist.c
1394
struct evsel *first = evlist__first(evlist);
tools/perf/util/evlist.c
1398
void evlist__set_selected(struct evlist *evlist, struct evsel *evsel)
tools/perf/util/evlist.c
1400
evlist->selected = evsel;
tools/perf/util/evlist.c
1405
struct evsel *evsel;
tools/perf/util/evlist.c
1409
if (evlist_cpu_itr.cpu_map_idx == 0 && evsel__is_retire_lat(evlist_cpu_itr.evsel))
tools/perf/util/evlist.c
1410
evsel__tpebs_close(evlist_cpu_itr.evsel);
tools/perf/util/evlist.c
1411
perf_evsel__close_cpu(&evlist_cpu_itr.evsel->core,
tools/perf/util/evlist.c
1415
evlist__for_each_entry_reverse(evlist, evsel) {
tools/perf/util/evlist.c
1416
perf_evsel__free_fd(&evsel->core);
tools/perf/util/evlist.c
1417
perf_evsel__free_id(&evsel->core);
tools/perf/util/evlist.c
1454
struct evsel *evsel;
tools/perf/util/evlist.c
1469
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1470
err = evsel__open(evsel, evsel->core.cpus, evsel->core.threads);
tools/perf/util/evlist.c
1637
struct evsel *evsel = evlist__event2evsel(evlist, event);
tools/perf/util/evlist.c
1640
if (!evsel) {
tools/perf/util/evlist.c
1645
ret = evsel__parse_sample(evsel, event, sample);
tools/perf/util/evlist.c
166
struct evsel *first = evlist__first(evlist);
tools/perf/util/evlist.c
1661
struct evsel *evsel = evlist__event2evsel(evlist, event);
tools/perf/util/evlist.c
1663
if (!evsel)
tools/perf/util/evlist.c
1665
return evsel__parse_sample_timestamp(evsel, event, timestamp);
tools/perf/util/evlist.c
1696
struct evsel *first = evlist__first(evlist);
tools/perf/util/evlist.c
174
struct evsel *evsel;
tools/perf/util/evlist.c
1755
void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel)
tools/perf/util/evlist.c
1757
struct evsel *evsel, *n;
tools/perf/util/evlist.c
176
evlist__for_each_entry(evlist, evsel)
tools/perf/util/evlist.c
1763
evlist__for_each_entry_safe(evlist, n, evsel) {
tools/perf/util/evlist.c
1764
if (evsel__leader(evsel) == evsel__leader(move_evsel))
tools/perf/util/evlist.c
1765
list_move_tail(&evsel->core.node, &move);
tools/perf/util/evlist.c
177
evsel__calc_id_pos(evsel);
tools/perf/util/evlist.c
1771
struct evsel *evlist__get_tracking_event(struct evlist *evlist)
tools/perf/util/evlist.c
1773
struct evsel *evsel;
tools/perf/util/evlist.c
1775
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1776
if (evsel->tracking)
tools/perf/util/evlist.c
1777
return evsel;
tools/perf/util/evlist.c
1783
void evlist__set_tracking_event(struct evlist *evlist, struct evsel *tracking_evsel)
tools/perf/util/evlist.c
1785
struct evsel *evsel;
tools/perf/util/evlist.c
1790
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1791
if (evsel != tracking_evsel)
tools/perf/util/evlist.c
1792
evsel->tracking = false;
tools/perf/util/evlist.c
1798
struct evsel *evlist__findnew_tracking_event(struct evlist *evlist, bool system_wide)
tools/perf/util/evlist.c
1800
struct evsel *evsel;
tools/perf/util/evlist.c
1802
evsel = evlist__get_tracking_event(evlist);
tools/perf/util/evlist.c
1803
if (!evsel__is_dummy_event(evsel)) {
tools/perf/util/evlist.c
1804
evsel = evlist__add_aux_dummy(evlist, system_wide);
tools/perf/util/evlist.c
1805
if (!evsel)
tools/perf/util/evlist.c
1808
evlist__set_tracking_event(evlist, evsel);
tools/perf/util/evlist.c
1810
perf_evlist__go_system_wide(&evlist->core, &evsel->core);
tools/perf/util/evlist.c
1813
return evsel;
tools/perf/util/evlist.c
1816
struct evsel *evlist__find_evsel_by_str(struct evlist *evlist, const char *str)
tools/perf/util/evlist.c
1818
struct evsel *evsel;
tools/perf/util/evlist.c
1820
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1821
if (!evsel->name)
tools/perf/util/evlist.c
1823
if (evsel__name_is(evsel, str))
tools/perf/util/evlist.c
1824
return evsel;
tools/perf/util/evlist.c
184
struct evsel *pos, *n;
tools/perf/util/evlist.c
1889
struct evsel *evsel;
tools/perf/util/evlist.c
1891
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
1892
if (!evsel->core.attr.exclude_kernel)
tools/perf/util/evlist.c
1907
struct evsel *leader = evlist__first(evlist);
tools/perf/util/evlist.c
1914
struct evsel *evlist__reset_weak_group(struct evlist *evsel_list, struct evsel *evsel, bool close)
tools/perf/util/evlist.c
1916
struct evsel *c2, *leader;
tools/perf/util/evlist.c
1919
leader = evsel__leader(evsel);
tools/perf/util/evlist.c
1929
if (c2 == evsel)
tools/perf/util/evlist.c
217
void evlist__add(struct evlist *evlist, struct evsel *entry)
tools/perf/util/evlist.c
2180
struct evsel *evsel;
tools/perf/util/evlist.c
2194
evsel = evlist__find_evsel_by_str(evlist, name);
tools/perf/util/evlist.c
2195
if (evsel) {
tools/perf/util/evlist.c
2200
pr_info("Event %s %s\n", evsel->name,
tools/perf/util/evlist.c
2221
struct evsel *evsel;
tools/perf/util/evlist.c
2246
evlist__for_each_entry(evlist, evsel)
tools/perf/util/evlist.c
2247
evsel__fprintf(evsel, &details, stderr);
tools/perf/util/evlist.c
227
void evlist__remove(struct evlist *evlist, struct evsel *evsel)
tools/perf/util/evlist.c
229
evsel->evlist = NULL;
tools/perf/util/evlist.c
230
perf_evlist__remove(&evlist->core, &evsel->core);
tools/perf/util/evlist.c
236
struct evsel *evsel, *temp, *leader = NULL;
tools/perf/util/evlist.c
238
__evlist__for_each_entry_safe(list, temp, evsel) {
tools/perf/util/evlist.c
239
list_del_init(&evsel->core.node);
tools/perf/util/evlist.c
240
evlist__add(evlist, evsel);
tools/perf/util/evlist.c
241
leader = evsel;
tools/perf/util/evlist.c
245
__evlist__for_each_entry_safe(list, temp, evsel) {
tools/perf/util/evlist.c
246
if (evsel__has_leader(evsel, leader)) {
tools/perf/util/evlist.c
247
list_del_init(&evsel->core.node);
tools/perf/util/evlist.c
248
evlist__add(evlist, evsel);
tools/perf/util/evlist.c
2529
struct evsel *evlist__find_evsel(struct evlist *evlist, int idx)
tools/perf/util/evlist.c
2531
struct evsel *evsel;
tools/perf/util/evlist.c
2533
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
2534
if (evsel->core.idx == idx)
tools/perf/util/evlist.c
2535
return evsel;
tools/perf/util/evlist.c
2542
struct evsel *evsel, *leader = NULL;
tools/perf/util/evlist.c
2545
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
2546
struct evsel *new_leader = evsel__leader(evsel);
tools/perf/util/evlist.c
2548
if (evsel__is_dummy_event(evsel))
tools/perf/util/evlist.c
2564
strbuf_addstr(sb, evsel__name(evsel));
tools/perf/util/evlist.c
2574
struct evsel *leader, *evsel, *pos;
tools/perf/util/evlist.c
2583
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
2584
leader = evsel__leader(evsel);
tools/perf/util/evlist.c
2585
if (leader == evsel)
tools/perf/util/evlist.c
2609
struct evsel *pos;
tools/perf/util/evlist.c
262
struct evsel *evsel = evlist__find_tracepoint_by_name(evlist, assocs[i].name);
tools/perf/util/evlist.c
2627
struct evsel *counter;
tools/perf/util/evlist.c
263
if (evsel == NULL)
tools/perf/util/evlist.c
2651
struct evsel *counter;
tools/perf/util/evlist.c
267
if (evsel->handler != NULL)
tools/perf/util/evlist.c
2670
struct evsel *pos;
tools/perf/util/evlist.c
2679
struct evsel *evsel;
tools/perf/util/evlist.c
2681
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
2682
if (evsel__is_bpf_output(evsel))
tools/perf/util/evlist.c
269
evsel->handler = assocs[i].handler;
tools/perf/util/evlist.c
2691
struct evsel *evsel;
tools/perf/util/evlist.c
2693
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
2694
if (evsel__is_dummy_event(evsel))
tools/perf/util/evlist.c
2696
if (!evsel->core.attr.exclude_kernel)
tools/perf/util/evlist.c
282
static struct evsel *evlist__dummy_event(struct evlist *evlist)
tools/perf/util/evlist.c
298
struct evsel *evsel = evlist__dummy_event(evlist);
tools/perf/util/evlist.c
300
if (evsel == NULL)
tools/perf/util/evlist.c
303
evlist__add(evlist, evsel);
tools/perf/util/evlist.c
307
struct evsel *evlist__add_aux_dummy(struct evlist *evlist, bool system_wide)
tools/perf/util/evlist.c
309
struct evsel *evsel = evlist__dummy_event(evlist);
tools/perf/util/evlist.c
311
if (!evsel)
tools/perf/util/evlist.c
314
evsel->core.attr.exclude_kernel = 1;
tools/perf/util/evlist.c
315
evsel->core.attr.exclude_guest = 1;
tools/perf/util/evlist.c
316
evsel->core.attr.exclude_hv = 1;
tools/perf/util/evlist.c
317
evsel->core.system_wide = system_wide;
tools/perf/util/evlist.c
318
evsel->no_aux_samples = true;
tools/perf/util/evlist.c
319
evsel->name = strdup("dummy:u");
tools/perf/util/evlist.c
321
evlist__add(evlist, evsel);
tools/perf/util/evlist.c
322
return evsel;
tools/perf/util/evlist.c
326
struct evsel *evlist__add_sched_switch(struct evlist *evlist, bool system_wide)
tools/perf/util/evlist.c
328
struct evsel *evsel = evsel__newtp_idx("sched", "sched_switch", 0,
tools/perf/util/evlist.c
331
if (IS_ERR(evsel))
tools/perf/util/evlist.c
332
return evsel;
tools/perf/util/evlist.c
334
evsel__set_sample_bit(evsel, CPU);
tools/perf/util/evlist.c
335
evsel__set_sample_bit(evsel, TIME);
tools/perf/util/evlist.c
337
evsel->core.system_wide = system_wide;
tools/perf/util/evlist.c
338
evsel->no_aux_samples = true;
tools/perf/util/evlist.c
340
evlist__add(evlist, evsel);
tools/perf/util/evlist.c
341
return evsel;
tools/perf/util/evlist.c
345
struct evsel *evlist__find_tracepoint_by_name(struct evlist *evlist, const char *name)
tools/perf/util/evlist.c
347
struct evsel *evsel;
tools/perf/util/evlist.c
349
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c
350
if ((evsel->core.attr.type == PERF_TYPE_TRACEPOINT) &&
tools/perf/util/evlist.c
351
(strcmp(evsel->name, name) == 0))
tools/perf/util/evlist.c
352
return evsel;
tools/perf/util/evlist.c
361
struct evsel *evsel = evsel__newtp(sys, name);
tools/perf/util/evlist.c
363
if (IS_ERR(evsel))
tools/perf/util/evlist.c
366
evsel->handler = handler;
tools/perf/util/evlist.c
367
evlist__add(evlist, evsel);
tools/perf/util/evlist.c
378
struct evsel *pos;
tools/perf/util/evlist.c
435
.evsel = NULL,
tools/perf/util/evlist.c
453
itr->evsel = evlist__first(evlist);
tools/perf/util/evlist.c
457
itr->cpu_map_idx = perf_cpu_map__idx(itr->evsel->core.cpus, itr->cpu);
tools/perf/util/evlist.c
477
while (evlist_cpu_itr->evsel != evlist__last(evlist_cpu_itr->container)) {
tools/perf/util/evlist.c
478
evlist_cpu_itr->evsel = evsel__next(evlist_cpu_itr->evsel);
tools/perf/util/evlist.c
480
perf_cpu_map__idx(evlist_cpu_itr->evsel->core.cpus,
tools/perf/util/evlist.c
487
evlist_cpu_itr->evsel = evlist__first(evlist_cpu_itr->container);
tools/perf/util/evlist.c
494
perf_cpu_map__idx(evlist_cpu_itr->evsel->core.cpus,
tools/perf/util/evlist.c
507
static int evsel__strcmp(struct evsel *pos, char *evsel_name)
tools/perf/util/evlist.c
518
struct evsel *pos;
tools/perf/util/evlist.c
532
struct evsel *pos, *member;
tools/perf/util/evlist.c
539
pos = evlist_cpu_itr.evsel;
tools/perf/util/evlist.c
596
struct evsel *pos, *member;
tools/perf/util/evlist.c
600
pos = evlist_cpu_itr.evsel;
tools/perf/util/evlist.c
690
struct evsel *evlist__id2evsel(struct evlist *evlist, u64 id)
tools/perf/util/evlist.c
699
return container_of(sid->evsel, struct evsel, core);
tools/perf/util/evlist.c
707
struct evsel *evlist__id2evsel_strict(struct evlist *evlist, u64 id)
tools/perf/util/evlist.c
716
return container_of(sid->evsel, struct evsel, core);
tools/perf/util/evlist.c
741
struct evsel *evlist__event2evsel(struct evlist *evlist, union perf_event *event)
tools/perf/util/evlist.c
743
struct evsel *first = evlist__first(evlist);
tools/perf/util/evlist.c
768
return container_of(sid->evsel, struct evsel, core);
tools/perf/util/evlist.c
865
struct evsel *evsel = container_of(_evsel, struct evsel, core);
tools/perf/util/evlist.c
867
auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, evsel, idx);
tools/perf/util/evlist.h
114
void evlist__add(struct evlist *evlist, struct evsel *entry);
tools/perf/util/evlist.h
115
void evlist__remove(struct evlist *evlist, struct evsel *evsel);
tools/perf/util/evlist.h
117
int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs);
tools/perf/util/evlist.h
121
struct evsel *evlist__add_aux_dummy(struct evlist *evlist, bool system_wide);
tools/perf/util/evlist.h
122
static inline struct evsel *evlist__add_dummy_on_all_cpus(struct evlist *evlist)
tools/perf/util/evlist.h
127
struct evsel *evlist__add_sched_switch(struct evlist *evlist, bool system_wide);
tools/perf/util/evlist.h
155
struct evsel *evlist__find_tracepoint_by_name(struct evlist *evlist, const char *name);
tools/perf/util/evlist.h
166
struct evsel *evlist__id2evsel(struct evlist *evlist, u64 id);
tools/perf/util/evlist.h
167
struct evsel *evlist__id2evsel_strict(struct evlist *evlist, u64 id);
tools/perf/util/evlist.h
214
void evlist__set_selected(struct evlist *evlist, struct evsel *evsel);
tools/perf/util/evlist.h
217
int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel,
tools/perf/util/evlist.h
241
static inline struct evsel *evlist__first(struct evlist *evlist)
tools/perf/util/evlist.h
243
struct perf_evsel *evsel = perf_evlist__first(&evlist->core);
tools/perf/util/evlist.h
245
return container_of(evsel, struct evsel, core);
tools/perf/util/evlist.h
248
static inline struct evsel *evlist__last(struct evlist *evlist)
tools/perf/util/evlist.h
250
struct perf_evsel *evsel = perf_evlist__last(&evlist->core);
tools/perf/util/evlist.h
252
return container_of(evsel, struct evsel, core);
tools/perf/util/evlist.h
264
void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel);
tools/perf/util/evlist.h
271
#define __evlist__for_each_entry(list, evsel) \
tools/perf/util/evlist.h
272
list_for_each_entry(evsel, list, core.node)
tools/perf/util/evlist.h
279
#define evlist__for_each_entry(evlist, evsel) \
tools/perf/util/evlist.h
280
__evlist__for_each_entry(&(evlist)->core.entries, evsel)
tools/perf/util/evlist.h
287
#define __evlist__for_each_entry_continue(list, evsel) \
tools/perf/util/evlist.h
288
list_for_each_entry_continue(evsel, list, core.node)
tools/perf/util/evlist.h
295
#define evlist__for_each_entry_continue(evlist, evsel) \
tools/perf/util/evlist.h
296
__evlist__for_each_entry_continue(&(evlist)->core.entries, evsel)
tools/perf/util/evlist.h
303
#define __evlist__for_each_entry_from(list, evsel) \
tools/perf/util/evlist.h
304
list_for_each_entry_from(evsel, list, core.node)
tools/perf/util/evlist.h
311
#define evlist__for_each_entry_from(evlist, evsel) \
tools/perf/util/evlist.h
312
__evlist__for_each_entry_from(&(evlist)->core.entries, evsel)
tools/perf/util/evlist.h
319
#define __evlist__for_each_entry_reverse(list, evsel) \
tools/perf/util/evlist.h
320
list_for_each_entry_reverse(evsel, list, core.node)
tools/perf/util/evlist.h
327
#define evlist__for_each_entry_reverse(evlist, evsel) \
tools/perf/util/evlist.h
328
__evlist__for_each_entry_reverse(&(evlist)->core.entries, evsel)
tools/perf/util/evlist.h
336
#define __evlist__for_each_entry_safe(list, tmp, evsel) \
tools/perf/util/evlist.h
337
list_for_each_entry_safe(evsel, tmp, list, core.node)
tools/perf/util/evlist.h
345
#define evlist__for_each_entry_safe(evlist, tmp, evsel) \
tools/perf/util/evlist.h
346
__evlist__for_each_entry_safe(&(evlist)->core.entries, tmp, evsel)
tools/perf/util/evlist.h
353
struct evsel *evsel;
tools/perf/util/evlist.h
403
struct evsel *evlist__get_tracking_event(struct evlist *evlist);
tools/perf/util/evlist.h
404
void evlist__set_tracking_event(struct evlist *evlist, struct evsel *tracking_evsel);
tools/perf/util/evlist.h
405
struct evsel *evlist__findnew_tracking_event(struct evlist *evlist, bool system_wide);
tools/perf/util/evlist.h
407
struct evsel *evlist__find_evsel_by_str(struct evlist *evlist, const char *str);
tools/perf/util/evlist.h
409
struct evsel *evlist__event2evsel(struct evlist *evlist, union perf_event *event);
tools/perf/util/evlist.h
415
struct evsel *evlist__reset_weak_group(struct evlist *evlist, struct evsel *evsel, bool close);
tools/perf/util/evlist.h
455
struct evsel *evlist__find_evsel(struct evlist *evlist, int idx);
tools/perf/util/evlist.h
74
struct evsel *selected;
tools/perf/util/evsel.c
1003
evsel->name = strdup(bf);
tools/perf/util/evsel.c
1005
if (evsel->name)
tools/perf/util/evsel.c
1006
return evsel->name;
tools/perf/util/evsel.c
1011
bool evsel__name_is(struct evsel *evsel, const char *name)
tools/perf/util/evsel.c
1013
return !strcmp(evsel__name(evsel), name);
tools/perf/util/evsel.c
1016
const char *evsel__metric_id(const struct evsel *evsel)
tools/perf/util/evsel.c
1018
if (evsel->metric_id)
tools/perf/util/evsel.c
1019
return evsel->metric_id;
tools/perf/util/evsel.c
1021
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
1022
return evsel__tool_pmu_event_name(evsel);
tools/perf/util/evsel.c
1027
const char *evsel__group_name(struct evsel *evsel)
tools/perf/util/evsel.c
1029
return evsel->group_name ?: "anon group";
tools/perf/util/evsel.c
1042
int evsel__group_desc(struct evsel *evsel, char *buf, size_t size)
tools/perf/util/evsel.c
1046
struct evsel *pos;
tools/perf/util/evsel.c
1047
const char *group_name = evsel__group_name(evsel);
tools/perf/util/evsel.c
1049
if (!evsel->forced_leader)
tools/perf/util/evsel.c
1052
for_each_group_evsel(pos, evsel) {
tools/perf/util/evsel.c
1062
if (!evsel->forced_leader)
tools/perf/util/evsel.c
1068
uint16_t evsel__e_machine(struct evsel *evsel, uint32_t *e_flags)
tools/perf/util/evsel.c
1070
struct perf_session *session = evsel__session(evsel);
tools/perf/util/evsel.c
1075
static void __evsel__config_callchain(struct evsel *evsel, const struct record_opts *opts,
tools/perf/util/evsel.c
1078
bool function = evsel__is_function_event(evsel);
tools/perf/util/evsel.c
1079
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/evsel.c
1086
evsel__set_sample_bit(evsel, CALLCHAIN);
tools/perf/util/evsel.c
1101
evsel__set_sample_bit(evsel, BRANCH_STACK);
tools/perf/util/evsel.c
1115
uint16_t e_machine = evsel__e_machine(evsel, /*e_flags=*/NULL);
tools/perf/util/evsel.c
1117
evsel__set_sample_bit(evsel, REGS_USER);
tools/perf/util/evsel.c
1118
evsel__set_sample_bit(evsel, STACK_USER);
tools/perf/util/evsel.c
1145
void evsel__config_callchain(struct evsel *evsel, const struct record_opts *opts,
tools/perf/util/evsel.c
1149
return __evsel__config_callchain(evsel, opts, param);
tools/perf/util/evsel.c
1152
static void evsel__reset_callgraph(struct evsel *evsel, const struct callchain_param *param)
tools/perf/util/evsel.c
1154
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/evsel.c
1156
evsel__reset_sample_bit(evsel, CALLCHAIN);
tools/perf/util/evsel.c
1158
evsel__reset_sample_bit(evsel, BRANCH_STACK);
tools/perf/util/evsel.c
1164
evsel__reset_sample_bit(evsel, REGS_USER);
tools/perf/util/evsel.c
1165
evsel__reset_sample_bit(evsel, STACK_USER);
tools/perf/util/evsel.c
1169
static void evsel__apply_ratio_to_prev(struct evsel *evsel,
tools/perf/util/evsel.c
1175
struct evsel *evsel_prev = NULL;
tools/perf/util/evsel.c
1176
u64 type = evsel->core.attr.sample_type;
tools/perf/util/evsel.c
1185
if (evsel == evsel__leader(evsel)) {
tools/perf/util/evsel.c
1189
if (!evsel->pmu->is_core) {
tools/perf/util/evsel.c
1194
evsel_prev = evsel__prev(evsel);
tools/perf/util/evsel.c
1200
if (evsel_prev->pmu->type != evsel->pmu->type) {
tools/perf/util/evsel.c
1202
evsel->name, evsel_prev->name);
tools/perf/util/evsel.c
1212
evsel__reset_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1224
evsel__reset_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1231
arch_evsel__apply_ratio_to_prev(evsel, attr);
tools/perf/util/evsel.c
1234
static void evsel__apply_config_terms(struct evsel *evsel,
tools/perf/util/evsel.c
1238
struct list_head *config_terms = &evsel->config_terms;
tools/perf/util/evsel.c
1239
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/evsel.c
1255
evsel__reset_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1262
evsel__set_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1267
evsel__set_sample_bit(evsel, TIME);
tools/perf/util/evsel.c
1269
evsel__reset_sample_bit(evsel, TIME);
tools/perf/util/evsel.c
1276
evsel__set_sample_bit(evsel, BRANCH_STACK);
tools/perf/util/evsel.c
1280
evsel__reset_sample_bit(evsel, BRANCH_STACK);
tools/perf/util/evsel.c
1289
evsel->max_events = term->val.max_events;
tools/perf/util/evsel.c
1350
evsel->name);
tools/perf/util/evsel.c
1364
evsel__reset_callgraph(evsel, &callchain_param);
tools/perf/util/evsel.c
1369
evsel__set_sample_bit(evsel, ADDR);
tools/perf/util/evsel.c
1370
evsel__set_sample_bit(evsel, DATA_SRC);
tools/perf/util/evsel.c
1371
evsel->core.attr.mmap_data = track;
tools/perf/util/evsel.c
1373
evsel__config_callchain(evsel, opts, &param);
tools/perf/util/evsel.c
1377
evsel__apply_ratio_to_prev(evsel, attr, opts, rtp_buf);
tools/perf/util/evsel.c
1380
struct evsel_config_term *__evsel__get_config_term(struct evsel *evsel, enum evsel_term_type type)
tools/perf/util/evsel.c
1384
list_for_each_entry(term, &evsel->config_terms, list) {
tools/perf/util/evsel.c
1400
void evsel__set_config_if_unset(struct evsel *evsel, const char *config_name,
tools/perf/util/evsel.c
1404
struct evsel_config_term *term = evsel__get_config_term(evsel,
tools/perf/util/evsel.c
1406
struct perf_pmu_format *format = pmu_find_format(&evsel->pmu->format,
tools/perf/util/evsel.c
1416
term = evsel__get_config_term(evsel, USR_CHG_CONFIG);
tools/perf/util/evsel.c
1417
vp = &evsel->core.attr.config;
tools/perf/util/evsel.c
1420
term = evsel__get_config_term(evsel, USR_CHG_CONFIG1);
tools/perf/util/evsel.c
1421
vp = &evsel->core.attr.config1;
tools/perf/util/evsel.c
1424
term = evsel__get_config_term(evsel, USR_CHG_CONFIG2);
tools/perf/util/evsel.c
1425
vp = &evsel->core.attr.config2;
tools/perf/util/evsel.c
1428
term = evsel__get_config_term(evsel, USR_CHG_CONFIG3);
tools/perf/util/evsel.c
1429
vp = &evsel->core.attr.config3;
tools/perf/util/evsel.c
1432
term = evsel__get_config_term(evsel, USR_CHG_CONFIG4);
tools/perf/util/evsel.c
1433
vp = &evsel->core.attr.config4;
tools/perf/util/evsel.c
1455
bool evsel__config_exists(const struct evsel *evsel, const char *config_name)
tools/perf/util/evsel.c
1457
struct perf_pmu_format *format = pmu_find_format(&evsel->pmu->format, config_name);
tools/perf/util/evsel.c
1462
int evsel__get_config_val(const struct evsel *evsel, const char *config_name,
tools/perf/util/evsel.c
1465
struct perf_pmu_format *format = pmu_find_format(&evsel->pmu->format, config_name);
tools/perf/util/evsel.c
1476
evsel->core.attr.config);
tools/perf/util/evsel.c
1480
evsel->core.attr.config1);
tools/perf/util/evsel.c
1484
evsel->core.attr.config2);
tools/perf/util/evsel.c
1488
evsel->core.attr.config3);
tools/perf/util/evsel.c
1492
evsel->core.attr.config4);
tools/perf/util/evsel.c
1501
void __weak arch_evsel__set_sample_weight(struct evsel *evsel)
tools/perf/util/evsel.c
1503
evsel__set_sample_bit(evsel, WEIGHT);
tools/perf/util/evsel.c
1506
void __weak arch__post_evsel_config(struct evsel *evsel __maybe_unused,
tools/perf/util/evsel.c
1511
void __weak arch_evsel__apply_ratio_to_prev(struct evsel *evsel __maybe_unused,
tools/perf/util/evsel.c
1527
bool evsel__is_offcpu_event(struct evsel *evsel)
tools/perf/util/evsel.c
1529
return evsel__is_bpf_output(evsel) && evsel__name_is(evsel, OFFCPU_EVENT) &&
tools/perf/util/evsel.c
1530
evsel->core.attr.sample_type & PERF_SAMPLE_RAW;
tools/perf/util/evsel.c
1561
void evsel__config(struct evsel *evsel, const struct record_opts *opts,
tools/perf/util/evsel.c
1564
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/evsel.c
1565
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/evsel.c
1566
int track = evsel->tracking;
tools/perf/util/evsel.c
1574
evsel__set_sample_bit(evsel, IP);
tools/perf/util/evsel.c
1575
evsel__set_sample_bit(evsel, TID);
tools/perf/util/evsel.c
1577
if (evsel->sample_read) {
tools/perf/util/evsel.c
1578
evsel__set_sample_bit(evsel, READ);
tools/perf/util/evsel.c
1584
evsel__set_sample_id(evsel, false);
tools/perf/util/evsel.c
1598
evsel__set_sample_bit(evsel, TID);
tools/perf/util/evsel.c
1599
evsel->core.attr.read_format |=
tools/perf/util/evsel.c
1608
if ((evsel->is_libpfm_event && !attr->sample_period) ||
tools/perf/util/evsel.c
1609
(!evsel->is_libpfm_event && (!attr->sample_period ||
tools/perf/util/evsel.c
1619
evsel__set_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1625
evsel->core.attr.read_format |=
tools/perf/util/evsel.c
1633
evsel__set_sample_bit(evsel, ADDR);
tools/perf/util/evsel.c
1643
if (evsel__is_function_event(evsel))
tools/perf/util/evsel.c
1644
evsel->core.attr.exclude_callchain_user = 1;
tools/perf/util/evsel.c
1646
if (callchain && callchain->enabled && !evsel->no_aux_samples)
tools/perf/util/evsel.c
1647
evsel__config_callchain(evsel, opts, callchain);
tools/perf/util/evsel.c
1649
if (opts->sample_intr_regs && !evsel->no_aux_samples &&
tools/perf/util/evsel.c
1650
!evsel__is_dummy_event(evsel)) {
tools/perf/util/evsel.c
1652
evsel__set_sample_bit(evsel, REGS_INTR);
tools/perf/util/evsel.c
1655
if (opts->sample_user_regs && !evsel->no_aux_samples &&
tools/perf/util/evsel.c
1656
!evsel__is_dummy_event(evsel)) {
tools/perf/util/evsel.c
1658
evsel__set_sample_bit(evsel, REGS_USER);
tools/perf/util/evsel.c
1662
evsel__set_sample_bit(evsel, CPU);
tools/perf/util/evsel.c
1671
evsel__set_sample_bit(evsel, TIME);
tools/perf/util/evsel.c
1673
if (opts->raw_samples && !evsel->no_aux_samples) {
tools/perf/util/evsel.c
1674
evsel__set_sample_bit(evsel, TIME);
tools/perf/util/evsel.c
1675
evsel__set_sample_bit(evsel, RAW);
tools/perf/util/evsel.c
1676
evsel__set_sample_bit(evsel, CPU);
tools/perf/util/evsel.c
1680
evsel__set_sample_bit(evsel, DATA_SRC);
tools/perf/util/evsel.c
1683
evsel__set_sample_bit(evsel, PHYS_ADDR);
tools/perf/util/evsel.c
1689
if (opts->branch_stack && !evsel->no_aux_samples) {
tools/perf/util/evsel.c
1690
evsel__set_sample_bit(evsel, BRANCH_STACK);
tools/perf/util/evsel.c
1694
if (opts->sample_weight || evsel->retire_lat) {
tools/perf/util/evsel.c
1695
arch_evsel__set_sample_weight(evsel);
tools/perf/util/evsel.c
1696
evsel->retire_lat = false;
tools/perf/util/evsel.c
1718
evsel__set_sample_bit(evsel, CGROUP);
tools/perf/util/evsel.c
1722
evsel__set_sample_bit(evsel, DATA_PAGE_SIZE);
tools/perf/util/evsel.c
1725
evsel__set_sample_bit(evsel, CODE_PAGE_SIZE);
tools/perf/util/evsel.c
1731
evsel__set_sample_bit(evsel, TRANSACTION);
tools/perf/util/evsel.c
1734
evsel->core.attr.read_format |=
tools/perf/util/evsel.c
1745
if (evsel__is_group_leader(evsel))
tools/perf/util/evsel.c
1752
if (target__none(&opts->target) && evsel__is_group_leader(evsel) &&
tools/perf/util/evsel.c
1756
if (evsel->immediate) {
tools/perf/util/evsel.c
1767
if (evsel->precise_max)
tools/perf/util/evsel.c
1780
if (evsel->core.pmu_cpus || evsel->unit)
tools/perf/util/evsel.c
1781
evsel->core.attr.read_format |= PERF_FORMAT_ID;
tools/perf/util/evsel.c
1787
evsel__apply_config_terms(evsel, opts, track);
tools/perf/util/evsel.c
1789
evsel->ignore_missing_thread = opts->ignore_missing_thread;
tools/perf/util/evsel.c
1794
evsel__set_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1796
evsel__reset_sample_bit(evsel, PERIOD);
tools/perf/util/evsel.c
1807
if (evsel__is_dummy_event(evsel))
tools/perf/util/evsel.c
1808
evsel__reset_sample_bit(evsel, BRANCH_STACK);
tools/perf/util/evsel.c
1810
if (evsel__is_offcpu_event(evsel)) {
tools/perf/util/evsel.c
1811
evsel->core.attr.sample_type &= OFFCPU_SAMPLE_TYPES;
tools/perf/util/evsel.c
1815
arch__post_evsel_config(evsel, attr);
tools/perf/util/evsel.c
1818
int evsel__set_filter(struct evsel *evsel, const char *filter)
tools/perf/util/evsel.c
1823
free(evsel->filter);
tools/perf/util/evsel.c
1824
evsel->filter = new_filter;
tools/perf/util/evsel.c
1831
static int evsel__append_filter(struct evsel *evsel, const char *fmt, const char *filter)
tools/perf/util/evsel.c
1835
if (evsel->filter == NULL)
tools/perf/util/evsel.c
1836
return evsel__set_filter(evsel, filter);
tools/perf/util/evsel.c
1838
if (asprintf(&new_filter, fmt, evsel->filter, filter) > 0) {
tools/perf/util/evsel.c
1839
free(evsel->filter);
tools/perf/util/evsel.c
1840
evsel->filter = new_filter;
tools/perf/util/evsel.c
1847
int evsel__append_tp_filter(struct evsel *evsel, const char *filter)
tools/perf/util/evsel.c
1849
return evsel__append_filter(evsel, "(%s) && (%s)", filter);
tools/perf/util/evsel.c
1852
int evsel__append_addr_filter(struct evsel *evsel, const char *filter)
tools/perf/util/evsel.c
1854
return evsel__append_filter(evsel, "%s,%s", filter);
tools/perf/util/evsel.c
1858
int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx)
tools/perf/util/evsel.c
1862
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
1863
err = evsel__tool_pmu_enable_cpu(evsel, cpu_map_idx);
tools/perf/util/evsel.c
1865
err = perf_evsel__enable_cpu(&evsel->core, cpu_map_idx);
tools/perf/util/evsel.c
1867
if (!err && evsel__is_group_leader(evsel)) {
tools/perf/util/evsel.c
1868
struct evsel *member;
tools/perf/util/evsel.c
1870
for_each_group_member(member, evsel) {
tools/perf/util/evsel.c
1871
if (evsel__is_non_perf_event_open_pmu(evsel) ||
tools/perf/util/evsel.c
1890
int evsel__enable(struct evsel *evsel)
tools/perf/util/evsel.c
1894
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
1895
err = evsel__tool_pmu_enable(evsel);
tools/perf/util/evsel.c
1897
err = perf_evsel__enable(&evsel->core);
tools/perf/util/evsel.c
1900
evsel->disabled = false;
tools/perf/util/evsel.c
1902
if (!err && evsel__is_group_leader(evsel)) {
tools/perf/util/evsel.c
1903
struct evsel *member;
tools/perf/util/evsel.c
1905
for_each_group_member(member, evsel) {
tools/perf/util/evsel.c
1906
if (evsel__is_non_perf_event_open_pmu(evsel) ||
tools/perf/util/evsel.c
1928
int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx)
tools/perf/util/evsel.c
1932
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
1933
err = evsel__tool_pmu_disable_cpu(evsel, cpu_map_idx);
tools/perf/util/evsel.c
1935
err = perf_evsel__disable_cpu(&evsel->core, cpu_map_idx);
tools/perf/util/evsel.c
1937
if (!err && evsel__is_group_leader(evsel)) {
tools/perf/util/evsel.c
1938
struct evsel *member;
tools/perf/util/evsel.c
1940
for_each_group_member(member, evsel) {
tools/perf/util/evsel.c
1941
if (evsel__is_non_perf_event_open_pmu(evsel) ||
tools/perf/util/evsel.c
1959
int evsel__disable(struct evsel *evsel)
tools/perf/util/evsel.c
1963
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
1964
err = evsel__tool_pmu_disable(evsel);
tools/perf/util/evsel.c
1966
err = perf_evsel__disable(&evsel->core);
tools/perf/util/evsel.c
1975
evsel->disabled = true;
tools/perf/util/evsel.c
1977
if (!err && evsel__is_group_leader(evsel)) {
tools/perf/util/evsel.c
1978
struct evsel *member;
tools/perf/util/evsel.c
1980
for_each_group_member(member, evsel) {
tools/perf/util/evsel.c
1981
if (evsel__is_non_perf_event_open_pmu(evsel) ||
tools/perf/util/evsel.c
2013
static void evsel__free_config_terms(struct evsel *evsel)
tools/perf/util/evsel.c
2015
free_config_terms(&evsel->config_terms);
tools/perf/util/evsel.c
2027
void evsel__exit(struct evsel *evsel)
tools/perf/util/evsel.c
2029
assert(list_empty(&evsel->core.node));
tools/perf/util/evsel.c
2030
assert(evsel->evlist == NULL);
tools/perf/util/evsel.c
2031
if (evsel__is_retire_lat(evsel))
tools/perf/util/evsel.c
2032
evsel__tpebs_close(evsel);
tools/perf/util/evsel.c
2033
bpf_counter__destroy(evsel);
tools/perf/util/evsel.c
2034
perf_bpf_filter__destroy(evsel);
tools/perf/util/evsel.c
2035
evsel__free_counts(evsel);
tools/perf/util/evsel.c
2036
perf_evsel__free_fd(&evsel->core);
tools/perf/util/evsel.c
2037
perf_evsel__free_id(&evsel->core);
tools/perf/util/evsel.c
2038
evsel__free_config_terms(evsel);
tools/perf/util/evsel.c
2039
cgroup__put(evsel->cgrp);
tools/perf/util/evsel.c
2040
perf_evsel__exit(&evsel->core);
tools/perf/util/evsel.c
2041
zfree(&evsel->group_name);
tools/perf/util/evsel.c
2042
zfree(&evsel->name);
tools/perf/util/evsel.c
2044
zfree(&evsel->tp_sys);
tools/perf/util/evsel.c
2045
zfree(&evsel->tp_name);
tools/perf/util/evsel.c
2047
zfree(&evsel->filter);
tools/perf/util/evsel.c
2048
zfree(&evsel->group_pmu_name);
tools/perf/util/evsel.c
2049
zfree(&evsel->unit);
tools/perf/util/evsel.c
2050
zfree(&evsel->metric_id);
tools/perf/util/evsel.c
2051
evsel__zero_per_pkg(evsel);
tools/perf/util/evsel.c
2052
hashmap__free(evsel->per_pkg_mask);
tools/perf/util/evsel.c
2053
evsel->per_pkg_mask = NULL;
tools/perf/util/evsel.c
2055
evsel__priv_destructor(evsel->priv);
tools/perf/util/evsel.c
2056
perf_evsel__object.fini(evsel);
tools/perf/util/evsel.c
2057
if (evsel__tool_event(evsel) == TOOL_PMU__EVENT_SYSTEM_TIME ||
tools/perf/util/evsel.c
2058
evsel__tool_event(evsel) == TOOL_PMU__EVENT_USER_TIME) {
tools/perf/util/evsel.c
2059
xyarray__delete(evsel->process_time.start_times);
tools/perf/util/evsel.c
2060
xyarray__delete(evsel->process_time.accumulated_times);
tools/perf/util/evsel.c
2064
void evsel__delete(struct evsel *evsel)
tools/perf/util/evsel.c
2066
if (!evsel)
tools/perf/util/evsel.c
2069
evsel__exit(evsel);
tools/perf/util/evsel.c
2070
free(evsel);
tools/perf/util/evsel.c
2073
void evsel__compute_deltas(struct evsel *evsel, int cpu_map_idx, int thread,
tools/perf/util/evsel.c
2078
if (!evsel->prev_raw_counts)
tools/perf/util/evsel.c
2081
tmp = *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread);
tools/perf/util/evsel.c
2082
*perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread) = *count;
tools/perf/util/evsel.c
2089
static int evsel__read_one(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/evsel.c
2091
struct perf_counts_values *count = perf_counts(evsel->counts, cpu_map_idx, thread);
tools/perf/util/evsel.c
2093
return perf_evsel__read(&evsel->core, cpu_map_idx, thread, count);
tools/perf/util/evsel.c
2096
static void evsel__set_count(struct evsel *counter, int cpu_map_idx, int thread,
tools/perf/util/evsel.c
211
static void evsel__no_extra_fini(struct evsel *evsel __maybe_unused)
tools/perf/util/evsel.c
2117
static bool evsel__group_has_tpebs(struct evsel *leader)
tools/perf/util/evsel.c
2119
struct evsel *evsel;
tools/perf/util/evsel.c
2121
for_each_group_evsel(evsel, leader) {
tools/perf/util/evsel.c
2122
if (evsel__is_retire_lat(evsel))
tools/perf/util/evsel.c
2128
static u64 evsel__group_read_nr_members(struct evsel *leader)
tools/perf/util/evsel.c
2131
struct evsel *evsel;
tools/perf/util/evsel.c
2133
for_each_group_evsel(evsel, leader) {
tools/perf/util/evsel.c
2134
if (evsel__is_retire_lat(evsel))
tools/perf/util/evsel.c
2140
static u64 evsel__group_read_size(struct evsel *leader)
tools/perf/util/evsel.c
217
int (*init)(struct evsel *evsel);
tools/perf/util/evsel.c
2171
static int evsel__process_group_data(struct evsel *leader, int cpu_map_idx, int thread, u64 *data)
tools/perf/util/evsel.c
218
void (*fini)(struct evsel *evsel);
tools/perf/util/evsel.c
2190
struct evsel *counter;
tools/perf/util/evsel.c
220
.size = sizeof(struct evsel),
tools/perf/util/evsel.c
2205
static int evsel__read_group(struct evsel *leader, int cpu_map_idx, int thread)
tools/perf/util/evsel.c
2235
bool __evsel__match(const struct evsel *evsel, u32 type, u64 config)
tools/perf/util/evsel.c
2238
u32 e_type = evsel->core.attr.type;
tools/perf/util/evsel.c
2239
u64 e_config = evsel->core.attr.config;
tools/perf/util/evsel.c
225
int evsel__object_config(size_t object_size, int (*init)(struct evsel *evsel),
tools/perf/util/evsel.c
2250
if (type == PERF_TYPE_HARDWARE && evsel->pmu && evsel->pmu->is_core &&
tools/perf/util/evsel.c
2251
evsel->alternate_hw_config == config)
tools/perf/util/evsel.c
2256
int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/evsel.c
2258
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
2259
return evsel__tool_pmu_read(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
226
void (*fini)(struct evsel *evsel))
tools/perf/util/evsel.c
2261
if (evsel__is_hwmon(evsel))
tools/perf/util/evsel.c
2262
return evsel__hwmon_pmu_read(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
2264
if (evsel__is_drm(evsel))
tools/perf/util/evsel.c
2265
return evsel__drm_pmu_read(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
2267
if (evsel__is_retire_lat(evsel))
tools/perf/util/evsel.c
2268
return evsel__tpebs_read(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
2270
if (evsel->core.attr.read_format & PERF_FORMAT_GROUP)
tools/perf/util/evsel.c
2271
return evsel__read_group(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
2273
return evsel__read_one(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
2276
int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale)
tools/perf/util/evsel.c
2281
if (FD(evsel, cpu_map_idx, thread) < 0)
tools/perf/util/evsel.c
2284
if (evsel->counts == NULL && evsel__alloc_counts(evsel) < 0)
tools/perf/util/evsel.c
2287
if (readn(FD(evsel, cpu_map_idx, thread), &count, nv * sizeof(u64)) <= 0)
tools/perf/util/evsel.c
2290
evsel__compute_deltas(evsel, cpu_map_idx, thread, &count);
tools/perf/util/evsel.c
2292
*perf_counts(evsel->counts, cpu_map_idx, thread) = count;
tools/perf/util/evsel.c
2296
static int evsel__match_other_cpu(struct evsel *evsel, struct evsel *other,
tools/perf/util/evsel.c
2301
cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx);
tools/perf/util/evsel.c
2305
static int evsel__hybrid_group_cpu_map_idx(struct evsel *evsel, int cpu_map_idx)
tools/perf/util/evsel.c
2307
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/evsel.c
2309
if ((evsel__is_hybrid(evsel) && !evsel__is_hybrid(leader)) ||
tools/perf/util/evsel.c
2310
(!evsel__is_hybrid(evsel) && evsel__is_hybrid(leader))) {
tools/perf/util/evsel.c
2311
return evsel__match_other_cpu(evsel, leader, cpu_map_idx);
tools/perf/util/evsel.c
2317
static int get_group_fd(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/evsel.c
2319
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/evsel.c
2322
if (!evsel->supported || evsel__is_group_leader(evsel))
tools/perf/util/evsel.c
2331
cpu_map_idx = evsel__hybrid_group_cpu_map_idx(evsel, cpu_map_idx);
tools/perf/util/evsel.c
2345
static void evsel__remove_fd(struct evsel *pos, int nr_cpus, int nr_threads, int thread_idx)
tools/perf/util/evsel.c
2352
static int update_fds(struct evsel *evsel,
tools/perf/util/evsel.c
2356
struct evsel *pos;
tools/perf/util/evsel.c
2361
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/util/evsel.c
2362
nr_cpus = pos != evsel ? nr_cpus : cpu_map_idx;
tools/perf/util/evsel.c
2370
if (pos == evsel)
tools/perf/util/evsel.c
2376
static bool evsel__ignore_missing_thread(struct evsel *evsel,
tools/perf/util/evsel.c
2383
if (!evsel->ignore_missing_thread)
tools/perf/util/evsel.c
2387
if (evsel->core.system_wide)
tools/perf/util/evsel.c
2402
if (update_fds(evsel, nr_cpus, cpu_map_idx, threads->nr, thread))
tools/perf/util/evsel.c
2429
bool evsel__precise_ip_fallback(struct evsel *evsel)
tools/perf/util/evsel.c
2432
if (!evsel->precise_max)
tools/perf/util/evsel.c
2439
if (!evsel->core.attr.precise_ip) {
tools/perf/util/evsel.c
2440
evsel->core.attr.precise_ip = evsel->precise_ip_original;
tools/perf/util/evsel.c
2444
if (!evsel->precise_ip_original)
tools/perf/util/evsel.c
2445
evsel->precise_ip_original = evsel->core.attr.precise_ip;
tools/perf/util/evsel.c
2447
evsel->core.attr.precise_ip--;
tools/perf/util/evsel.c
2448
pr_debug2_peo("decreasing precise_ip by one (%d)\n", evsel->core.attr.precise_ip);
tools/perf/util/evsel.c
2449
display_attr(&evsel->core.attr);
tools/perf/util/evsel.c
2456
static int __evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
tools/perf/util/evsel.c
2462
if ((perf_missing_features.write_backward && evsel->core.attr.write_backward) ||
tools/perf/util/evsel.c
2463
(perf_missing_features.aux_output && evsel->core.attr.aux_output))
tools/perf/util/evsel.c
247
const char *evsel__pmu_name(const struct evsel *evsel)
tools/perf/util/evsel.c
2486
if (evsel->core.fd == NULL &&
tools/perf/util/evsel.c
2487
perf_evsel__alloc_fd(&evsel->core, perf_cpu_map__nr(cpus), nthreads) < 0)
tools/perf/util/evsel.c
249
struct perf_pmu *pmu = evsel__find_pmu(evsel);
tools/perf/util/evsel.c
2490
if (evsel__is_tool(evsel))
tools/perf/util/evsel.c
2491
ret = evsel__tool_pmu_prepare_open(evsel, cpus, nthreads);
tools/perf/util/evsel.c
2493
evsel->open_flags = PERF_FLAG_FD_CLOEXEC;
tools/perf/util/evsel.c
2494
if (evsel->cgrp)
tools/perf/util/evsel.c
2495
evsel->open_flags |= PERF_FLAG_PID_CGROUP;
tools/perf/util/evsel.c
2500
static void evsel__disable_missing_features(struct evsel *evsel)
tools/perf/util/evsel.c
2502
if (perf_missing_features.defer_callchain && evsel->core.attr.defer_callchain)
tools/perf/util/evsel.c
2503
evsel->core.attr.defer_callchain = 0;
tools/perf/util/evsel.c
2504
if (perf_missing_features.defer_callchain && evsel->core.attr.defer_output)
tools/perf/util/evsel.c
2505
evsel->core.attr.defer_output = 0;
tools/perf/util/evsel.c
2506
if (perf_missing_features.inherit_sample_read && evsel->core.attr.inherit &&
tools/perf/util/evsel.c
2507
(evsel->core.attr.sample_type & PERF_SAMPLE_READ))
tools/perf/util/evsel.c
2508
evsel->core.attr.inherit = 0;
tools/perf/util/evsel.c
2510
evsel->core.attr.branch_sample_type &= ~PERF_SAMPLE_BRANCH_COUNTERS;
tools/perf/util/evsel.c
2512
evsel->core.attr.read_format &= ~PERF_FORMAT_LOST;
tools/perf/util/evsel.c
2514
evsel__set_sample_bit(evsel, WEIGHT);
tools/perf/util/evsel.c
2515
evsel__reset_sample_bit(evsel, WEIGHT_STRUCT);
tools/perf/util/evsel.c
2518
evsel->core.attr.clockid = CLOCK_MONOTONIC; /* should always work */
tools/perf/util/evsel.c
2520
evsel->core.attr.use_clockid = 0;
tools/perf/util/evsel.c
2521
evsel->core.attr.clockid = 0;
tools/perf/util/evsel.c
2524
evsel->open_flags &= ~(unsigned long)PERF_FLAG_FD_CLOEXEC;
tools/perf/util/evsel.c
2526
evsel->core.attr.mmap2 = 0;
tools/perf/util/evsel.c
2527
if (evsel->pmu && evsel->pmu->missing_features.exclude_guest)
tools/perf/util/evsel.c
2528
evsel->core.attr.exclude_guest = evsel->core.attr.exclude_host = 0;
tools/perf/util/evsel.c
2530
evsel->core.attr.branch_sample_type &= ~(PERF_SAMPLE_BRANCH_NO_FLAGS |
tools/perf/util/evsel.c
2532
if (perf_missing_features.group_read && evsel->core.attr.inherit)
tools/perf/util/evsel.c
2533
evsel->core.attr.read_format &= ~(PERF_FORMAT_GROUP|PERF_FORMAT_ID);
tools/perf/util/evsel.c
2535
evsel->core.attr.ksymbol = 0;
tools/perf/util/evsel.c
2537
evsel->core.attr.bpf_event = 0;
tools/perf/util/evsel.c
2539
evsel->core.attr.branch_sample_type &= ~PERF_SAMPLE_BRANCH_HW_INDEX;
tools/perf/util/evsel.c
254
return event_type(evsel->core.attr.type);
tools/perf/util/evsel.c
2541
evsel->core.attr.sample_id_all = 0;
tools/perf/util/evsel.c
2544
int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
tools/perf/util/evsel.c
2549
err = __evsel__prepare_open(evsel, cpus, threads);
tools/perf/util/evsel.c
2553
evsel__disable_missing_features(evsel);
tools/perf/util/evsel.c
2603
static void evsel__detect_missing_pmu_features(struct evsel *evsel)
tools/perf/util/evsel.c
2606
.type = evsel->core.attr.type,
tools/perf/util/evsel.c
2607
.config = evsel->core.attr.config,
tools/perf/util/evsel.c
2610
struct perf_pmu *pmu = evsel->pmu;
tools/perf/util/evsel.c
2616
pmu = evsel->pmu = evsel__find_pmu(evsel);
tools/perf/util/evsel.c
2642
static void evsel__detect_missing_brstack_features(struct evsel *evsel)
tools/perf/util/evsel.c
2646
.type = evsel->core.attr.type,
tools/perf/util/evsel.c
2647
.config = evsel->core.attr.config,
tools/perf/util/evsel.c
2691
static bool evsel__probe_aux_action(struct evsel *evsel, struct perf_cpu cpu)
tools/perf/util/evsel.c
2693
struct perf_event_attr attr = evsel->core.attr;
tools/perf/util/evsel.c
271
static void evsel__resolve_probe_type(struct evsel *evsel)
tools/perf/util/evsel.c
2714
static void evsel__detect_missing_aux_action_feature(struct evsel *evsel, struct perf_cpu cpu)
tools/perf/util/evsel.c
2717
struct evsel *leader;
tools/perf/util/evsel.c
2723
if (!evsel->core.attr.aux_action || detection_done)
tools/perf/util/evsel.c
273
const char *name = evsel__pmu_name(evsel);
tools/perf/util/evsel.c
2732
leader = evsel__leader(evsel);
tools/perf/util/evsel.c
2733
if (evsel == leader) {
tools/perf/util/evsel.c
2749
static bool evsel__detect_missing_features(struct evsel *evsel, struct perf_cpu cpu)
tools/perf/util/evsel.c
2759
evsel__detect_missing_aux_action_feature(evsel, cpu);
tools/perf/util/evsel.c
276
evsel->probe_type = PROBE__KPROBE;
tools/perf/util/evsel.c
2761
evsel__detect_missing_pmu_features(evsel);
tools/perf/util/evsel.c
2763
if (evsel__has_br_stack(evsel))
tools/perf/util/evsel.c
2764
evsel__detect_missing_brstack_features(evsel);
tools/perf/util/evsel.c
278
evsel->probe_type = PROBE__UPROBE;
tools/perf/util/evsel.c
279
else if (!strcmp(name, "tracepoint") && evsel__field(evsel, "__probe_ip"))
tools/perf/util/evsel.c
280
evsel->probe_type = PROBE__FTRACE;
tools/perf/util/evsel.c
282
evsel->probe_type = PROBE__NOPE;
tools/perf/util/evsel.c
285
bool evsel__is_probe(struct evsel *evsel)
tools/perf/util/evsel.c
287
if (evsel->probe_type == PROBE__UNKNOWN)
tools/perf/util/evsel.c
288
evsel__resolve_probe_type(evsel);
tools/perf/util/evsel.c
2898
if ((evsel->core.attr.defer_callchain || evsel->core.attr.defer_output) &&
tools/perf/util/evsel.c
290
return evsel->probe_type > PROBE__NOPE;
tools/perf/util/evsel.c
2902
if (evsel->core.attr.inherit &&
tools/perf/util/evsel.c
2903
(evsel->core.attr.sample_type & PERF_SAMPLE_READ) &&
tools/perf/util/evsel.c
2907
if ((evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_COUNTERS) &&
tools/perf/util/evsel.c
2911
if ((evsel->core.attr.read_format & PERF_FORMAT_LOST) &&
tools/perf/util/evsel.c
2915
if ((evsel->core.attr.sample_type & PERF_SAMPLE_WEIGHT_STRUCT) &&
tools/perf/util/evsel.c
2919
if (evsel->core.attr.use_clockid && evsel->core.attr.clockid != CLOCK_MONOTONIC &&
tools/perf/util/evsel.c
2925
if (evsel->core.attr.use_clockid && perf_missing_features.clockid)
tools/perf/util/evsel.c
2928
if ((evsel->open_flags & PERF_FLAG_FD_CLOEXEC) &&
tools/perf/util/evsel.c
293
bool evsel__is_kprobe(struct evsel *evsel)
tools/perf/util/evsel.c
2932
if (evsel->core.attr.mmap2 && perf_missing_features.mmap2)
tools/perf/util/evsel.c
2935
if ((evsel->core.attr.branch_sample_type & (PERF_SAMPLE_BRANCH_NO_FLAGS |
tools/perf/util/evsel.c
2940
if (evsel->core.attr.inherit && (evsel->core.attr.read_format & PERF_FORMAT_GROUP) &&
tools/perf/util/evsel.c
2944
if (evsel->core.attr.ksymbol && perf_missing_features.ksymbol)
tools/perf/util/evsel.c
2947
if (evsel->core.attr.bpf_event && perf_missing_features.bpf)
tools/perf/util/evsel.c
295
if (evsel->probe_type == PROBE__UNKNOWN)
tools/perf/util/evsel.c
2950
if ((evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX) &&
tools/perf/util/evsel.c
2954
if (evsel->core.attr.sample_id_all && perf_missing_features.sample_id_all)
tools/perf/util/evsel.c
296
evsel__resolve_probe_type(evsel);
tools/perf/util/evsel.c
2960
static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus,
tools/perf/util/evsel.c
2969
if (evsel__is_retire_lat(evsel)) {
tools/perf/util/evsel.c
2970
err = evsel__tpebs_open(evsel);
tools/perf/util/evsel.c
2974
err = __evsel__prepare_open(evsel, cpus, threads);
tools/perf/util/evsel.c
298
return evsel->probe_type == PROBE__KPROBE;
tools/perf/util/evsel.c
2986
if (evsel->cgrp)
tools/perf/util/evsel.c
2987
pid = evsel->cgrp->fd;
tools/perf/util/evsel.c
2990
evsel__disable_missing_features(evsel);
tools/perf/util/evsel.c
2992
pr_debug3("Opening: %s\n", evsel__name(evsel));
tools/perf/util/evsel.c
2993
display_attr(&evsel->core.attr);
tools/perf/util/evsel.c
2995
if (evsel__is_tool(evsel)) {
tools/perf/util/evsel.c
2996
err = evsel__tool_pmu_open(evsel, threads,
tools/perf/util/evsel.c
3001
if (evsel__is_hwmon(evsel)) {
tools/perf/util/evsel.c
3002
err = evsel__hwmon_pmu_open(evsel, threads,
tools/perf/util/evsel.c
3007
if (evsel__is_drm(evsel)) {
tools/perf/util/evsel.c
3008
err = evsel__drm_pmu_open(evsel, threads,
tools/perf/util/evsel.c
301
bool evsel__is_uprobe(struct evsel *evsel)
tools/perf/util/evsel.c
3023
if (!evsel->cgrp && !evsel->core.system_wide)
tools/perf/util/evsel.c
3026
group_fd = get_group_fd(evsel, idx, thread);
tools/perf/util/evsel.c
3029
pr_debug("broken group leader for %s\n", evsel->name);
tools/perf/util/evsel.c
303
if (evsel->probe_type == PROBE__UNKNOWN)
tools/perf/util/evsel.c
3036
pid, cpu.cpu, group_fd, evsel->open_flags);
tools/perf/util/evsel.c
3038
fd = sys_perf_event_open(&evsel->core.attr, pid, cpu.cpu,
tools/perf/util/evsel.c
3039
group_fd, evsel->open_flags);
tools/perf/util/evsel.c
304
evsel__resolve_probe_type(evsel);
tools/perf/util/evsel.c
3041
FD(evsel, idx, thread) = fd;
tools/perf/util/evsel.c
3051
bpf_counter__install_pe(evsel, idx, fd);
tools/perf/util/evsel.c
3054
test_attr__open(&evsel->core.attr, pid, cpu,
tools/perf/util/evsel.c
3055
fd, group_fd, evsel->open_flags);
tools/perf/util/evsel.c
306
return evsel->probe_type == PROBE__UPROBE;
tools/perf/util/evsel.c
3061
if (evsel->bpf_fd >= 0) {
tools/perf/util/evsel.c
3063
int bpf_fd = evsel->bpf_fd;
tools/perf/util/evsel.c
3094
if (evsel__ignore_missing_thread(evsel, perf_cpu_map__nr(cpus),
tools/perf/util/evsel.c
3110
if (err == -EINVAL && evsel__detect_missing_features(evsel, cpu))
tools/perf/util/evsel.c
3113
if (evsel__precise_ip_fallback(evsel))
tools/perf/util/evsel.c
3123
if (FD(evsel, idx, thread) >= 0)
tools/perf/util/evsel.c
3124
close(FD(evsel, idx, thread));
tools/perf/util/evsel.c
3125
FD(evsel, idx, thread) = -1;
tools/perf/util/evsel.c
3132
evsel->supported = false;
tools/perf/util/evsel.c
3136
int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
tools/perf/util/evsel.c
3139
return evsel__open_cpu(evsel, cpus, threads, 0, perf_cpu_map__nr(cpus));
tools/perf/util/evsel.c
3142
void evsel__close(struct evsel *evsel)
tools/perf/util/evsel.c
3144
if (evsel__is_retire_lat(evsel))
tools/perf/util/evsel.c
3145
evsel__tpebs_close(evsel);
tools/perf/util/evsel.c
3146
perf_evsel__close(&evsel->core);
tools/perf/util/evsel.c
3147
perf_evsel__free_id(&evsel->core);
tools/perf/util/evsel.c
3150
int evsel__open_per_cpu_and_thread(struct evsel *evsel,
tools/perf/util/evsel.c
3155
return evsel__open_cpu(evsel, cpus, threads, 0, perf_cpu_map__nr(cpus));
tools/perf/util/evsel.c
3157
return evsel__open_cpu(evsel, cpus, threads, cpu_map_idx, cpu_map_idx + 1);
tools/perf/util/evsel.c
3160
int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx)
tools/perf/util/evsel.c
3163
int ret = evsel__open_per_cpu_and_thread(evsel, cpus, cpu_map_idx, threads);
tools/perf/util/evsel.c
3169
int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads)
tools/perf/util/evsel.c
3172
int ret = evsel__open_per_cpu_and_thread(evsel, cpus, -1, threads);
tools/perf/util/evsel.c
3181
const struct evsel *evsel = sample->evsel;
tools/perf/util/evsel.c
3182
u64 type = evsel->core.attr.sample_type;
tools/perf/util/evsel.c
3184
bool swapped = evsel->needs_swap;
tools/perf/util/evsel.c
3345
static inline bool evsel__has_branch_counters(const struct evsel *evsel)
tools/perf/util/evsel.c
3347
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/evsel.c
3350
if (!leader || !evsel->evlist)
tools/perf/util/evsel.c
3353
if (evsel->evlist->nr_br_cntr < 0)
tools/perf/util/evsel.c
3354
evlist__update_br_cntr(evsel->evlist);
tools/perf/util/evsel.c
3393
int __evsel__parse_sample(struct evsel *evsel, union perf_event *event,
tools/perf/util/evsel.c
3396
u64 type = evsel->core.attr.sample_type;
tools/perf/util/evsel.c
3410
data->evsel = evsel;
tools/perf/util/evsel.c
3413
data->period = evsel->core.attr.sample_period;
tools/perf/util/evsel.c
3428
if (evsel->core.attr.sample_id_all) {
tools/perf/util/evsel.c
3436
if (evsel->core.attr.sample_id_all) {
tools/perf/util/evsel.c
3445
if (perf_event__check_size(event, evsel->sample_size))
tools/perf/util/evsel.c
3511
u64 read_format = evsel->core.attr.read_format;
tools/perf/util/evsel.c
3575
if (evsel->core.attr.defer_callchain && callchain_nr >= 2 &&
tools/perf/util/evsel.c
3628
if (evsel__has_branch_hw_idx(evsel)) {
tools/perf/util/evsel.c
3658
if (evsel__has_branch_counters(evsel)) {
tools/perf/util/evsel.c
3675
u64 mask = evsel->core.attr.sample_regs_user;
tools/perf/util/evsel.c
3732
u64 mask = evsel->core.attr.sample_regs_intr;
tools/perf/util/evsel.c
3779
if (evsel__is_offcpu_event(evsel)) {
tools/perf/util/evsel.c
3790
int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
tools/perf/util/evsel.c
3793
u64 type = evsel->core.attr.sample_type;
tools/perf/util/evsel.c
3801
.evsel = evsel,
tools/perf/util/evsel.c
3805
if (!evsel->core.attr.sample_id_all)
tools/perf/util/evsel.c
3816
if (perf_event__check_size(event, evsel->sample_size))
tools/perf/util/evsel.c
3834
u16 evsel__id_hdr_size(const struct evsel *evsel)
tools/perf/util/evsel.c
3836
u64 sample_type = evsel->core.attr.sample_type;
tools/perf/util/evsel.c
3861
struct tep_format_field *evsel__field(struct evsel *evsel, const char *name)
tools/perf/util/evsel.c
3863
struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/evsel.c
3868
struct tep_format_field *evsel__common_field(struct evsel *evsel, const char *name)
tools/perf/util/evsel.c
387
void evsel__calc_id_pos(struct evsel *evsel)
tools/perf/util/evsel.c
3870
struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/evsel.c
389
evsel->id_pos = __perf_evsel__calc_id_pos(evsel->core.attr.sample_type);
tools/perf/util/evsel.c
3897
struct tep_format_field *field = evsel__field(sample->evsel, name);
tools/perf/util/evsel.c
390
evsel->is_pos = __perf_evsel__calc_is_pos(evsel->core.attr.sample_type);
tools/perf/util/evsel.c
3913
if (sample->evsel->needs_swap)
tools/perf/util/evsel.c
393
void __evsel__set_sample_bit(struct evsel *evsel,
tools/perf/util/evsel.c
396
if (!(evsel->core.attr.sample_type & bit)) {
tools/perf/util/evsel.c
397
evsel->core.attr.sample_type |= bit;
tools/perf/util/evsel.c
398
evsel->sample_size += sizeof(u64);
tools/perf/util/evsel.c
3980
struct tep_format_field *field = evsel__field(sample->evsel, name);
tools/perf/util/evsel.c
3982
return field ? format_field__intval(field, sample, sample->evsel->needs_swap) : 0;
tools/perf/util/evsel.c
3987
struct tep_format_field *field = evsel__common_field(sample->evsel, name);
tools/perf/util/evsel.c
3989
return field ? format_field__intval(field, sample, sample->evsel->needs_swap) : 0;
tools/perf/util/evsel.c
399
evsel__calc_id_pos(evsel);
tools/perf/util/evsel.c
4001
field = evsel__field(sample->evsel, name);
tools/perf/util/evsel.c
4027
bool evsel__fallback(struct evsel *evsel, struct target *target, int err,
tools/perf/util/evsel.c
403
void __evsel__reset_sample_bit(struct evsel *evsel,
tools/perf/util/evsel.c
4033
evsel__match(evsel, HARDWARE, HW_CPU_CYCLES)) {
tools/perf/util/evsel.c
4040
evsel->pmu = perf_pmus__find_by_type(PERF_TYPE_SOFTWARE);
tools/perf/util/evsel.c
4041
assert(evsel->pmu); /* software is a "well-known" and can't fail PMU type. */
tools/perf/util/evsel.c
4044
evsel->core.attr.type = PERF_TYPE_SOFTWARE;
tools/perf/util/evsel.c
4045
evsel->core.attr.config = target__has_cpu(target)
tools/perf/util/evsel.c
4048
evsel->core.is_pmu_core = false;
tools/perf/util/evsel.c
4051
if (evsel->fallenback_eacces) {
tools/perf/util/evsel.c
4052
evsel->core.attr.exclude_kernel = 0;
tools/perf/util/evsel.c
4053
evsel->core.attr.exclude_hv = 0;
tools/perf/util/evsel.c
4054
evsel->fallenback_eacces = false;
tools/perf/util/evsel.c
4056
if (evsel->fallenback_eopnotsupp) {
tools/perf/util/evsel.c
4057
evsel->core.attr.exclude_guest = 0;
tools/perf/util/evsel.c
4058
evsel->fallenback_eopnotsupp = false;
tools/perf/util/evsel.c
406
if (evsel->core.attr.sample_type & bit) {
tools/perf/util/evsel.c
4062
zfree(&evsel->name);
tools/perf/util/evsel.c
4067
evsel__name(evsel));
tools/perf/util/evsel.c
4069
} else if (err == EACCES && !evsel->core.attr.exclude_kernel &&
tools/perf/util/evsel.c
407
evsel->core.attr.sample_type &= ~bit;
tools/perf/util/evsel.c
4071
const char *name = evsel__name(evsel);
tools/perf/util/evsel.c
4076
if (evsel->core.attr.exclude_user)
tools/perf/util/evsel.c
408
evsel->sample_size -= sizeof(u64);
tools/perf/util/evsel.c
4081
(strchr(name, ':') && !evsel->is_libpfm_event))
tools/perf/util/evsel.c
4087
free(evsel->name);
tools/perf/util/evsel.c
4088
evsel->name = new_name;
tools/perf/util/evsel.c
409
evsel__calc_id_pos(evsel);
tools/perf/util/evsel.c
4092
evsel->core.attr.exclude_kernel = 1;
tools/perf/util/evsel.c
4093
evsel->core.attr.exclude_hv = 1;
tools/perf/util/evsel.c
4094
evsel->fallenback_eacces = true;
tools/perf/util/evsel.c
4096
} else if (err == EOPNOTSUPP && !evsel->core.attr.exclude_guest &&
tools/perf/util/evsel.c
4097
!evsel->exclude_GH) {
tools/perf/util/evsel.c
4098
const char *name = evsel__name(evsel);
tools/perf/util/evsel.c
4104
(strchr(name, ':') && !evsel->is_libpfm_event))
tools/perf/util/evsel.c
4110
free(evsel->name);
tools/perf/util/evsel.c
4111
evsel->name = new_name;
tools/perf/util/evsel.c
4114
evsel->core.attr.exclude_guest = 1;
tools/perf/util/evsel.c
4115
evsel->fallenback_eopnotsupp = true;
tools/perf/util/evsel.c
4120
evsel__name(evsel), err);
tools/perf/util/evsel.c
413
void evsel__set_sample_id(struct evsel *evsel,
tools/perf/util/evsel.c
417
evsel__reset_sample_bit(evsel, ID);
tools/perf/util/evsel.c
418
evsel__set_sample_bit(evsel, IDENTIFIER);
tools/perf/util/evsel.c
420
evsel__set_sample_bit(evsel, ID);
tools/perf/util/evsel.c
422
evsel->core.attr.read_format |= PERF_FORMAT_ID;
tools/perf/util/evsel.c
4232
int __weak arch_evsel__open_strerror(struct evsel *evsel __maybe_unused,
tools/perf/util/evsel.c
4240
int evsel__open_strerror(struct evsel *evsel, struct target *target,
tools/perf/util/evsel.c
4264
"No permission to enable %s event.\n\n", evsel__name(evsel));
tools/perf/util/evsel.c
4282
return scnprintf(msg, size, "The %s event is not supported.", evsel__name(evsel));
tools/perf/util/evsel.c
4290
if (evsel__has_callchain(evsel) &&
tools/perf/util/evsel.c
4303
if (evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK)
tools/perf/util/evsel.c
4306
evsel__name(evsel));
tools/perf/util/evsel.c
4307
if (evsel->core.attr.aux_output)
tools/perf/util/evsel.c
4310
evsel__name(evsel));
tools/perf/util/evsel.c
4311
if (evsel->core.attr.aux_action)
tools/perf/util/evsel.c
4314
evsel__name(evsel));
tools/perf/util/evsel.c
4315
if (evsel->core.attr.sample_period != 0)
tools/perf/util/evsel.c
4318
evsel__name(evsel));
tools/perf/util/evsel.c
4319
if (evsel->core.attr.precise_ip)
tools/perf/util/evsel.c
4323
if (evsel->core.attr.type == PERF_TYPE_HARDWARE)
tools/perf/util/evsel.c
433
bool evsel__is_function_event(struct evsel *evsel)
tools/perf/util/evsel.c
4330
evsel__name(evsel));
tools/perf/util/evsel.c
4340
evsel->pmu ? evsel->pmu->name : "");
tools/perf/util/evsel.c
4344
if (evsel->core.attr.sample_type & PERF_SAMPLE_CODE_PAGE_SIZE && perf_missing_features.code_page_size)
tools/perf/util/evsel.c
4346
if (evsel->core.attr.sample_type & PERF_SAMPLE_DATA_PAGE_SIZE && perf_missing_features.data_page_size)
tools/perf/util/evsel.c
4348
if (evsel->core.attr.write_backward && perf_missing_features.write_backward)
tools/perf/util/evsel.c
4358
pmu = evsel__find_pmu(evsel);
tools/perf/util/evsel.c
4362
evsel__name(evsel));
tools/perf/util/evsel.c
437
return evsel->name &&
tools/perf/util/evsel.c
4372
ret = arch_evsel__open_strerror(evsel, err, msg, size);
tools/perf/util/evsel.c
438
!strncmp(FUNCTION_EVENT, evsel->name, sizeof(FUNCTION_EVENT));
tools/perf/util/evsel.c
4380
evsel__name(evsel));
tools/perf/util/evsel.c
4383
struct perf_session *evsel__session(struct evsel *evsel)
tools/perf/util/evsel.c
4385
return evsel && evsel->evlist ? evsel->evlist->session : NULL;
tools/perf/util/evsel.c
4388
struct perf_env *evsel__env(struct evsel *evsel)
tools/perf/util/evsel.c
4390
struct perf_session *session = evsel__session(evsel);
tools/perf/util/evsel.c
4395
static int store_evsel_ids(struct evsel *evsel, struct evlist *evlist)
tools/perf/util/evsel.c
4399
if (evsel__is_retire_lat(evsel))
tools/perf/util/evsel.c
4402
if (perf_pmu__kind(evsel->pmu) != PERF_PMU_KIND_PE)
tools/perf/util/evsel.c
4405
for (cpu_map_idx = 0; cpu_map_idx < xyarray__max_x(evsel->core.fd); cpu_map_idx++) {
tools/perf/util/evsel.c
4406
for (thread = 0; thread < xyarray__max_y(evsel->core.fd);
tools/perf/util/evsel.c
4408
int fd = FD(evsel, cpu_map_idx, thread);
tools/perf/util/evsel.c
4410
if (perf_evlist__id_add_fd(&evlist->core, &evsel->core,
tools/perf/util/evsel.c
4419
int evsel__store_ids(struct evsel *evsel, struct evlist *evlist)
tools/perf/util/evsel.c
4421
struct perf_cpu_map *cpus = evsel->core.cpus;
tools/perf/util/evsel.c
4422
struct perf_thread_map *threads = evsel->core.threads;
tools/perf/util/evsel.c
4424
if (perf_evsel__alloc_id(&evsel->core, perf_cpu_map__nr(cpus), threads->nr))
tools/perf/util/evsel.c
4427
return store_evsel_ids(evsel, evlist);
tools/perf/util/evsel.c
443
void evsel__init(struct evsel *evsel,
tools/perf/util/evsel.c
4430
void evsel__zero_per_pkg(struct evsel *evsel)
tools/perf/util/evsel.c
4435
if (evsel->per_pkg_mask) {
tools/perf/util/evsel.c
4436
hashmap__for_each_entry(evsel->per_pkg_mask, cur, bkt)
tools/perf/util/evsel.c
4439
hashmap__clear(evsel->per_pkg_mask);
tools/perf/util/evsel.c
4448
bool evsel__is_hybrid(const struct evsel *evsel)
tools/perf/util/evsel.c
4450
if (!evsel->core.is_pmu_core)
tools/perf/util/evsel.c
4456
struct evsel *evsel__leader(const struct evsel *evsel)
tools/perf/util/evsel.c
4458
if (evsel->core.leader == NULL)
tools/perf/util/evsel.c
446
perf_evsel__init(&evsel->core, attr, idx);
tools/perf/util/evsel.c
4460
return container_of(evsel->core.leader, struct evsel, core);
tools/perf/util/evsel.c
4463
bool evsel__has_leader(struct evsel *evsel, struct evsel *leader)
tools/perf/util/evsel.c
4465
return evsel->core.leader == &leader->core;
tools/perf/util/evsel.c
4468
bool evsel__is_leader(struct evsel *evsel)
tools/perf/util/evsel.c
447
evsel->tracking = !idx;
tools/perf/util/evsel.c
4470
return evsel__has_leader(evsel, evsel);
tools/perf/util/evsel.c
4473
void evsel__set_leader(struct evsel *evsel, struct evsel *leader)
tools/perf/util/evsel.c
4475
evsel->core.leader = &leader->core;
tools/perf/util/evsel.c
4478
bool evsel__is_aux_event(const struct evsel *evsel)
tools/perf/util/evsel.c
448
evsel->unit = strdup("");
tools/perf/util/evsel.c
4482
if (evsel->needs_auxtrace_mmap)
tools/perf/util/evsel.c
4485
pmu = evsel__find_pmu(evsel);
tools/perf/util/evsel.c
4489
int evsel__source_count(const struct evsel *evsel)
tools/perf/util/evsel.c
449
evsel->scale = 1.0;
tools/perf/util/evsel.c
4491
struct evsel *pos;
tools/perf/util/evsel.c
4494
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/util/evsel.c
4495
if (pos->metric_leader == evsel)
tools/perf/util/evsel.c
450
evsel->max_events = ULONG_MAX;
tools/perf/util/evsel.c
4501
bool __weak arch_evsel__must_be_in_group(const struct evsel *evsel __maybe_unused)
tools/perf/util/evsel.c
451
evsel->evlist = NULL;
tools/perf/util/evsel.c
4511
void evsel__remove_from_group(struct evsel *evsel, struct evsel *leader)
tools/perf/util/evsel.c
4513
if (!arch_evsel__must_be_in_group(evsel) && evsel != leader) {
tools/perf/util/evsel.c
4514
evsel__set_leader(evsel, evsel);
tools/perf/util/evsel.c
4515
evsel->core.nr_members = 0;
tools/perf/util/evsel.c
452
evsel->bpf_obj = NULL;
tools/perf/util/evsel.c
4520
bool evsel__set_needs_uniquify(struct evsel *counter, const struct perf_stat_config *config)
tools/perf/util/evsel.c
4522
struct evsel *evsel;
tools/perf/util/evsel.c
453
evsel->bpf_fd = -1;
tools/perf/util/evsel.c
454
INIT_LIST_HEAD(&evsel->config_terms);
tools/perf/util/evsel.c
455
INIT_LIST_HEAD(&evsel->bpf_counter_list);
tools/perf/util/evsel.c
456
INIT_LIST_HEAD(&evsel->bpf_filters);
tools/perf/util/evsel.c
457
perf_evsel__object.init(evsel);
tools/perf/util/evsel.c
4570
evlist__for_each_entry(counter->evlist, evsel) {
tools/perf/util/evsel.c
4571
if (evsel == counter || evsel->first_wildcard_match || evsel->pmu == counter->pmu)
tools/perf/util/evsel.c
4574
if (evsel__name_is(counter, evsel__name(evsel))) {
tools/perf/util/evsel.c
458
evsel->sample_size = __evsel__sample_size(attr->sample_type);
tools/perf/util/evsel.c
4582
void evsel__uniquify_counter(struct evsel *counter)
tools/perf/util/evsel.c
459
evsel__calc_id_pos(evsel);
tools/perf/util/evsel.c
460
evsel->cmdline_group_boundary = false;
tools/perf/util/evsel.c
461
evsel->per_pkg_mask = NULL;
tools/perf/util/evsel.c
462
evsel->collect_stat = false;
tools/perf/util/evsel.c
463
evsel->group_pmu_name = NULL;
tools/perf/util/evsel.c
464
evsel->skippable = false;
tools/perf/util/evsel.c
4645
void evsel__warn_user_requested_cpus(struct evsel *evsel, struct perf_cpu_map *user_requested_cpus)
tools/perf/util/evsel.c
4648
const struct perf_pmu *pmu = evsel__find_pmu(evsel);
tools/perf/util/evsel.c
465
evsel->supported = true;
tools/perf/util/evsel.c
466
evsel->alternate_hw_config = PERF_COUNT_HW_MAX;
tools/perf/util/evsel.c
4663
buf1, pmu ? pmu->name : "cpu", buf2, evsel__name(evsel));
tools/perf/util/evsel.c
467
evsel->script_output_type = -1; // FIXME: OUTPUT_TYPE_UNSET, see builtin-script.c
tools/perf/util/evsel.c
468
evsel->probe_type = PROBE__UNKNOWN;
tools/perf/util/evsel.c
471
struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx)
tools/perf/util/evsel.c
473
struct evsel *evsel = zalloc(perf_evsel__object.size);
tools/perf/util/evsel.c
475
if (!evsel)
tools/perf/util/evsel.c
477
evsel__init(evsel, attr, idx);
tools/perf/util/evsel.c
479
if (evsel__is_bpf_output(evsel) && !attr->sample_type) {
tools/perf/util/evsel.c
480
evsel->core.attr.sample_type = (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME |
tools/perf/util/evsel.c
482
evsel->core.attr.sample_period = 1;
tools/perf/util/evsel.c
485
if (evsel__is_clock(evsel)) {
tools/perf/util/evsel.c
486
free((char *)evsel->unit);
tools/perf/util/evsel.c
487
evsel->unit = strdup("msec");
tools/perf/util/evsel.c
488
evsel->scale = 1e-6;
tools/perf/util/evsel.c
491
return evsel;
tools/perf/util/evsel.c
516
static int evsel__copy_config_terms(struct evsel *dst, struct evsel *src)
tools/perf/util/evsel.c
528
struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig)
tools/perf/util/evsel.c
530
struct evsel *evsel;
tools/perf/util/evsel.c
542
evsel = dest;
tools/perf/util/evsel.c
544
evsel = evsel__new(&orig->core.attr);
tools/perf/util/evsel.c
546
if (evsel == NULL)
tools/perf/util/evsel.c
549
evsel->core.cpus = perf_cpu_map__get(orig->core.cpus);
tools/perf/util/evsel.c
550
evsel->core.pmu_cpus = perf_cpu_map__get(orig->core.pmu_cpus);
tools/perf/util/evsel.c
551
evsel->core.threads = perf_thread_map__get(orig->core.threads);
tools/perf/util/evsel.c
552
evsel->core.nr_members = orig->core.nr_members;
tools/perf/util/evsel.c
553
evsel->core.system_wide = orig->core.system_wide;
tools/perf/util/evsel.c
554
evsel->core.requires_cpu = orig->core.requires_cpu;
tools/perf/util/evsel.c
555
evsel->core.is_pmu_core = orig->core.is_pmu_core;
tools/perf/util/evsel.c
558
evsel->name = strdup(orig->name);
tools/perf/util/evsel.c
559
if (evsel->name == NULL)
tools/perf/util/evsel.c
563
evsel->group_name = strdup(orig->group_name);
tools/perf/util/evsel.c
564
if (evsel->group_name == NULL)
tools/perf/util/evsel.c
568
evsel->group_pmu_name = strdup(orig->group_pmu_name);
tools/perf/util/evsel.c
569
if (evsel->group_pmu_name == NULL)
tools/perf/util/evsel.c
573
evsel->filter = strdup(orig->filter);
tools/perf/util/evsel.c
574
if (evsel->filter == NULL)
tools/perf/util/evsel.c
578
evsel->metric_id = strdup(orig->metric_id);
tools/perf/util/evsel.c
579
if (evsel->metric_id == NULL)
tools/perf/util/evsel.c
582
evsel->cgrp = cgroup__get(orig->cgrp);
tools/perf/util/evsel.c
585
evsel->tp_sys = strdup(orig->tp_sys);
tools/perf/util/evsel.c
586
if (evsel->tp_sys == NULL)
tools/perf/util/evsel.c
590
evsel->tp_name = strdup(orig->tp_name);
tools/perf/util/evsel.c
591
if (evsel->tp_name == NULL)
tools/perf/util/evsel.c
594
evsel->tp_format = orig->tp_format;
tools/perf/util/evsel.c
596
evsel->handler = orig->handler;
tools/perf/util/evsel.c
597
evsel->core.leader = orig->core.leader;
tools/perf/util/evsel.c
598
evsel->metric_leader = orig->metric_leader;
tools/perf/util/evsel.c
600
evsel->max_events = orig->max_events;
tools/perf/util/evsel.c
601
zfree(&evsel->unit);
tools/perf/util/evsel.c
603
evsel->unit = strdup(orig->unit);
tools/perf/util/evsel.c
604
if (evsel->unit == NULL)
tools/perf/util/evsel.c
607
evsel->scale = orig->scale;
tools/perf/util/evsel.c
608
evsel->snapshot = orig->snapshot;
tools/perf/util/evsel.c
609
evsel->per_pkg = orig->per_pkg;
tools/perf/util/evsel.c
610
evsel->percore = orig->percore;
tools/perf/util/evsel.c
611
evsel->precise_max = orig->precise_max;
tools/perf/util/evsel.c
612
evsel->is_libpfm_event = orig->is_libpfm_event;
tools/perf/util/evsel.c
614
evsel->exclude_GH = orig->exclude_GH;
tools/perf/util/evsel.c
615
evsel->sample_read = orig->sample_read;
tools/perf/util/evsel.c
616
evsel->collect_stat = orig->collect_stat;
tools/perf/util/evsel.c
617
evsel->weak_group = orig->weak_group;
tools/perf/util/evsel.c
618
evsel->use_config_name = orig->use_config_name;
tools/perf/util/evsel.c
619
evsel->pmu = orig->pmu;
tools/perf/util/evsel.c
620
evsel->first_wildcard_match = orig->first_wildcard_match;
tools/perf/util/evsel.c
622
if (evsel__copy_config_terms(evsel, orig) < 0)
tools/perf/util/evsel.c
625
evsel->alternate_hw_config = orig->alternate_hw_config;
tools/perf/util/evsel.c
627
return evsel;
tools/perf/util/evsel.c
630
evsel__delete(evsel);
tools/perf/util/evsel.c
637
struct evsel *evsel__newtp_idx(const char *sys, const char *name, int idx, bool format)
tools/perf/util/evsel.c
644
struct evsel *evsel = zalloc(perf_evsel__object.size);
tools/perf/util/evsel.c
647
if (evsel == NULL)
tools/perf/util/evsel.c
651
if (asprintf(&evsel->name, "%s:%s", sys, name) < 0)
tools/perf/util/evsel.c
655
evsel->tp_sys = strdup(sys);
tools/perf/util/evsel.c
656
if (!evsel->tp_sys)
tools/perf/util/evsel.c
659
evsel->tp_name = strdup(name);
tools/perf/util/evsel.c
660
if (!evsel->tp_name)
tools/perf/util/evsel.c
675
evsel__init(evsel, &attr, idx);
tools/perf/util/evsel.c
676
return evsel;
tools/perf/util/evsel.c
679
zfree(&evsel->name);
tools/perf/util/evsel.c
681
zfree(&evsel->tp_sys);
tools/perf/util/evsel.c
682
zfree(&evsel->tp_name);
tools/perf/util/evsel.c
684
free(evsel);
tools/perf/util/evsel.c
690
struct tep_event *evsel__tp_format(struct evsel *evsel)
tools/perf/util/evsel.c
692
struct tep_event *tp_format = evsel->tp_format;
tools/perf/util/evsel.c
697
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/evsel.c
700
if (!evsel->tp_sys)
tools/perf/util/evsel.c
701
tp_format = trace_event__tp_format_id(evsel->core.attr.config);
tools/perf/util/evsel.c
703
tp_format = trace_event__tp_format(evsel->tp_sys, evsel->tp_name);
tools/perf/util/evsel.c
706
int err = -PTR_ERR(evsel->tp_format);
tools/perf/util/evsel.c
710
evsel__name(evsel));
tools/perf/util/evsel.c
713
evsel->tp_format = tp_format;
tools/perf/util/evsel.c
714
return evsel->tp_format;
tools/perf/util/evsel.c
761
static int evsel__add_modifiers(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
764
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/evsel.c
794
int __weak arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
796
return scnprintf(bf, size, "%s", __evsel__hw_name(evsel->core.attr.config));
tools/perf/util/evsel.c
799
static int evsel__hw_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
801
int r = arch_evsel__hw_name(evsel, bf, size);
tools/perf/util/evsel.c
802
return r + evsel__add_modifiers(evsel, bf + r, size - r);
tools/perf/util/evsel.c
825
static int evsel__sw_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
827
int r = scnprintf(bf, size, "%s", __evsel__sw_name(evsel->core.attr.config));
tools/perf/util/evsel.c
828
return r + evsel__add_modifiers(evsel, bf + r, size - r);
tools/perf/util/evsel.c
849
static int evsel__bp_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
851
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/evsel.c
853
return r + evsel__add_modifiers(evsel, bf + r, size - r);
tools/perf/util/evsel.c
88
static int evsel__no_extra_init(struct evsel *evsel __maybe_unused)
tools/perf/util/evsel.c
945
static int evsel__hw_cache_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
947
int ret = __evsel__hw_cache_name(evsel->core.attr.config, bf, size);
tools/perf/util/evsel.c
948
return ret + evsel__add_modifiers(evsel, bf + ret, size - ret);
tools/perf/util/evsel.c
951
static int evsel__raw_name(struct evsel *evsel, char *bf, size_t size)
tools/perf/util/evsel.c
953
int ret = scnprintf(bf, size, "raw 0x%" PRIx64, evsel->core.attr.config);
tools/perf/util/evsel.c
954
return ret + evsel__add_modifiers(evsel, bf + ret, size - ret);
tools/perf/util/evsel.c
957
const char *evsel__name(struct evsel *evsel)
tools/perf/util/evsel.c
961
if (!evsel)
tools/perf/util/evsel.c
964
if (evsel->name)
tools/perf/util/evsel.c
965
return evsel->name;
tools/perf/util/evsel.c
967
switch (evsel->core.attr.type) {
tools/perf/util/evsel.c
969
evsel__raw_name(evsel, bf, sizeof(bf));
tools/perf/util/evsel.c
973
evsel__hw_name(evsel, bf, sizeof(bf));
tools/perf/util/evsel.c
977
evsel__hw_cache_name(evsel, bf, sizeof(bf));
tools/perf/util/evsel.c
981
evsel__sw_name(evsel, bf, sizeof(bf));
tools/perf/util/evsel.c
986
evsel->core.attr.config);
tools/perf/util/evsel.c
990
evsel__bp_name(evsel, bf, sizeof(bf));
tools/perf/util/evsel.c
994
scnprintf(bf, sizeof(bf), "%s", evsel__tool_pmu_event_name(evsel));
tools/perf/util/evsel.c
999
evsel->core.attr.type, evsel->core.attr.config);
tools/perf/util/evsel.h
103
struct evsel *metric_leader;
tools/perf/util/evsel.h
242
static inline struct perf_cpu_map *evsel__cpus(struct evsel *evsel)
tools/perf/util/evsel.h
244
return perf_evsel__cpus(&evsel->core);
tools/perf/util/evsel.h
247
static inline int evsel__nr_cpus(struct evsel *evsel)
tools/perf/util/evsel.h
249
return perf_cpu_map__nr(evsel__cpus(evsel));
tools/perf/util/evsel.h
252
void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
tools/perf/util/evsel.h
256
int (*init)(struct evsel *evsel),
tools/perf/util/evsel.h
257
void (*fini)(struct evsel *evsel));
tools/perf/util/evsel.h
259
struct perf_pmu *evsel__find_pmu(const struct evsel *evsel);
tools/perf/util/evsel.h
260
const char *evsel__pmu_name(const struct evsel *evsel);
tools/perf/util/evsel.h
261
bool evsel__is_aux_event(const struct evsel *evsel);
tools/perf/util/evsel.h
263
bool evsel__is_probe(struct evsel *evsel);
tools/perf/util/evsel.h
264
bool evsel__is_kprobe(struct evsel *evsel);
tools/perf/util/evsel.h
265
bool evsel__is_uprobe(struct evsel *evsel);
tools/perf/util/evsel.h
267
struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx);
tools/perf/util/evsel.h
269
static inline struct evsel *evsel__new(struct perf_event_attr *attr)
tools/perf/util/evsel.h
274
struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig);
tools/perf/util/evsel.h
283
struct evsel *evsel__newtp_idx(const char *sys, const char *name, int idx, bool format);
tools/perf/util/evsel.h
284
static inline struct evsel *evsel__newtp(const char *sys, const char *name)
tools/perf/util/evsel.h
290
struct tep_event *evsel__tp_format(struct evsel *evsel);
tools/perf/util/evsel.h
293
void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
tools/perf/util/evsel.h
294
void evsel__exit(struct evsel *evsel);
tools/perf/util/evsel.h
295
void evsel__delete(struct evsel *evsel);
tools/perf/util/evsel.h
301
void evsel__config(struct evsel *evsel, const struct record_opts *opts,
tools/perf/util/evsel.h
303
void evsel__config_callchain(struct evsel *evsel, const struct record_opts *opts,
tools/perf/util/evsel.h
307
void evsel__calc_id_pos(struct evsel *evsel);
tools/perf/util/evsel.h
311
static inline bool evsel__is_bpf(struct evsel *evsel)
tools/perf/util/evsel.h
313
return evsel->bpf_counter_ops != NULL;
tools/perf/util/evsel.h
316
static inline bool evsel__is_bperf(struct evsel *evsel)
tools/perf/util/evsel.h
318
return evsel->bpf_counter_ops != NULL && list_empty(&evsel->bpf_counter_list);
tools/perf/util/evsel.h
330
int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size);
tools/perf/util/evsel.h
333
const char *evsel__name(struct evsel *evsel);
tools/perf/util/evsel.h
334
bool evsel__name_is(struct evsel *evsel, const char *name);
tools/perf/util/evsel.h
335
const char *evsel__metric_id(const struct evsel *evsel);
tools/perf/util/evsel.h
337
static inline bool evsel__is_retire_lat(const struct evsel *evsel)
tools/perf/util/evsel.h
339
return evsel->retire_lat;
tools/perf/util/evsel.h
342
const char *evsel__group_name(struct evsel *evsel);
tools/perf/util/evsel.h
343
int evsel__group_desc(struct evsel *evsel, char *buf, size_t size);
tools/perf/util/evsel.h
345
void __evsel__set_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
tools/perf/util/evsel.h
346
void __evsel__reset_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
tools/perf/util/evsel.h
348
#define evsel__set_sample_bit(evsel, bit) \
tools/perf/util/evsel.h
349
__evsel__set_sample_bit(evsel, PERF_SAMPLE_##bit)
tools/perf/util/evsel.h
351
#define evsel__reset_sample_bit(evsel, bit) \
tools/perf/util/evsel.h
352
__evsel__reset_sample_bit(evsel, PERF_SAMPLE_##bit)
tools/perf/util/evsel.h
354
void evsel__set_sample_id(struct evsel *evsel, bool use_sample_identifier);
tools/perf/util/evsel.h
356
void arch_evsel__set_sample_weight(struct evsel *evsel);
tools/perf/util/evsel.h
357
void arch__post_evsel_config(struct evsel *evsel, struct perf_event_attr *attr);
tools/perf/util/evsel.h
358
int arch_evsel__open_strerror(struct evsel *evsel, int err, char *msg, size_t size);
tools/perf/util/evsel.h
359
void arch_evsel__apply_ratio_to_prev(struct evsel *evsel, struct perf_event_attr *attr);
tools/perf/util/evsel.h
361
int evsel__set_filter(struct evsel *evsel, const char *filter);
tools/perf/util/evsel.h
362
int evsel__append_tp_filter(struct evsel *evsel, const char *filter);
tools/perf/util/evsel.h
363
int evsel__append_addr_filter(struct evsel *evsel, const char *filter);
tools/perf/util/evsel.h
364
static inline bool evsel__is_non_perf_event_open_pmu(const struct evsel *evsel)
tools/perf/util/evsel.h
366
return evsel->pmu && evsel->pmu->type > PERF_PMU_TYPE_PE_END;
tools/perf/util/evsel.h
369
int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx);
tools/perf/util/evsel.h
370
int evsel__enable(struct evsel *evsel);
tools/perf/util/evsel.h
371
int evsel__disable(struct evsel *evsel);
tools/perf/util/evsel.h
372
int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx);
tools/perf/util/evsel.h
374
int evsel__open_per_cpu_and_thread(struct evsel *evsel,
tools/perf/util/evsel.h
377
int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx);
tools/perf/util/evsel.h
378
int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads);
tools/perf/util/evsel.h
379
int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
tools/perf/util/evsel.h
381
void evsel__close(struct evsel *evsel);
tools/perf/util/evsel.h
382
int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
tools/perf/util/evsel.h
385
bool evsel__precise_ip_fallback(struct evsel *evsel);
tools/perf/util/evsel.h
406
struct tep_format_field *evsel__field(struct evsel *evsel, const char *name);
tools/perf/util/evsel.h
407
struct tep_format_field *evsel__common_field(struct evsel *evsel, const char *name);
tools/perf/util/evsel.h
410
evsel__field(struct evsel *evsel __maybe_unused, const char *name __maybe_unused)
tools/perf/util/evsel.h
416
evsel__common_field(struct evsel *evsel __maybe_unused, const char *name __maybe_unused)
tools/perf/util/evsel.h
422
bool __evsel__match(const struct evsel *evsel, u32 type, u64 config);
tools/perf/util/evsel.h
424
#define evsel__match(evsel, t, c) __evsel__match(evsel, PERF_TYPE_##t, PERF_COUNT_##c)
tools/perf/util/evsel.h
426
int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread);
tools/perf/util/evsel.h
428
int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale);
tools/perf/util/evsel.h
437
static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/evsel.h
439
return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, false);
tools/perf/util/evsel.h
449
static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/evsel.h
451
return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, true);
tools/perf/util/evsel.h
454
int __evsel__parse_sample(struct evsel *evsel, union perf_event *event,
tools/perf/util/evsel.h
457
static inline int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
tools/perf/util/evsel.h
460
return __evsel__parse_sample(evsel, event, data, evsel->needs_swap);
tools/perf/util/evsel.h
463
int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
tools/perf/util/evsel.h
466
u16 evsel__id_hdr_size(const struct evsel *evsel);
tools/perf/util/evsel.h
468
static inline struct evsel *evsel__next(struct evsel *evsel)
tools/perf/util/evsel.h
470
return list_entry(evsel->core.node.next, struct evsel, core.node);
tools/perf/util/evsel.h
473
static inline struct evsel *evsel__prev(struct evsel *evsel)
tools/perf/util/evsel.h
475
return list_entry(evsel->core.node.prev, struct evsel, core.node);
tools/perf/util/evsel.h
485
static inline bool evsel__is_group_leader(const struct evsel *evsel)
tools/perf/util/evsel.h
487
return evsel->core.leader == &evsel->core;
tools/perf/util/evsel.h
498
static inline bool evsel__is_group_event(struct evsel *evsel)
tools/perf/util/evsel.h
503
return evsel__is_group_leader(evsel) && evsel->core.nr_members > 1;
tools/perf/util/evsel.h
506
bool evsel__is_function_event(struct evsel *evsel);
tools/perf/util/evsel.h
508
static inline bool evsel__is_bpf_output(struct evsel *evsel)
tools/perf/util/evsel.h
510
return evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT);
tools/perf/util/evsel.h
513
static inline bool evsel__is_clock(const struct evsel *evsel)
tools/perf/util/evsel.h
515
return evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK) ||
tools/perf/util/evsel.h
516
evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK);
tools/perf/util/evsel.h
519
bool evsel__fallback(struct evsel *evsel, struct target *target, int err,
tools/perf/util/evsel.h
521
int evsel__open_strerror(struct evsel *evsel, struct target *target,
tools/perf/util/evsel.h
524
static inline int evsel__group_idx(struct evsel *evsel)
tools/perf/util/evsel.h
526
return evsel->core.idx - evsel->core.leader->idx;
tools/perf/util/evsel.h
531
for ((_evsel) = list_entry((_leader)->core.node.next, struct evsel, core.node); \
tools/perf/util/evsel.h
534
(_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
tools/perf/util/evsel.h
544
(_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
tools/perf/util/evsel.h
549
static inline bool evsel__has_branch_callstack(const struct evsel *evsel)
tools/perf/util/evsel.h
551
return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK;
tools/perf/util/evsel.h
554
static inline bool evsel__has_branch_hw_idx(const struct evsel *evsel)
tools/perf/util/evsel.h
556
return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX;
tools/perf/util/evsel.h
559
static inline bool evsel__has_callchain(const struct evsel *evsel)
tools/perf/util/evsel.h
565
return evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN ||
tools/perf/util/evsel.h
566
evsel->synth_sample_type & PERF_SAMPLE_CALLCHAIN;
tools/perf/util/evsel.h
569
static inline bool evsel__has_br_stack(const struct evsel *evsel)
tools/perf/util/evsel.h
575
return evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK ||
tools/perf/util/evsel.h
576
evsel->synth_sample_type & PERF_SAMPLE_BRANCH_STACK;
tools/perf/util/evsel.h
579
static inline bool evsel__is_dummy_event(struct evsel *evsel)
tools/perf/util/evsel.h
581
return (evsel->core.attr.type == PERF_TYPE_SOFTWARE) &&
tools/perf/util/evsel.h
582
(evsel->core.attr.config == PERF_COUNT_SW_DUMMY);
tools/perf/util/evsel.h
585
struct perf_session *evsel__session(struct evsel *evsel);
tools/perf/util/evsel.h
586
struct perf_env *evsel__env(struct evsel *evsel);
tools/perf/util/evsel.h
587
uint16_t evsel__e_machine(struct evsel *evsel, uint32_t *e_flags);
tools/perf/util/evsel.h
589
int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
tools/perf/util/evsel.h
591
void evsel__zero_per_pkg(struct evsel *evsel);
tools/perf/util/evsel.h
592
bool evsel__is_hybrid(const struct evsel *evsel);
tools/perf/util/evsel.h
593
struct evsel *evsel__leader(const struct evsel *evsel);
tools/perf/util/evsel.h
594
bool evsel__has_leader(struct evsel *evsel, struct evsel *leader);
tools/perf/util/evsel.h
595
bool evsel__is_leader(struct evsel *evsel);
tools/perf/util/evsel.h
596
void evsel__set_leader(struct evsel *evsel, struct evsel *leader);
tools/perf/util/evsel.h
597
int evsel__source_count(const struct evsel *evsel);
tools/perf/util/evsel.h
598
void evsel__remove_from_group(struct evsel *evsel, struct evsel *leader);
tools/perf/util/evsel.h
600
bool arch_evsel__must_be_in_group(const struct evsel *evsel);
tools/perf/util/evsel.h
602
bool evsel__set_needs_uniquify(struct evsel *counter, const struct perf_stat_config *config);
tools/perf/util/evsel.h
603
void evsel__uniquify_counter(struct evsel *counter);
tools/perf/util/evsel.h
617
bool evsel__config_exists(const struct evsel *evsel, const char *config_name);
tools/perf/util/evsel.h
618
int evsel__get_config_val(const struct evsel *evsel, const char *config_name,
tools/perf/util/evsel.h
620
void evsel__set_config_if_unset(struct evsel *evsel, const char *config_name,
tools/perf/util/evsel.h
623
bool evsel__is_offcpu_event(struct evsel *evsel);
tools/perf/util/evsel.h
625
void evsel__warn_user_requested_cpus(struct evsel *evsel, struct perf_cpu_map *user_requested_cpus);
tools/perf/util/evsel.h
77
struct evsel *first_wildcard_match;
tools/perf/util/evsel_config.h
62
struct evsel;
tools/perf/util/evsel_config.h
64
struct evsel_config_term *__evsel__get_config_term(struct evsel *evsel, enum evsel_term_type type);
tools/perf/util/evsel_config.h
66
#define evsel__get_config_term(evsel, type) \
tools/perf/util/evsel_config.h
67
__evsel__get_config_term(evsel, EVSEL__CONFIG_TERM_ ## type)
tools/perf/util/evsel_fprintf.c
43
int evsel__fprintf(struct evsel *evsel, struct perf_attr_details *details, FILE *fp)
tools/perf/util/evsel_fprintf.c
49
struct evsel *pos;
tools/perf/util/evsel_fprintf.c
51
if (!evsel__is_group_leader(evsel))
tools/perf/util/evsel_fprintf.c
54
if (evsel->core.nr_members > 1)
tools/perf/util/evsel_fprintf.c
55
printed += fprintf(fp, "%s{", evsel->group_name ?: "");
tools/perf/util/evsel_fprintf.c
57
printed += fprintf(fp, "%s", evsel__name(evsel));
tools/perf/util/evsel_fprintf.c
58
for_each_group_member(pos, evsel)
tools/perf/util/evsel_fprintf.c
61
if (evsel->core.nr_members > 1)
tools/perf/util/evsel_fprintf.c
66
printed += fprintf(fp, "%s", evsel__name(evsel));
tools/perf/util/evsel_fprintf.c
69
printed += perf_event_attr__fprintf(fp, &evsel->core.attr,
tools/perf/util/evsel_fprintf.c
74
if (!evsel->core.attr.freq)
tools/perf/util/evsel_fprintf.c
78
term, (u64)evsel->core.attr.sample_freq);
tools/perf/util/evsel_fprintf.c
86
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) {
tools/perf/util/evsel_fprintf.c
91
tp_format = evsel__tp_format(evsel);
tools/perf/util/evsel_fprintf.h
18
int evsel__fprintf(struct evsel *evsel, struct perf_attr_details *details, FILE *fp);
tools/perf/util/evsel_fprintf.h
8
struct evsel;
tools/perf/util/evswitch.c
11
if (evswitch->on != evsel)
tools/perf/util/evswitch.c
23
if (evswitch->off != evsel)
tools/perf/util/evswitch.c
8
bool evswitch__discard(struct evswitch *evswitch, struct evsel *evsel)
tools/perf/util/evswitch.h
13
struct evsel *on, *off;
tools/perf/util/evswitch.h
21
bool evswitch__discard(struct evswitch *evswitch, struct evsel *evsel);
tools/perf/util/evswitch.h
9
struct evsel;
tools/perf/util/header.c
2148
static void free_event_desc(struct evsel *events)
tools/perf/util/header.c
2150
struct evsel *evsel;
tools/perf/util/header.c
2155
for (evsel = events; evsel->core.attr.size; evsel++) {
tools/perf/util/header.c
2156
zfree(&evsel->name);
tools/perf/util/header.c
2157
zfree(&evsel->core.id);
tools/perf/util/header.c
2197
static struct evsel *read_event_desc(struct feat_fd *ff)
tools/perf/util/header.c
2199
struct evsel *evsel, *events = NULL;
tools/perf/util/header.c
2241
msz = sizeof(evsel->core.attr);
tools/perf/util/header.c
2245
for (i = 0, evsel = events; i < nre; evsel++, i++) {
tools/perf/util/header.c
2249
evsel->core.idx = i;
tools/perf/util/header.c
2287
memcpy(&evsel->core.attr, buf, msz);
tools/perf/util/header.c
2289
if (!perf_attr_check(&evsel->core.attr))
tools/perf/util/header.c
2296
evsel->needs_swap = true;
tools/perf/util/header.c
2298
evsel->name = do_read_string(ff);
tools/perf/util/header.c
2299
if (!evsel->name)
tools/perf/util/header.c
2314
evsel->core.ids = nr;
tools/perf/util/header.c
2315
evsel->core.id = id;
tools/perf/util/header.c
2340
struct evsel *evsel, *events;
tools/perf/util/header.c
2354
for (evsel = events; evsel->core.attr.size; evsel++) {
tools/perf/util/header.c
2355
fprintf(fp, "# event : name = %s, ", evsel->name);
tools/perf/util/header.c
2357
if (evsel->core.ids) {
tools/perf/util/header.c
2359
for (j = 0, id = evsel->core.id; j < evsel->core.ids; j++, id++) {
tools/perf/util/header.c
2367
perf_event_attr__fprintf(fp, &evsel->core.attr, __desc_attr__fprintf, NULL);
tools/perf/util/header.c
2527
struct evsel *evsel;
tools/perf/util/header.c
2532
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/header.c
2533
if (evsel__is_group_leader(evsel) && evsel->core.nr_members > 1) {
tools/perf/util/header.c
2534
fprintf(fp, "# group: %s{%s", evsel->group_name ?: "", evsel__name(evsel));
tools/perf/util/header.c
2536
nr = evsel->core.nr_members - 1;
tools/perf/util/header.c
2538
fprintf(fp, ",%s", evsel__name(evsel));
tools/perf/util/header.c
2952
static struct evsel *evlist__find_by_index(struct evlist *evlist, int idx)
tools/perf/util/header.c
2954
struct evsel *evsel;
tools/perf/util/header.c
2956
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/header.c
2957
if (evsel->core.idx == idx)
tools/perf/util/header.c
2958
return evsel;
tools/perf/util/header.c
2964
static void evlist__set_event_name(struct evlist *evlist, struct evsel *event)
tools/perf/util/header.c
2966
struct evsel *evsel;
tools/perf/util/header.c
2971
evsel = evlist__find_by_index(evlist, event->core.idx);
tools/perf/util/header.c
2972
if (!evsel)
tools/perf/util/header.c
2975
if (evsel->name)
tools/perf/util/header.c
2978
evsel->name = strdup(event->name);
tools/perf/util/header.c
2985
struct evsel *evsel, *events = read_event_desc(ff);
tools/perf/util/header.c
2998
for (evsel = events; evsel->core.attr.size; evsel++)
tools/perf/util/header.c
2999
evlist__set_event_name(session->evlist, evsel);
tools/perf/util/header.c
3323
struct evsel *evsel, *leader = NULL;
tools/perf/util/header.c
3374
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/header.c
3375
if (i < nr_groups && evsel->core.idx == (int) desc[i].leader_idx) {
tools/perf/util/header.c
3376
evsel__set_leader(evsel, evsel);
tools/perf/util/header.c
3379
evsel->group_name = desc[i].name;
tools/perf/util/header.c
3382
evsel->core.nr_members = desc[i].nr_members;
tools/perf/util/header.c
3389
leader = evsel;
tools/perf/util/header.c
3390
nr = evsel->core.nr_members - 1;
tools/perf/util/header.c
3394
evsel__set_leader(evsel, leader);
tools/perf/util/header.c
4492
struct evsel *evsel;
tools/perf/util/header.c
4519
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/header.c
4520
evsel->id_offset = attr_offset;
tools/perf/util/header.c
4523
err = do_write(&ff, evsel->core.id, evsel->core.ids * sizeof(u64));
tools/perf/util/header.c
4529
attr_offset += evsel->core.ids * sizeof(u64);
tools/perf/util/header.c
4532
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/header.c
4533
if (evsel->core.attr.size < sizeof(evsel->core.attr)) {
tools/perf/util/header.c
4539
evsel->core.attr.size = sizeof(evsel->core.attr);
tools/perf/util/header.c
4544
.attr = evsel->core.attr,
tools/perf/util/header.c
4546
.offset = evsel->id_offset,
tools/perf/util/header.c
4547
.size = evsel->core.ids * sizeof(u64),
tools/perf/util/header.c
4615
struct evsel *evsel;
tools/perf/util/header.c
4619
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/header.c
4620
data_offset += evsel->core.ids * sizeof(u64);
tools/perf/util/header.c
5053
static int evsel__prepare_tracepoint_event(struct evsel *evsel, struct tep_handle *pevent)
tools/perf/util/header.c
5059
if (evsel->tp_format)
tools/perf/util/header.c
5067
event = tep_find_event(pevent, evsel->core.attr.config);
tools/perf/util/header.c
5069
pr_debug("cannot find event format for %d\n", (int)evsel->core.attr.config);
tools/perf/util/header.c
5073
if (!evsel->name) {
tools/perf/util/header.c
5075
evsel->name = strdup(bf);
tools/perf/util/header.c
5076
if (evsel->name == NULL)
tools/perf/util/header.c
5080
evsel->tp_format = event;
tools/perf/util/header.c
5086
struct evsel *pos;
tools/perf/util/header.c
5167
struct evsel *evsel;
tools/perf/util/header.c
5219
evsel = evsel__new(&f_attr.attr);
tools/perf/util/header.c
5221
if (evsel == NULL)
tools/perf/util/header.c
5224
evsel->needs_swap = header->needs_swap;
tools/perf/util/header.c
5229
evlist__add(session->evlist, evsel);
tools/perf/util/header.c
5237
if (perf_evsel__alloc_id(&evsel->core, 1, nr_ids))
tools/perf/util/header.c
5246
perf_evlist__id_add(&session->evlist->core, &evsel->core, 0, j, f_id);
tools/perf/util/header.c
5512
struct evsel *evsel;
tools/perf/util/header.c
5580
evsel = evsel__new(&attr);
tools/perf/util/header.c
5581
if (evsel == NULL)
tools/perf/util/header.c
5584
evlist__add(evlist, evsel);
tools/perf/util/header.c
5599
if (perf_evsel__alloc_id(&evsel->core, 1, n_ids))
tools/perf/util/header.c
5610
perf_evlist__id_add(&evlist->core, &evsel->core, 0, i, ids[i]);
tools/perf/util/header.c
5622
struct evsel *evsel;
tools/perf/util/header.c
5710
evsel = evlist__id2evsel(evlist, ev->id);
tools/perf/util/header.c
5711
if (evsel == NULL)
tools/perf/util/header.c
5716
free((char *)evsel->unit);
tools/perf/util/header.c
5717
evsel->unit = strdup(ev->unit);
tools/perf/util/header.c
5720
free(evsel->name);
tools/perf/util/header.c
5721
evsel->name = strdup(ev->name);
tools/perf/util/header.c
5724
evsel->scale = ev->scale.scale;
tools/perf/util/header.c
5729
perf_cpu_map__put(evsel->core.pmu_cpus);
tools/perf/util/header.c
5730
evsel->core.pmu_cpus = map;
tools/perf/util/header.c
604
struct evsel *evsel;
tools/perf/util/header.c
620
sz = (u32)sizeof(evsel->core.attr);
tools/perf/util/header.c
625
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/header.c
626
ret = do_write(ff, &evsel->core.attr, sz);
tools/perf/util/header.c
636
nri = evsel->core.ids;
tools/perf/util/header.c
644
ret = do_write_string(ff, evsel__name(evsel));
tools/perf/util/header.c
650
ret = do_write(ff, evsel->core.id, evsel->core.ids * sizeof(u64));
tools/perf/util/header.c
890
struct evsel *evsel;
tools/perf/util/header.c
897
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/header.c
898
if (evsel__is_group_leader(evsel) && evsel->core.nr_members > 1) {
tools/perf/util/header.c
899
const char *name = evsel->group_name ?: "{anon_group}";
tools/perf/util/header.c
900
u32 leader_idx = evsel->core.idx;
tools/perf/util/header.c
901
u32 nr_members = evsel->core.nr_members;
tools/perf/util/header.h
123
struct evsel *events;
tools/perf/util/hisi-ptt.c
145
struct evsel *evsel)
tools/perf/util/hisi-ptt.c
149
return evsel->core.attr.type == ptt->pmu_type;
tools/perf/util/hist.c
1040
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1041
struct hists *hists = evsel__hists(evsel);
tools/perf/util/hist.c
1081
struct evsel *evsel = iter->sample->evsel;
tools/perf/util/hist.c
1082
struct hists *hists = evsel__hists(evsel);
tools/perf/util/hist.c
1107
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1110
he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL,
tools/perf/util/hist.c
1125
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1132
hists__inc_nr_samples(evsel__hists(evsel), he->filtered);
tools/perf/util/hist.c
1169
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1170
struct hists *hists = evsel__hists(evsel);
tools/perf/util/hist.c
1228
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1232
.hists = evsel__hists(evsel),
tools/perf/util/hist.c
1278
he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL,
tools/perf/util/hist.c
2119
void evsel__output_resort_cb(struct evsel *evsel, struct ui_progress *prog,
tools/perf/util/hist.c
2124
if (evsel && symbol_conf.use_callchain && !symbol_conf.show_ref_callgraph)
tools/perf/util/hist.c
2125
use_callchain = evsel__has_callchain(evsel);
tools/perf/util/hist.c
2131
output_resort(evsel__hists(evsel), prog, use_callchain, cb, cb_arg);
tools/perf/util/hist.c
2134
void evsel__output_resort(struct evsel *evsel, struct ui_progress *prog)
tools/perf/util/hist.c
2136
return evsel__output_resort_cb(evsel, prog, NULL, NULL);
tools/perf/util/hist.c
2853
bi[i].flags.cycles, sample->evsel,
tools/perf/util/hist.c
2871
struct evsel *pos;
tools/perf/util/hist.c
2921
struct evsel *evsel = hists_to_evsel(hists);
tools/perf/util/hist.c
2922
const char *ev_name = evsel__name(evsel);
tools/perf/util/hist.c
2933
if (evsel__is_group_event(evsel)) {
tools/perf/util/hist.c
2934
struct evsel *pos;
tools/perf/util/hist.c
2936
evsel__group_desc(evsel, buf, buflen);
tools/perf/util/hist.c
2939
for_each_group_member(pos, evsel) {
tools/perf/util/hist.c
2957
scnprintf(sample_freq_str, sizeof(sample_freq_str), " %d Hz,", evsel->core.attr.sample_freq);
tools/perf/util/hist.c
2962
nr_samples, unit, evsel->core.nr_members > 1 ? "s" : "",
tools/perf/util/hist.c
3052
static void hists_evsel__exit(struct evsel *evsel)
tools/perf/util/hist.c
3054
struct hists *hists = evsel__hists(evsel);
tools/perf/util/hist.c
3072
static int hists_evsel__init(struct evsel *evsel)
tools/perf/util/hist.c
3074
struct hists *hists = evsel__hists(evsel);
tools/perf/util/hist.c
939
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/util/hist.c
971
struct evsel *evsel = iter->sample->evsel;
tools/perf/util/hist.c
972
struct hists *hists = evsel__hists(evsel);
tools/perf/util/hist.h
384
void evsel__output_resort_cb(struct evsel *evsel, struct ui_progress *prog,
tools/perf/util/hist.h
386
void evsel__output_resort(struct evsel *evsel, struct ui_progress *prog);
tools/perf/util/hist.h
451
struct evsel evsel;
tools/perf/util/hist.h
455
static inline struct evsel *hists_to_evsel(struct hists *hists)
tools/perf/util/hist.h
458
return &hevsel->evsel;
tools/perf/util/hist.h
461
static inline struct hists *evsel__hists(struct evsel *evsel)
tools/perf/util/hist.h
463
struct hists_evsel *hevsel = (struct hists_evsel *)evsel;
tools/perf/util/hist.h
721
struct evsel *evsel,
tools/perf/util/hist.h
724
int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel,
tools/perf/util/hist.h
730
int script_browse(const char *script_opt, struct evsel *evsel);
tools/perf/util/hist.h
734
struct evsel *evsel, enum rstype rstype);
tools/perf/util/hist.h
737
int block_hists_tui_browse(struct block_hist *bh, struct evsel *evsel,
tools/perf/util/hist.h
752
struct evsel *evsel __maybe_unused,
tools/perf/util/hist.h
760
struct evsel *evsel __maybe_unused,
tools/perf/util/hist.h
768
struct evsel *evsel __maybe_unused)
tools/perf/util/hist.h
775
struct evsel *evsel __maybe_unused,
tools/perf/util/hist.h
784
struct evsel *evsel __maybe_unused,
tools/perf/util/hwmon_pmu.c
133
bool evsel__is_hwmon(const struct evsel *evsel)
tools/perf/util/hwmon_pmu.c
135
return perf_pmu__is_hwmon(evsel->pmu);
tools/perf/util/hwmon_pmu.c
762
int evsel__hwmon_pmu_open(struct evsel *evsel,
tools/perf/util/hwmon_pmu.c
766
struct hwmon_pmu *hwm = container_of(evsel->pmu, struct hwmon_pmu, pmu);
tools/perf/util/hwmon_pmu.c
768
.type_and_num = evsel->core.attr.config,
tools/perf/util/hwmon_pmu.c
786
FD(evsel, idx, thread) = fd;
tools/perf/util/hwmon_pmu.c
801
if (FD(evsel, idx, thread) >= 0)
tools/perf/util/hwmon_pmu.c
802
close(FD(evsel, idx, thread));
tools/perf/util/hwmon_pmu.c
803
FD(evsel, idx, thread) = -1;
tools/perf/util/hwmon_pmu.c
811
int evsel__hwmon_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/hwmon_pmu.c
818
if (evsel->prev_raw_counts)
tools/perf/util/hwmon_pmu.c
819
old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread);
tools/perf/util/hwmon_pmu.c
821
count = perf_counts(evsel->counts, cpu_map_idx, thread);
tools/perf/util/hwmon_pmu.c
822
fd = FD(evsel, cpu_map_idx, thread);
tools/perf/util/hwmon_pmu.h
111
bool evsel__is_hwmon(const struct evsel *evsel);
tools/perf/util/hwmon_pmu.h
162
int evsel__hwmon_pmu_open(struct evsel *evsel,
tools/perf/util/hwmon_pmu.h
165
int evsel__hwmon_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
tools/perf/util/intel-bts.c
735
struct evsel *evsel)
tools/perf/util/intel-bts.c
740
return evsel->core.attr.type == bts->pmu_type;
tools/perf/util/intel-bts.c
747
struct evsel *evsel;
tools/perf/util/intel-bts.c
753
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/intel-bts.c
754
if (evsel->core.attr.type == bts->pmu_type && evsel->core.ids) {
tools/perf/util/intel-bts.c
768
attr.sample_type = evsel->core.attr.sample_type & PERF_SAMPLE_MASK;
tools/perf/util/intel-bts.c
773
attr.exclude_user = evsel->core.attr.exclude_user;
tools/perf/util/intel-bts.c
774
attr.exclude_kernel = evsel->core.attr.exclude_kernel;
tools/perf/util/intel-bts.c
775
attr.exclude_hv = evsel->core.attr.exclude_hv;
tools/perf/util/intel-bts.c
776
attr.exclude_host = evsel->core.attr.exclude_host;
tools/perf/util/intel-bts.c
777
attr.exclude_guest = evsel->core.attr.exclude_guest;
tools/perf/util/intel-bts.c
778
attr.sample_id_all = evsel->core.attr.sample_id_all;
tools/perf/util/intel-bts.c
779
attr.read_format = evsel->core.attr.read_format;
tools/perf/util/intel-bts.c
781
id = auxtrace_synth_id_range_start(evsel);
tools/perf/util/intel-pt.c
1039
struct evsel *evsel;
tools/perf/util/intel-pt.c
1041
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1042
if (intel_pt_get_config(pt, &evsel->core.attr, NULL) &&
tools/perf/util/intel-pt.c
1043
!evsel->core.attr.exclude_kernel)
tools/perf/util/intel-pt.c
1051
struct evsel *evsel;
tools/perf/util/intel-pt.c
1057
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1058
if (intel_pt_get_config(pt, &evsel->core.attr, &config) &&
tools/perf/util/intel-pt.c
1067
struct evsel *evsel;
tools/perf/util/intel-pt.c
1070
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1071
if (intel_pt_get_config(pt, &evsel->core.attr, &config) &&
tools/perf/util/intel-pt.c
1081
struct evsel *evsel;
tools/perf/util/intel-pt.c
1084
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1085
if (intel_pt_get_config(pt, &evsel->core.attr, &config) &&
tools/perf/util/intel-pt.c
1094
struct evsel *evsel;
tools/perf/util/intel-pt.c
1104
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1105
if (intel_pt_get_config(pt, &evsel->core.attr, &config))
tools/perf/util/intel-pt.c
1113
struct evsel *evsel;
tools/perf/util/intel-pt.c
1120
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1121
if (!(evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
tools/perf/util/intel-pt.c
1123
if (intel_pt_get_config(pt, &evsel->core.attr, &config)) {
tools/perf/util/intel-pt.c
1135
struct evsel *evsel;
tools/perf/util/intel-pt.c
1137
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1138
if (intel_pt_get_config(pt, &evsel->core.attr, NULL) &&
tools/perf/util/intel-pt.c
1139
!evsel->core.attr.exclude_kernel)
tools/perf/util/intel-pt.c
1147
struct evsel *evsel;
tools/perf/util/intel-pt.c
1154
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1155
if (intel_pt_get_config(pt, &evsel->core.attr, &config)) {
tools/perf/util/intel-pt.c
1167
struct evsel *evsel;
tools/perf/util/intel-pt.c
1170
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1171
if (intel_pt_get_config(pt, &evsel->core.attr, &config) &&
tools/perf/util/intel-pt.c
1180
struct evsel *evsel;
tools/perf/util/intel-pt.c
1182
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1183
if ((evsel->core.attr.sample_type & PERF_SAMPLE_AUX) &&
tools/perf/util/intel-pt.c
1184
evsel->core.attr.aux_sample_size)
tools/perf/util/intel-pt.c
1192
struct evsel *evsel;
tools/perf/util/intel-pt.c
1195
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1196
if (intel_pt_get_config(pt, &evsel->core.attr, &config))
tools/perf/util/intel-pt.c
1223
struct evsel *evsel;
tools/perf/util/intel-pt.c
1225
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1226
if (!(evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN))
tools/perf/util/intel-pt.c
1227
evsel->synth_sample_type |= PERF_SAMPLE_CALLCHAIN;
tools/perf/util/intel-pt.c
1261
struct evsel *evsel;
tools/perf/util/intel-pt.c
1263
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
1264
if (!(evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK))
tools/perf/util/intel-pt.c
1265
evsel->synth_sample_type |= PERF_SAMPLE_BRANCH_STACK;
tools/perf/util/intel-pt.c
131
struct evsel *pebs_evsel;
tools/perf/util/intel-pt.c
1735
struct evsel *evsel = sample->evsel;
tools/perf/util/intel-pt.c
1739
if (!evsel && pt->session && pt->session->evlist)
tools/perf/util/intel-pt.c
1740
evsel = evlist__id2evsel(pt->session->evlist, sample->id);
tools/perf/util/intel-pt.c
1742
if (evsel)
tools/perf/util/intel-pt.c
1743
branch_sample_type = evsel->core.attr.branch_sample_type;
tools/perf/util/intel-pt.c
177
struct evsel *evsel;
tools/perf/util/intel-pt.c
2435
static int intel_pt_do_synth_pebs_sample(struct intel_pt_queue *ptq, struct evsel *evsel,
tools/perf/util/intel-pt.c
2442
u64 sample_type = evsel->core.attr.sample_type;
tools/perf/util/intel-pt.c
2456
if (!evsel->core.attr.freq)
tools/perf/util/intel-pt.c
2457
sample.period = evsel->core.attr.sample_period;
tools/perf/util/intel-pt.c
2495
u64 regs_mask = evsel->core.attr.sample_regs_intr;
tools/perf/util/intel-pt.c
2509
if ((sample_type | evsel->synth_sample_type) & PERF_SAMPLE_BRANCH_STACK) {
tools/perf/util/intel-pt.c
2581
sample_type | evsel->synth_sample_type);
tools/perf/util/intel-pt.c
2589
struct evsel *evsel = pt->pebs_evsel;
tools/perf/util/intel-pt.c
2591
u64 id = evsel->core.id[0];
tools/perf/util/intel-pt.c
2593
return intel_pt_do_synth_pebs_sample(ptq, evsel, id, data_src_fmt);
tools/perf/util/intel-pt.c
2612
if (!pe->evsel) {
tools/perf/util/intel-pt.c
2618
err = intel_pt_do_synth_pebs_sample(ptq, pe->evsel, pe->id, pe->data_src_fmt);
tools/perf/util/intel-pt.c
3445
struct evsel *evsel = evlist__id2evsel(pt->session->evlist, sample->id);
tools/perf/util/intel-pt.c
3447
if (evsel != pt->switch_evsel)
tools/perf/util/intel-pt.c
3589
static int intel_pt_data_src_fmt(struct intel_pt *pt, struct evsel *evsel)
tools/perf/util/intel-pt.c
3620
if (evsel->core.attr.type == PERF_TYPE_RAW &&
tools/perf/util/intel-pt.c
3621
((evsel->core.attr.config & 0xffff) == 0x5d0 ||
tools/perf/util/intel-pt.c
3622
(evsel->core.attr.config & 0xffff) == 0x6d0))
tools/perf/util/intel-pt.c
3635
struct evsel *evsel;
tools/perf/util/intel-pt.c
3638
evsel = evlist__id2evsel_strict(pt->session->evlist, sample->id);
tools/perf/util/intel-pt.c
3639
if (!queue || !queue->priv || !evsel || hw_id > INTEL_PT_MAX_PEBS) {
tools/perf/util/intel-pt.c
3646
ptq->pebs[hw_id].evsel = evsel;
tools/perf/util/intel-pt.c
3648
ptq->pebs[hw_id].data_src_fmt = intel_pt_data_src_fmt(pt, evsel);
tools/perf/util/intel-pt.c
3864
struct evsel *evsel)
tools/perf/util/intel-pt.c
3869
return evsel->core.attr.type == pt->pmu_type;
tools/perf/util/intel-pt.c
3952
struct evsel *evsel;
tools/perf/util/intel-pt.c
3954
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/intel-pt.c
3955
if (evsel->core.id && evsel->core.id[0] == id) {
tools/perf/util/intel-pt.c
3956
if (evsel->name)
tools/perf/util/intel-pt.c
3957
zfree(&evsel->name);
tools/perf/util/intel-pt.c
3958
evsel->name = strdup(name);
tools/perf/util/intel-pt.c
3964
static struct evsel *intel_pt_evsel(struct intel_pt *pt,
tools/perf/util/intel-pt.c
3967
struct evsel *evsel;
tools/perf/util/intel-pt.c
3969
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/intel-pt.c
3970
if (evsel->core.attr.type == pt->pmu_type && evsel->core.ids)
tools/perf/util/intel-pt.c
3971
return evsel;
tools/perf/util/intel-pt.c
3981
struct evsel *evsel = intel_pt_evsel(pt, evlist);
tools/perf/util/intel-pt.c
3986
if (!evsel) {
tools/perf/util/intel-pt.c
3994
attr.sample_type = evsel->core.attr.sample_type & PERF_SAMPLE_MASK;
tools/perf/util/intel-pt.c
4003
attr.exclude_user = evsel->core.attr.exclude_user;
tools/perf/util/intel-pt.c
4004
attr.exclude_kernel = evsel->core.attr.exclude_kernel;
tools/perf/util/intel-pt.c
4005
attr.exclude_hv = evsel->core.attr.exclude_hv;
tools/perf/util/intel-pt.c
4006
attr.exclude_host = evsel->core.attr.exclude_host;
tools/perf/util/intel-pt.c
4007
attr.exclude_guest = evsel->core.attr.exclude_guest;
tools/perf/util/intel-pt.c
4008
attr.sample_id_all = evsel->core.attr.sample_id_all;
tools/perf/util/intel-pt.c
4009
attr.read_format = evsel->core.attr.read_format;
tools/perf/util/intel-pt.c
4011
id = auxtrace_synth_id_range_start(evsel);
tools/perf/util/intel-pt.c
4122
if (pt->synth_opts.pwr_events && (evsel->core.attr.config & INTEL_PT_CFG_PWR_EVT_EN)) {
tools/perf/util/intel-pt.c
4156
if (pt->synth_opts.intr_events && (evsel->core.attr.config & INTEL_PT_CFG_EVT_EN)) {
tools/perf/util/intel-pt.c
4183
struct evsel *evsel;
tools/perf/util/intel-pt.c
4188
evlist__for_each_entry(pt->session->evlist, evsel) {
tools/perf/util/intel-pt.c
4189
if (evsel->core.attr.aux_output && evsel->core.id) {
tools/perf/util/intel-pt.c
4196
pt->pebs_data_src_fmt = intel_pt_data_src_fmt(pt, evsel);
tools/perf/util/intel-pt.c
4197
pt->pebs_evsel = evsel;
tools/perf/util/intel-pt.c
4202
static struct evsel *intel_pt_find_sched_switch(struct evlist *evlist)
tools/perf/util/intel-pt.c
4204
struct evsel *evsel;
tools/perf/util/intel-pt.c
4206
evlist__for_each_entry_reverse(evlist, evsel) {
tools/perf/util/intel-pt.c
4207
const char *name = evsel__name(evsel);
tools/perf/util/intel-pt.c
4210
return evsel;
tools/perf/util/intel-pt.c
4218
struct evsel *evsel;
tools/perf/util/intel-pt.c
4220
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/intel-pt.c
4221
if (evsel->core.attr.context_switch)
tools/perf/util/intel-pt.c
68
struct evsel *switch_evsel;
tools/perf/util/intel-tpebs.c
101
if (!perf_cpu_map__is_any_cpu_or_is_empty(evsel->evlist->core.user_requested_cpus)) {
tools/perf/util/intel-tpebs.c
102
cpu_map__snprint(evsel->evlist->core.user_requested_cpus, cpumap_buf,
tools/perf/util/intel-tpebs.c
176
if (t->evsel->evlist == NULL)
tools/perf/util/intel-tpebs.c
179
workload_pid = t->evsel->evlist->workload.pid;
tools/perf/util/intel-tpebs.c
183
if (!t->evsel->core.attr.inherit)
tools/perf/util/intel-tpebs.c
202
t = tpebs_retire_lat__find(sample->evsel);
tools/perf/util/intel-tpebs.c
373
static int evsel__tpebs_event(struct evsel *evsel, char **event)
tools/perf/util/intel-tpebs.c
378
name = strdup(evsel->name);
tools/perf/util/intel-tpebs.c
396
if (asprintf(event, "%s/name=tpebs_event_%p/%s", name, evsel, modifier + 1) > 0)
tools/perf/util/intel-tpebs.c
402
pr_err("Tpebs event modifier broken '%s'\n", evsel->name);
tools/perf/util/intel-tpebs.c
407
static struct tpebs_retire_lat *tpebs_retire_lat__new(struct evsel *evsel)
tools/perf/util/intel-tpebs.c
415
ret = evsel__tpebs_event(evsel, &result->event);
tools/perf/util/intel-tpebs.c
420
result->evsel = evsel;
tools/perf/util/intel-tpebs.c
430
static struct tpebs_retire_lat *tpebs_retire_lat__find(struct evsel *evsel)
tools/perf/util/intel-tpebs.c
441
if (evsel__is_retire_lat(evsel)) {
tools/perf/util/intel-tpebs.c
443
if (t->evsel == evsel)
tools/perf/util/intel-tpebs.c
448
evsel_name = strstr(evsel->name, "tpebs_event_");
tools/perf/util/intel-tpebs.c
45
struct evsel *evsel;
tools/perf/util/intel-tpebs.c
456
pr_err("Bad evsel for tpebs find '%s'\n", evsel->name);
tools/perf/util/intel-tpebs.c
460
if ((unsigned long)t->evsel == num)
tools/perf/util/intel-tpebs.c
470
static int evsel__tpebs_prepare(struct evsel *evsel)
tools/perf/util/intel-tpebs.c
472
struct evsel *pos;
tools/perf/util/intel-tpebs.c
476
tpebs_event = tpebs_retire_lat__find(evsel);
tools/perf/util/intel-tpebs.c
482
tpebs_event = tpebs_retire_lat__new(evsel);
tools/perf/util/intel-tpebs.c
494
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/util/intel-tpebs.c
497
if (pos == evsel || !pos->retire_lat)
tools/perf/util/intel-tpebs.c
512
int evsel__tpebs_open(struct evsel *evsel)
tools/perf/util/intel-tpebs.c
532
t = tpebs_retire_lat__find(evsel);
tools/perf/util/intel-tpebs.c
540
ret = evsel__tpebs_prepare(evsel);
tools/perf/util/intel-tpebs.c
564
ret = evsel__tpebs_start_perf_record(evsel);
tools/perf/util/intel-tpebs.c
579
struct tpebs_retire_lat *t = tpebs_retire_lat__find(evsel);
tools/perf/util/intel-tpebs.c
618
int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/intel-tpebs.c
629
if (evsel->prev_raw_counts)
tools/perf/util/intel-tpebs.c
630
old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread);
tools/perf/util/intel-tpebs.c
632
count = perf_counts(evsel->counts, cpu_map_idx, thread);
tools/perf/util/intel-tpebs.c
635
t = tpebs_retire_lat__find(evsel);
tools/perf/util/intel-tpebs.c
657
val = rint(evsel->retirement_latency.min);
tools/perf/util/intel-tpebs.c
660
val = rint(evsel->retirement_latency.max);
tools/perf/util/intel-tpebs.c
665
val = rint(evsel->retirement_latency.mean);
tools/perf/util/intel-tpebs.c
706
void evsel__tpebs_close(struct evsel *evsel)
tools/perf/util/intel-tpebs.c
71
static struct tpebs_retire_lat *tpebs_retire_lat__find(struct evsel *evsel)
tools/perf/util/intel-tpebs.c
711
t = tpebs_retire_lat__find(evsel);
tools/perf/util/intel-tpebs.c
74
static int evsel__tpebs_start_perf_record(struct evsel *evsel)
tools/perf/util/intel-tpebs.h
21
int evsel__tpebs_open(struct evsel *evsel);
tools/perf/util/intel-tpebs.h
22
void evsel__tpebs_close(struct evsel *evsel);
tools/perf/util/intel-tpebs.h
23
int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread);
tools/perf/util/intel-tpebs.h
9
struct evsel;
tools/perf/util/iostat.c
35
struct evsel *evsel __maybe_unused,
tools/perf/util/iostat.h
31
typedef void (*iostat_print_counter_t)(struct perf_stat_config *, struct evsel *, void *);
tools/perf/util/iostat.h
41
void iostat_print_metric(struct perf_stat_config *config, struct evsel *evsel,
tools/perf/util/jitdump.c
125
struct evsel *evsel;
tools/perf/util/jitdump.c
130
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/jitdump.c
131
if (evsel->core.attr.use_clockid == 0 || evsel->core.attr.clockid != CLOCK_MONOTONIC)
tools/perf/util/jitdump.c
855
struct evsel *first;
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
41
return evsel__name_is(sample->evsel, kvm_entry_trace(EM_AARCH64));
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
47
if (evsel__name_is(sample->evsel, kvm_exit_trace(EM_AARCH64))) {
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
72
return evsel__name_is(sample->evsel, kvm_entry_trace(EM_LOONGARCH)) ||
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
73
evsel__name_is(sample->evsel, kvm_reenter_trace);
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
56
return evsel__name_is(sample->evsel, __kvm_events_tp[3]);
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
61
if (evsel__name_is(sample->evsel, __kvm_events_tp[2])) {
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
36
return evsel__name_is(sample->evsel, kvm_entry_trace(EM_RISCV));
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
42
if (evsel__name_is(sample->evsel, kvm_exit_trace(EM_RISCV))) {
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
107
return kvm_entry_event(sample->evsel);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
135
if (evsel__name_is(sample->evsel, "kvm:kvm_msr")) {
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
145
return kvm_entry_event(sample->evsel);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
41
if (kvm_exit_event(sample->evsel))
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
45
if (evsel__name_is(sample->evsel, "kvm:kvm_mmio") &&
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
57
if (kvm_entry_event(sample->evsel))
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
61
if (evsel__name_is(sample->evsel, "kvm:kvm_mmio") &&
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
97
if (evsel__name_is(sample->evsel, "kvm:kvm_pio")) {
tools/perf/util/kvm-stat.c
11
return evsel__name_is(evsel, kvm_exit_trace(e_machine));
tools/perf/util/kvm-stat.c
17
uint16_t e_machine = evsel__e_machine(sample->evsel, /*e_flags=*/NULL);
tools/perf/util/kvm-stat.c
26
if (kvm_exit_event(sample->evsel)) {
tools/perf/util/kvm-stat.c
34
bool kvm_entry_event(struct evsel *evsel)
tools/perf/util/kvm-stat.c
36
uint16_t e_machine = evsel__e_machine(evsel, /*e_flags=*/NULL);
tools/perf/util/kvm-stat.c
38
return evsel__name_is(evsel, kvm_entry_trace(e_machine));
tools/perf/util/kvm-stat.c
44
return kvm_entry_event(sample->evsel);
tools/perf/util/kvm-stat.c
7
bool kvm_exit_event(struct evsel *evsel)
tools/perf/util/kvm-stat.c
9
uint16_t e_machine = evsel__e_machine(evsel, /*e_flags=*/NULL);
tools/perf/util/kvm-stat.h
126
bool kvm_exit_event(struct evsel *evsel);
tools/perf/util/kvm-stat.h
127
bool kvm_entry_event(struct evsel *evsel);
tools/perf/util/kvm-stat.h
17
struct evsel;
tools/perf/util/machine.c
2830
struct evsel *evsel = sample->evsel;
tools/perf/util/machine.c
2844
if (evsel__has_branch_callstack(evsel)) {
tools/perf/util/machine.c
2845
struct perf_env *env = evsel__env(evsel);
tools/perf/util/machine.c
3035
struct evsel *evsel = sample->evsel;
tools/perf/util/machine.c
3038
if (!((evsel->core.attr.sample_type & PERF_SAMPLE_REGS_USER) &&
tools/perf/util/machine.c
3039
(evsel->core.attr.sample_type & PERF_SAMPLE_STACK_USER)))
tools/perf/util/machine.h
16
struct evsel;
tools/perf/util/mem-events.c
127
bool is_mem_loads_aux_event(struct evsel *leader)
tools/perf/util/mem-events.h
24
struct evsel;
tools/perf/util/mem-events.h
38
bool is_mem_loads_aux_event(struct evsel *leader);
tools/perf/util/metricgroup.c
1340
static int count_uses(struct list_head *metric_list, struct evsel *evsel)
tools/perf/util/metricgroup.c
1342
const char *metric_id = evsel__metric_id(evsel);
tools/perf/util/metricgroup.c
1358
static struct evsel *pick_display_evsel(struct list_head *metric_list,
tools/perf/util/metricgroup.c
1359
struct evsel **metric_events)
tools/perf/util/metricgroup.c
1361
struct evsel *selected = metric_events[0];
tools/perf/util/metricgroup.c
1371
struct evsel *candidate = metric_events[i];
tools/perf/util/metricgroup.c
1437
struct evsel **metric_events;
tools/perf/util/metricgroup.c
1524
struct evsel *pos;
tools/perf/util/metricgroup.c
1660
struct evsel *evsel;
tools/perf/util/metricgroup.c
1667
evsel = evlist__find_evsel(evlist, old_me->evsel->core.idx);
tools/perf/util/metricgroup.c
1668
if (!evsel)
tools/perf/util/metricgroup.c
1670
new_me = metricgroup__lookup(new_metric_events, evsel, /*create=*/true);
tools/perf/util/metricgroup.c
1675
cgrp ? cgrp->name : "root", evsel->name, evsel->core.idx);
tools/perf/util/metricgroup.c
1723
evsel = old_expr->metric_events[idx];
tools/perf/util/metricgroup.c
1724
evsel = evlist__find_evsel(evlist, evsel->core.idx);
tools/perf/util/metricgroup.c
1725
if (evsel == NULL) {
tools/perf/util/metricgroup.c
1731
new_expr->metric_events[idx] = evsel;
tools/perf/util/metricgroup.c
270
static bool contains_metric_id(struct evsel **metric_events, int num_events,
tools/perf/util/metricgroup.c
292
struct evsel ***out_metric_events)
tools/perf/util/metricgroup.c
294
struct evsel **metric_events;
tools/perf/util/metricgroup.c
296
struct evsel *ev;
tools/perf/util/metricgroup.c
37
struct evsel *evsel,
tools/perf/util/metricgroup.c
42
.evsel = evsel
tools/perf/util/metricgroup.c
48
if (evsel && evsel->metric_leader)
tools/perf/util/metricgroup.c
49
me.evsel = evsel->metric_leader;
tools/perf/util/metricgroup.c
502
struct evsel *ev;
tools/perf/util/metricgroup.c
69
if (a->evsel == b->evsel)
tools/perf/util/metricgroup.c
71
if ((char *)a->evsel < (char *)b->evsel)
tools/perf/util/metricgroup.c
84
me->evsel = ((struct metric_event *)entry)->evsel;
tools/perf/util/metricgroup.h
11
struct evsel;
tools/perf/util/metricgroup.h
24
struct evsel *evsel;
tools/perf/util/metricgroup.h
62
struct evsel **metric_events;
tools/perf/util/metricgroup.h
70
struct evsel *evsel,
tools/perf/util/mmap.c
66
struct evsel *evsel __maybe_unused,
tools/perf/util/parse-events.c
1404
struct evsel *first_wildcard_match)
tools/perf/util/parse-events.c
1450
struct evsel *first_wildcard_match = NULL;
tools/perf/util/parse-events.c
1466
container_of(list->prev, struct evsel, core.node);
tools/perf/util/parse-events.c
1491
struct evsel *first_wildcard_match)
tools/perf/util/parse-events.c
1496
struct evsel *evsel;
tools/perf/util/parse-events.c
1526
evsel = __add_event(list, &parse_state->idx, &attr,
tools/perf/util/parse-events.c
1531
return evsel ? 0 : -ENOMEM;
tools/perf/util/parse-events.c
1593
evsel = __add_event(list, &parse_state->idx, &attr, /*init_attr=*/true,
tools/perf/util/parse-events.c
1598
if (!evsel) {
tools/perf/util/parse-events.c
1603
if (evsel->name)
tools/perf/util/parse-events.c
1604
evsel->use_config_name = true;
tools/perf/util/parse-events.c
1606
evsel->percore = config_term_percore(&evsel->config_terms);
tools/perf/util/parse-events.c
1609
free((char *)evsel->unit);
tools/perf/util/parse-events.c
1610
evsel->unit = strdup(info.unit);
tools/perf/util/parse-events.c
1611
evsel->scale = info.scale;
tools/perf/util/parse-events.c
1612
evsel->per_pkg = info.per_pkg;
tools/perf/util/parse-events.c
1613
evsel->snapshot = info.snapshot;
tools/perf/util/parse-events.c
1614
evsel->retirement_latency.mean = info.retirement_latency_mean;
tools/perf/util/parse-events.c
1615
evsel->retirement_latency.min = info.retirement_latency_min;
tools/perf/util/parse-events.c
1616
evsel->retirement_latency.max = info.retirement_latency_max;
tools/perf/util/parse-events.c
1633
struct evsel *first_wildcard_match = NULL;
tools/perf/util/parse-events.c
1684
first_wildcard_match = container_of(list->prev, struct evsel, core.node);
tools/perf/util/parse-events.c
1720
struct evsel *first_wildcard_match = NULL;
tools/perf/util/parse-events.c
173
static struct evsel *
tools/perf/util/parse-events.c
1756
container_of((*listp)->prev, struct evsel, core.node);
tools/perf/util/parse-events.c
1779
struct evsel *leader;
tools/perf/util/parse-events.c
178
struct list_head *config_terms, struct evsel *first_wildcard_match,
tools/perf/util/parse-events.c
1786
leader = list_first_entry(list, struct evsel, core.node);
tools/perf/util/parse-events.c
1798
struct evsel *evsel;
tools/perf/util/parse-events.c
1806
__evlist__for_each_entry(list, evsel) {
tools/perf/util/parse-events.c
1808
int eu = group ? evsel->core.attr.exclude_user : 0;
tools/perf/util/parse-events.c
1809
int ek = group ? evsel->core.attr.exclude_kernel : 0;
tools/perf/util/parse-events.c
181
struct evsel *evsel;
tools/perf/util/parse-events.c
1810
int eh = group ? evsel->core.attr.exclude_hv : 0;
tools/perf/util/parse-events.c
1811
int eH = group ? evsel->core.attr.exclude_host : 0;
tools/perf/util/parse-events.c
1812
int eG = group ? evsel->core.attr.exclude_guest : 0;
tools/perf/util/parse-events.c
1848
evsel->core.attr.exclude_user = eu;
tools/perf/util/parse-events.c
1849
evsel->core.attr.exclude_kernel = ek;
tools/perf/util/parse-events.c
1850
evsel->core.attr.exclude_hv = eh;
tools/perf/util/parse-events.c
1851
evsel->core.attr.exclude_host = eH;
tools/perf/util/parse-events.c
1852
evsel->core.attr.exclude_guest = eG;
tools/perf/util/parse-events.c
1853
evsel->exclude_GH = exclude_GH;
tools/perf/util/parse-events.c
1857
u8 precise = evsel->core.attr.precise_ip + mod.precise;
tools/perf/util/parse-events.c
1873
evsel__name(evsel)) > 0) {
tools/perf/util/parse-events.c
1880
evsel->core.attr.precise_ip = precise;
tools/perf/util/parse-events.c
1883
evsel->precise_max = 1;
tools/perf/util/parse-events.c
1885
evsel->core.attr.exclude_idle = 1;
tools/perf/util/parse-events.c
1887
evsel->sample_read = 1;
tools/perf/util/parse-events.c
1888
if (mod.pinned && evsel__is_group_leader(evsel))
tools/perf/util/parse-events.c
1889
evsel->core.attr.pinned = 1;
tools/perf/util/parse-events.c
1890
if (mod.exclusive && evsel__is_group_leader(evsel))
tools/perf/util/parse-events.c
1891
evsel->core.attr.exclusive = 1;
tools/perf/util/parse-events.c
1893
evsel->weak_group = true;
tools/perf/util/parse-events.c
1895
evsel->bpf_counter = true;
tools/perf/util/parse-events.c
1897
evsel->retire_lat = true;
tools/perf/util/parse-events.c
1899
evsel->dont_regroup = true;
tools/perf/util/parse-events.c
192
struct evsel *pos = list_prev_entry(first_wildcard_match, core.node);
tools/perf/util/parse-events.c
1920
struct evsel *evsel;
tools/perf/util/parse-events.c
1923
__evlist__for_each_entry(list, evsel) {
tools/perf/util/parse-events.c
1924
if (!evsel->name) {
tools/perf/util/parse-events.c
1925
evsel->name = used_name ? strdup(name) : name;
tools/perf/util/parse-events.c
1927
if (!evsel->name)
tools/perf/util/parse-events.c
1980
static int evsel__compute_group_pmu_name(struct evsel *evsel,
tools/perf/util/parse-events.c
1983
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/parse-events.c
1984
struct evsel *pos;
tools/perf/util/parse-events.c
1986
struct perf_pmu *pmu = evsel__find_pmu(evsel);
tools/perf/util/parse-events.c
1997
pr_debug("No PMU found for '%s'\n", evsel__name(evsel));
tools/perf/util/parse-events.c
2043
evsel->group_pmu_name = strdup(group_pmu_name);
tools/perf/util/parse-events.c
2044
return evsel->group_pmu_name ? 0 : -ENOMEM;
tools/perf/util/parse-events.c
2047
__weak int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs)
tools/perf/util/parse-events.c
2056
const struct evsel *lhs = container_of(lhs_core, struct evsel, core);
tools/perf/util/parse-events.c
2058
const struct evsel *rhs = container_of(rhs_core, struct evsel, core);
tools/perf/util/parse-events.c
2126
struct evsel *pos, *cur_leader = NULL;
tools/perf/util/parse-events.c
2131
struct evsel *force_grouped_leader = NULL;
tools/perf/util/parse-events.c
2144
const struct evsel *pos_leader = evsel__leader(pos);
tools/perf/util/parse-events.c
2178
struct evsel *pos_leader = evsel__leader(pos);
tools/perf/util/parse-events.c
2220
struct evsel *pos2 = pos;
tools/perf/util/parse-events.c
2263
struct evsel *orig_leader = pos->first_wildcard_match;
tools/perf/util/parse-events.c
2282
struct evsel *pos_leader = evsel__leader(pos);
tools/perf/util/parse-events.c
2336
struct evsel *last;
tools/perf/util/parse-events.c
248
evsel = evsel__new_idx(attr, *idx);
tools/perf/util/parse-events.c
249
if (!evsel) {
tools/perf/util/parse-events.c
2558
int (*func)(struct evsel *evsel,
tools/perf/util/parse-events.c
256
evsel->name = strdup(name);
tools/perf/util/parse-events.c
2562
struct evsel *last = NULL;
tools/perf/util/parse-events.c
257
if (!evsel->name)
tools/perf/util/parse-events.c
2583
last = list_entry(last->core.node.prev, struct evsel, core.node);
tools/perf/util/parse-events.c
2595
static int set_filter(struct evsel *evsel, const void *arg)
tools/perf/util/parse-events.c
2601
if (evsel == NULL) {
tools/perf/util/parse-events.c
2607
if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT && is_possible_tp_filter(str)) {
tools/perf/util/parse-events.c
2608
if (evsel__append_tp_filter(evsel, str) < 0) {
tools/perf/util/parse-events.c
2617
pmu = evsel__find_pmu(evsel);
tools/perf/util/parse-events.c
262
evsel->metric_id = strdup(metric_id);
tools/perf/util/parse-events.c
2623
return perf_bpf_filter__parse(&evsel->bpf_filters, str);
tools/perf/util/parse-events.c
2625
if (evsel__append_addr_filter(evsel, str) < 0) {
tools/perf/util/parse-events.c
263
if (!evsel->metric_id)
tools/perf/util/parse-events.c
2667
static int add_exclude_perf_filter(struct evsel *evsel,
tools/perf/util/parse-events.c
2672
if (evsel == NULL || evsel->core.attr.type != PERF_TYPE_TRACEPOINT) {
tools/perf/util/parse-events.c
268
evsel->core.cpus = cpus;
tools/perf/util/parse-events.c
2680
if (evsel__append_tp_filter(evsel, new_filter) < 0) {
tools/perf/util/parse-events.c
269
evsel->core.pmu_cpus = pmu_cpus;
tools/perf/util/parse-events.c
270
evsel->core.requires_cpu = pmu ? pmu->is_uncore : false;
tools/perf/util/parse-events.c
271
evsel->core.is_pmu_core = is_pmu_core;
tools/perf/util/parse-events.c
272
evsel->core.reads_only_on_cpu_idx0 = perf_pmu__reads_only_on_cpu_idx0(attr);
tools/perf/util/parse-events.c
273
evsel->pmu = pmu;
tools/perf/util/parse-events.c
274
evsel->alternate_hw_config = alternate_hw_config;
tools/perf/util/parse-events.c
275
evsel->first_wildcard_match = first_wildcard_match;
tools/perf/util/parse-events.c
278
list_splice_init(config_terms, &evsel->config_terms);
tools/perf/util/parse-events.c
281
list_add_tail(&evsel->core.node, list);
tools/perf/util/parse-events.c
284
evsel__warn_user_requested_cpus(evsel, user_cpus);
tools/perf/util/parse-events.c
286
return evsel;
tools/perf/util/parse-events.c
290
zfree(&evsel->name);
tools/perf/util/parse-events.c
291
zfree(&evsel->metric_id);
tools/perf/util/parse-events.c
292
free(evsel);
tools/perf/util/parse-events.c
296
struct evsel *parse_events__add_event(int idx, struct perf_event_attr *attr,
tools/perf/util/parse-events.c
438
struct evsel *first_wildcard_match);
tools/perf/util/parse-events.c
478
struct evsel *evsel = evsel__newtp_idx(sys_name, evt_name, parse_state->idx++,
tools/perf/util/parse-events.c
481
if (IS_ERR(evsel)) {
tools/perf/util/parse-events.c
482
tracepoint_error(err, PTR_ERR(evsel), sys_name, evt_name, loc->first_column);
tools/perf/util/parse-events.c
483
return PTR_ERR(evsel);
tools/perf/util/parse-events.c
491
list_splice(&config_terms, &evsel->config_terms);
tools/perf/util/parse-events.c
494
list_add_tail(&evsel->core.node, list);
tools/perf/util/parse-events.h
15
struct evsel;
tools/perf/util/parse-events.h
237
struct evsel *parse_events__add_event(int idx, struct perf_event_attr *attr,
tools/perf/util/parse-events.y
46
struct evsel *evsel, *tmp;
tools/perf/util/parse-events.y
48
list_for_each_entry_safe(evsel, tmp, list_evsel, core.node) {
tools/perf/util/parse-events.y
49
list_del_init(&evsel->core.node);
tools/perf/util/parse-events.y
50
evsel__delete(evsel);
tools/perf/util/perf_api_probe.c
100
evsel->core.attr.comm_exec = 1;
tools/perf/util/perf_api_probe.c
103
static void perf_probe_context_switch(struct evsel *evsel)
tools/perf/util/perf_api_probe.c
105
evsel->core.attr.context_switch = 1;
tools/perf/util/perf_api_probe.c
108
static void perf_probe_text_poke(struct evsel *evsel)
tools/perf/util/perf_api_probe.c
110
evsel->core.attr.text_poke = 1;
tools/perf/util/perf_api_probe.c
113
static void perf_probe_build_id(struct evsel *evsel)
tools/perf/util/perf_api_probe.c
115
evsel->core.attr.build_id = 1;
tools/perf/util/perf_api_probe.c
118
static void perf_probe_cgroup(struct evsel *evsel)
tools/perf/util/perf_api_probe.c
12
typedef void (*setup_probe_fn_t)(struct evsel *evsel);
tools/perf/util/perf_api_probe.c
120
evsel->core.attr.cgroup = 1;
tools/perf/util/perf_api_probe.c
17
struct evsel *evsel;
tools/perf/util/perf_api_probe.c
29
evsel = evlist__first(evlist);
tools/perf/util/perf_api_probe.c
32
fd = sys_perf_event_open(&evsel->core.attr, pid, cpu.cpu, -1, flags);
tools/perf/util/perf_api_probe.c
44
fn(evsel);
tools/perf/util/perf_api_probe.c
46
fd = sys_perf_event_open(&evsel->core.attr, pid, cpu.cpu, -1, flags);
tools/perf/util/perf_api_probe.c
93
static void perf_probe_sample_identifier(struct evsel *evsel)
tools/perf/util/perf_api_probe.c
95
evsel->core.attr.sample_type |= PERF_SAMPLE_IDENTIFIER;
tools/perf/util/perf_api_probe.c
98
static void perf_probe_comm_exec(struct evsel *evsel)
tools/perf/util/pfm.c
102
evsel__set_leader(evsel, grp_leader);
tools/perf/util/pfm.c
128
struct evsel *evsel;
tools/perf/util/pfm.c
139
evsel = parse_events__add_event(0, &attr, name, /*metric_id=*/NULL, pmu);
tools/perf/util/pfm.c
140
if (evsel == NULL)
tools/perf/util/pfm.c
143
evsel->is_libpfm_event = true;
tools/perf/util/pfm.c
145
ret = evsel__open(evsel, cpus, threads);
tools/perf/util/pfm.c
154
evsel->core.attr.exclude_kernel = 1;
tools/perf/util/pfm.c
155
ret = evsel__open(evsel, cpus, threads);
tools/perf/util/pfm.c
161
evsel__close(evsel);
tools/perf/util/pfm.c
162
evsel__delete(evsel);
tools/perf/util/pfm.c
40
struct evsel *evsel, *grp_leader = NULL;
tools/perf/util/pfm.c
88
evsel = parse_events__add_event(evlist->core.nr_entries,
tools/perf/util/pfm.c
91
if (evsel == NULL)
tools/perf/util/pfm.c
94
evsel->is_libpfm_event = true;
tools/perf/util/pfm.c
96
evlist__add(evlist, evsel);
tools/perf/util/pfm.c
99
grp_leader = evsel;
tools/perf/util/pmus.c
860
struct perf_pmu *evsel__find_pmu(const struct evsel *evsel)
tools/perf/util/pmus.c
862
struct perf_pmu *pmu = evsel->pmu;
tools/perf/util/pmus.c
867
pmu = perf_pmus__find_by_attr(&evsel->core.attr);
tools/perf/util/pmus.c
868
((struct evsel *)evsel)->pmu = pmu;
tools/perf/util/powerpc-vpadtl.c
621
struct evsel *evsel;
tools/perf/util/powerpc-vpadtl.c
623
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/powerpc-vpadtl.c
624
if (evsel->core.id && evsel->core.id[0] == id) {
tools/perf/util/powerpc-vpadtl.c
625
if (evsel->name)
tools/perf/util/powerpc-vpadtl.c
626
zfree(&evsel->name);
tools/perf/util/powerpc-vpadtl.c
627
evsel->name = strdup(name);
tools/perf/util/powerpc-vpadtl.c
637
struct evsel *evsel;
tools/perf/util/powerpc-vpadtl.c
643
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/powerpc-vpadtl.c
644
if (strstarts(evsel->name, "vpa_dtl")) {
tools/perf/util/powerpc-vpadtl.c
657
attr.sample_type = evsel->core.attr.sample_type;
tools/perf/util/powerpc-vpadtl.c
658
attr.sample_id_all = evsel->core.attr.sample_id_all;
tools/perf/util/powerpc-vpadtl.c
663
id = auxtrace_synth_id_range_start(evsel);
tools/perf/util/print-events.c
137
struct evsel *evsel;
tools/perf/util/print-events.c
148
evsel = evsel__new(&attr);
tools/perf/util/print-events.c
149
if (evsel) {
tools/perf/util/print-events.c
150
ret = evsel__open(evsel, NULL, tmap) >= 0;
tools/perf/util/print-events.c
159
evsel->core.attr.exclude_kernel = 1;
tools/perf/util/print-events.c
160
ret = evsel__open(evsel, NULL, tmap) >= 0;
tools/perf/util/print-events.c
172
evsel->core.attr.exclude_guest = 1;
tools/perf/util/print-events.c
173
ret = evsel__open(evsel, NULL, tmap) >= 0;
tools/perf/util/print-events.c
176
evsel__close(evsel);
tools/perf/util/print-events.c
177
evsel__delete(evsel);
tools/perf/util/python.c
1053
evsel__init(&pevsel->evsel, &attr, idx);
tools/perf/util/python.c
1059
evsel__exit(&pevsel->evsel);
tools/perf/util/python.c
1066
struct evsel *evsel = &pevsel->evsel;
tools/perf/util/python.c
1083
evsel->core.attr.inherit = inherit;
tools/perf/util/python.c
1088
if (evsel__open(evsel, cpus, threads) < 0) {
tools/perf/util/python.c
1102
pcpu_map->cpus = perf_cpu_map__get(pevsel->evsel.core.cpus);
tools/perf/util/python.c
1113
pthread_map->threads = perf_thread_map__get(pevsel->evsel.core.threads);
tools/perf/util/python.c
1123
static int evsel__ensure_counts(struct evsel *evsel)
tools/perf/util/python.c
1127
if (evsel->counts != NULL)
tools/perf/util/python.c
1130
nthreads = perf_thread_map__nr(evsel->core.threads);
tools/perf/util/python.c
1131
ncpus = perf_cpu_map__nr(evsel->core.cpus);
tools/perf/util/python.c
1133
evsel->counts = perf_counts__new(ncpus, nthreads);
tools/perf/util/python.c
1134
if (evsel->counts == NULL)
tools/perf/util/python.c
1137
evsel->prev_raw_counts = perf_counts__new(ncpus, nthreads);
tools/perf/util/python.c
1138
if (evsel->prev_raw_counts == NULL)
tools/perf/util/python.c
1147
struct evsel *evsel = &pevsel->evsel;
tools/perf/util/python.c
1159
cpu_idx = perf_cpu_map__idx(evsel->core.cpus, (struct perf_cpu){.cpu = cpu});
tools/perf/util/python.c
1164
thread_idx = perf_thread_map__idx(evsel->core.threads, thread);
tools/perf/util/python.c
1171
if (evsel__ensure_counts(evsel))
tools/perf/util/python.c
1175
old_count = perf_counts(evsel->prev_raw_counts, cpu_idx, thread_idx);
tools/perf/util/python.c
1176
new_count = perf_counts(evsel->counts, cpu_idx, thread_idx);
tools/perf/util/python.c
1178
evsel__read_counter(evsel, cpu_idx, thread_idx);
tools/perf/util/python.c
1192
struct evsel *evsel = &pevsel->evsel;
tools/perf/util/python.c
1194
return PyUnicode_FromFormat("evsel(%s/%s/)", evsel__pmu_name(evsel), evsel__name(evsel));
tools/perf/util/python.c
1227
offsetof(struct pyrf_evsel, evsel.member), \
tools/perf/util/python.c
1232
offsetof(struct pyrf_evsel, evsel.core.attr.member), \
tools/perf/util/python.c
1335
const struct evsel *evsel,
tools/perf/util/python.c
1339
struct evsel * const *metric_events = mexp->metric_events;
tools/perf/util/python.c
1343
struct evsel *cur = metric_events[i];
tools/perf/util/python.c
1357
if (evsel && evsel->metric_leader &&
tools/perf/util/python.c
1358
evsel->pmu != evsel->metric_leader->pmu &&
tools/perf/util/python.c
1359
cur->pmu == evsel->metric_leader->pmu) {
tools/perf/util/python.c
1360
struct evsel *pos;
tools/perf/util/python.c
1362
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/util/python.c
1363
if (pos->pmu != evsel->pmu)
tools/perf/util/python.c
1416
struct evsel *metric_evsel = NULL;
tools/perf/util/python.c
1429
struct evsel *pos2;
tools/perf/util/python.c
1553
struct evsel *evsel;
tools/perf/util/python.c
1559
evsel = &((struct pyrf_evsel *)pevsel)->evsel;
tools/perf/util/python.c
1560
evsel->core.idx = evlist->core.nr_entries;
tools/perf/util/python.c
1561
evlist__add(evlist, evsel);
tools/perf/util/python.c
1607
struct evsel *evsel;
tools/perf/util/python.c
1612
evsel = evlist__event2evsel(evlist, event);
tools/perf/util/python.c
1613
if (!evsel) {
tools/perf/util/python.c
1619
pevent->evsel = evsel;
tools/perf/util/python.c
1623
err = evsel__parse_sample(evsel, &pevent->event, &pevent->sample);
tools/perf/util/python.c
1792
struct evsel *pos;
tools/perf/util/python.c
1804
return Py_BuildValue("O", container_of(pos, struct pyrf_evsel, evsel));
tools/perf/util/python.c
1810
struct evsel *pos;
tools/perf/util/python.c
1957
static PyObject *pyrf_evsel__from_evsel(struct evsel *evsel)
tools/perf/util/python.c
1964
memset(&pevsel->evsel, 0, sizeof(pevsel->evsel));
tools/perf/util/python.c
1965
evsel__init(&pevsel->evsel, &evsel->core.attr, evsel->core.idx);
tools/perf/util/python.c
1967
evsel__clone(&pevsel->evsel, evsel);
tools/perf/util/python.c
1968
if (evsel__is_group_leader(evsel))
tools/perf/util/python.c
1969
evsel__set_leader(&pevsel->evsel, &pevsel->evsel);
tools/perf/util/python.c
1973
static int evlist__pos(struct evlist *evlist, struct evsel *evsel)
tools/perf/util/python.c
1975
struct evsel *pos;
tools/perf/util/python.c
1979
if (evsel == pos)
tools/perf/util/python.c
1986
static struct evsel *evlist__at(struct evlist *evlist, int idx)
tools/perf/util/python.c
1988
struct evsel *pos;
tools/perf/util/python.c
2002
struct evsel *pos;
tools/perf/util/python.c
2013
evlist__add(&pevlist->evlist, &pevsel->evsel);
tools/perf/util/python.c
2016
struct evsel *leader = evsel__leader(pos);
tools/perf/util/python.c
2045
int idx = evlist__pos(evlist, me->evsel);
tools/perf/util/python.c
2048
me->evsel = evlist__at(&pevlist->evlist, idx);
tools/perf/util/python.c
295
return pevent->evsel->core.attr.type == PERF_TYPE_TRACEPOINT;
tools/perf/util/python.c
342
struct evsel *evsel = pevent->evsel;
tools/perf/util/python.c
343
struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/python.c
43
struct evsel *evsel;
tools/perf/util/python.c
945
struct evsel evsel;
tools/perf/util/record.c
107
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/record.c
108
evsel__config(evsel, opts, callchain);
tools/perf/util/record.c
109
if (evsel->tracking && use_comm_exec)
tools/perf/util/record.c
110
evsel->core.attr.comm_exec = 1;
tools/perf/util/record.c
114
evlist__for_each_entry(evlist, evsel)
tools/perf/util/record.c
115
evsel__config_leader_sampling(evsel, evlist);
tools/perf/util/record.c
126
struct evsel *first = evlist__first(evlist);
tools/perf/util/record.c
128
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/record.c
129
if (evsel->core.attr.sample_type == first->core.attr.sample_type)
tools/perf/util/record.c
138
evlist__for_each_entry(evlist, evsel)
tools/perf/util/record.c
139
evsel__set_sample_id(evsel, use_sample_identifier);
tools/perf/util/record.c
224
struct evsel *evsel;
tools/perf/util/record.c
238
evsel = evlist__last(temp_evlist);
tools/perf/util/record.c
252
fd = sys_perf_event_open(&evsel->core.attr, pid, cpu.cpu, -1,
tools/perf/util/record.c
26
static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist)
tools/perf/util/record.c
28
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/record.c
32
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/record.c
33
if (evsel__leader(evsel) == leader && evsel != evsel__leader(evsel))
tools/perf/util/record.c
34
return evsel;
tools/perf/util/record.c
41
static u64 evsel__config_term_mask(struct evsel *evsel)
tools/perf/util/record.c
44
struct list_head *config_terms = &evsel->config_terms;
tools/perf/util/record.c
53
static void evsel__config_leader_sampling(struct evsel *evsel, struct evlist *evlist)
tools/perf/util/record.c
55
struct perf_event_attr *attr = &evsel->core.attr;
tools/perf/util/record.c
56
struct evsel *leader = evsel__leader(evsel);
tools/perf/util/record.c
57
struct evsel *read_sampler;
tools/perf/util/record.c
63
read_sampler = evsel__read_sampler(evsel, evlist);
tools/perf/util/record.c
65
if (evsel == read_sampler)
tools/perf/util/record.c
68
term_types = evsel__config_term_mask(evsel);
tools/perf/util/record.c
97
struct evsel *evsel;
tools/perf/util/s390-cpumsf.c
1050
struct evsel *evsel)
tools/perf/util/s390-cpumsf.c
1052
return evsel->core.attr.type == PERF_TYPE_RAW &&
tools/perf/util/s390-cpumsf.c
1053
evsel->core.attr.config == PERF_EVENT_CPUM_SF_DIAG;
tools/perf/util/s390-cpumsf.c
923
struct evsel *ev_bc000;
tools/perf/util/s390-sample-raw.c
227
struct perf_pmu *pmu = sample->evsel->pmu;
tools/perf/util/s390-sample-raw.c
290
struct evsel *evsel = sample->evsel;
tools/perf/util/s390-sample-raw.c
308
ev_name = get_counter_name(evsel->core.attr.config,
tools/perf/util/s390-sample-raw.c
309
pai_data.event_nr, evsel->pmu);
tools/perf/util/s390-sample-raw.c
341
if (!sample->evsel) {
tools/perf/util/s390-sample-raw.c
342
sample->evsel = evlist__event2evsel(evlist, event);
tools/perf/util/s390-sample-raw.c
343
if (!sample->evsel)
tools/perf/util/s390-sample-raw.c
352
if (sample->evsel->core.attr.config == PERF_EVENT_CPUM_CF_DIAG) {
tools/perf/util/s390-sample-raw.c
353
if (!sample->evsel->pmu)
tools/perf/util/s390-sample-raw.c
354
sample->evsel->pmu = perf_pmus__find("cpum_cf");
tools/perf/util/s390-sample-raw.c
362
switch (sample->evsel->core.attr.config) {
tools/perf/util/s390-sample-raw.c
376
if (!sample->evsel->pmu)
tools/perf/util/s390-sample-raw.c
377
sample->evsel->pmu = perf_pmus__find_by_type(sample->evsel->core.attr.type);
tools/perf/util/sample.c
22
sample->evsel = NULL;
tools/perf/util/sample.h
118
struct evsel *evsel;
tools/perf/util/sample.h
8
struct evsel;
tools/perf/util/scripting-engines/trace-event-perl.c
356
struct evsel *evsel = sample->evsel;
tools/perf/util/scripting-engines/trace-event-perl.c
361
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/scripting-engines/trace-event-perl.c
364
event = evsel__tp_format(evsel);
tools/perf/util/scripting-engines/trace-event-perl.c
366
pr_debug("ug! no event found for type %" PRIu64, (u64)evsel->core.attr.config);
tools/perf/util/scripting-engines/trace-event-perl.c
448
XPUSHs(sv_2mortal(newSVpvn((const char *)&sample->evsel->core.attr,
tools/perf/util/scripting-engines/trace-event-perl.c
449
sizeof(sample->evsel->core.attr))));
tools/perf/util/scripting-engines/trace-event-python.c
1139
static int python_export_evsel(struct db_export *dbe, struct evsel *evsel)
tools/perf/util/scripting-engines/trace-event-python.c
1146
tuple_set_d64(t, 0, evsel->db_id);
tools/perf/util/scripting-engines/trace-event-python.c
1147
tuple_set_string(t, 1, evsel__name(evsel));
tools/perf/util/scripting-engines/trace-event-python.c
1310
tuple_set_d64(t, 1, es->sample->evsel->db_id);
tools/perf/util/scripting-engines/trace-event-python.c
1351
tuple_set_d64(t, 1, es->sample->evsel->core.attr.config);
tools/perf/util/scripting-engines/trace-event-python.c
1366
if (es->sample->evsel->core.attr.type == PERF_TYPE_SYNTH && tables->synth_handler)
tools/perf/util/scripting-engines/trace-event-python.c
1506
switch (sample->evsel->core.attr.type) {
tools/perf/util/scripting-engines/trace-event-python.c
1663
struct evsel *evsel)
tools/perf/util/scripting-engines/trace-event-python.c
1667
scnprintf(str, size, "stat__%s", evsel__name(evsel));
tools/perf/util/scripting-engines/trace-event-python.c
1676
process_stat(struct evsel *counter, struct perf_cpu cpu, int thread, u64 tstamp,
tools/perf/util/scripting-engines/trace-event-python.c
1713
struct evsel *counter, u64 tstamp)
tools/perf/util/scripting-engines/trace-event-python.c
1890
SET_TABLE_HANDLER(evsel);
tools/perf/util/scripting-engines/trace-event-python.c
655
u64 read_format = sample->evsel->core.attr.read_format;
tools/perf/util/scripting-engines/trace-event-python.c
744
struct perf_event_attr *attr = &sample->evsel->core.attr;
tools/perf/util/scripting-engines/trace-event-python.c
837
struct evsel *evsel = sample->evsel;
tools/perf/util/scripting-engines/trace-event-python.c
847
pydict_set_item_string_decref(dict, "ev_name", _PyUnicode_FromString(evsel__name(evsel)));
tools/perf/util/scripting-engines/trace-event-python.c
848
pydict_set_item_string_decref(dict, "attr", _PyBytes_FromStringAndSize((const char *)&evsel->core.attr, sizeof(evsel->core.attr)));
tools/perf/util/scripting-engines/trace-event-python.c
952
struct evsel *evsel = sample->evsel;
tools/perf/util/scripting-engines/trace-event-python.c
956
event = evsel__tp_format(evsel);
tools/perf/util/scripting-engines/trace-event-python.c
959
"ug! no event found for type %" PRIu64, (u64)evsel->core.attr.config);
tools/perf/util/session.c
112
struct evsel *evsel;
tools/perf/util/session.c
114
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/session.c
115
if (evsel->core.attr.comm_exec)
tools/perf/util/session.c
1340
static void callchain__printf(struct evsel *evsel,
tools/perf/util/session.c
1346
if (evsel__has_branch_callstack(evsel))
tools/perf/util/session.c
1361
struct evsel *evsel)
tools/perf/util/session.c
1364
bool callstack = evsel__has_branch_callstack(evsel);
tools/perf/util/session.c
1411
perf_env__find_br_cntr_info(evsel__env(evsel), &br_cntr_nr, &br_cntr_width);
tools/perf/util/session.c
1573
struct evsel *evsel = sample->evsel;
tools/perf/util/session.c
1582
sample_type = evsel->core.attr.sample_type;
tools/perf/util/session.c
1594
if (evsel__has_callchain(evsel))
tools/perf/util/session.c
1595
callchain__printf(evsel, sample);
tools/perf/util/session.c
1597
if (evsel__has_br_stack(evsel))
tools/perf/util/session.c
1598
branch_stack__printf(sample, evsel);
tools/perf/util/session.c
1634
sample_read__printf(sample, evsel->core.attr.read_format);
tools/perf/util/session.c
1639
struct evsel *evsel = sample->evsel;
tools/perf/util/session.c
1647
if (evsel__has_callchain(evsel))
tools/perf/util/session.c
1648
callchain__printf(evsel, sample);
tools/perf/util/session.c
1651
static void dump_read(struct evsel *evsel, union perf_event *event)
tools/perf/util/session.c
1661
evsel__name(evsel), event->read.value);
tools/perf/util/session.c
1663
if (!evsel)
tools/perf/util/session.c
1666
read_format = evsel->core.attr.read_format;
tools/perf/util/session.c
1739
struct evsel *saved_evsel = sample->evsel;
tools/perf/util/session.c
1753
if (!storage || sid->evsel == NULL) {
tools/perf/util/session.c
1765
sample->evsel = container_of(sid->evsel, struct evsel, core);
tools/perf/util/session.c
1767
sample->evsel = saved_evsel;
tools/perf/util/session.c
1800
struct evsel *evsel = sample->evsel;
tools/perf/util/session.c
1802
u64 sample_type = evsel->core.attr.sample_type;
tools/perf/util/session.c
1803
u64 read_format = evsel->core.attr.read_format;
tools/perf/util/session.c
1804
bool per_thread = perf_evsel__attr_has_per_thread_sample_period(&evsel->core);
tools/perf/util/session.c
1845
struct evsel *saved_evsel = sample->evsel;
tools/perf/util/session.c
1847
sample->evsel = evlist__id2evsel(evlist, sample->id);
tools/perf/util/session.c
1849
sample->evsel = saved_evsel;
tools/perf/util/session.c
1875
orig_sample.evsel = evlist__id2evsel(evlist, orig_sample.id);
tools/perf/util/session.c
1914
sample.evsel = evlist__id2evsel(evlist, sample.id);
tools/perf/util/session.c
1960
if (!sample->evsel)
tools/perf/util/session.c
1961
sample->evsel = evlist__id2evsel(evlist, sample->id);
tools/perf/util/session.c
1963
assert(sample->evsel == evlist__id2evsel(evlist, sample->id));
tools/perf/util/session.c
1969
if (sample->evsel == NULL) {
tools/perf/util/session.c
2059
dump_read(sample->evsel, event);
tools/perf/util/session.c
2120
struct evsel *evsel;
tools/perf/util/session.c
2124
evsel = evlist__event2evsel(session->evlist, event);
tools/perf/util/session.c
2125
if (!evsel) {
tools/perf/util/session.c
2132
ret = evsel__parse_sample(evsel, event, &sample);
tools/perf/util/session.c
2169
if ((evsel->core.attr.sample_type & PERF_SAMPLE_CPU) &&
tools/perf/util/session.c
2171
evsel->core.attr.sample_id_all)) {
tools/perf/util/session.c
2975
struct evsel *evsel;
tools/perf/util/session.c
2978
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/session.c
2979
if (evsel->core.attr.write_backward)
tools/perf/util/session.c
3751
struct evsel *evsel;
tools/perf/util/session.c
3753
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/session.c
3754
if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT)
tools/perf/util/session.c
3764
struct evsel *evsel;
tools/perf/util/session.c
3766
evlist__for_each_entry(session->evlist, evsel) {
tools/perf/util/session.c
3767
if (evsel->core.attr.context_switch)
tools/perf/util/session.c
3851
struct evsel *perf_session__find_first_evtype(struct perf_session *session,
tools/perf/util/session.c
3854
struct evsel *pos;
tools/perf/util/session.c
3873
struct evsel *evsel;
tools/perf/util/session.c
3875
evsel = perf_session__find_first_evtype(session, i);
tools/perf/util/session.c
3876
if (!evsel)
tools/perf/util/session.c
3879
if (!(evsel->core.attr.sample_type & PERF_SAMPLE_CPU)) {
tools/perf/util/session.h
141
struct evsel *evsel,
tools/perf/util/session.h
181
struct evsel *perf_session__find_first_evtype(struct perf_session *session,
tools/perf/util/sideband_evlist.c
18
struct evsel *evsel;
tools/perf/util/sideband_evlist.c
25
evsel = evsel__new_idx(attr, evlist->core.nr_entries);
tools/perf/util/sideband_evlist.c
26
if (!evsel)
tools/perf/util/sideband_evlist.c
29
evsel->side_band.cb = cb;
tools/perf/util/sideband_evlist.c
30
evsel->side_band.data = data;
tools/perf/util/sideband_evlist.c
31
evlist__add(evlist, evsel);
tools/perf/util/sideband_evlist.c
65
struct evsel *evsel = evlist__event2evsel(evlist, event);
tools/perf/util/sideband_evlist.c
67
if (evsel && evsel->side_band.cb)
tools/perf/util/sideband_evlist.c
68
evsel->side_band.cb(event, evsel->side_band.data);
tools/perf/util/sideband_evlist.c
86
struct evsel *evsel;
tools/perf/util/sideband_evlist.c
88
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/sideband_evlist.c
89
evsel->core.attr.sample_id_all = 1;
tools/perf/util/sideband_evlist.c
90
evsel->core.attr.watermark = 1;
tools/perf/util/sideband_evlist.c
91
evsel->core.attr.wakeup_watermark = 1;
tools/perf/util/sideband_evlist.c
92
evsel->side_band.cb = cb;
tools/perf/util/sideband_evlist.c
93
evsel->side_band.data = data;
tools/perf/util/sideband_evlist.c
99
struct evsel *counter;
tools/perf/util/sort.c
1230
struct evsel *evsel;
tools/perf/util/sort.c
1237
evsel = hists_to_evsel(he->hists);
tools/perf/util/sort.c
1240
tp_format = evsel__tp_format(evsel);
tools/perf/util/sort.c
1258
struct evsel *evsel;
tools/perf/util/sort.c
1260
evsel = hists_to_evsel(left->hists);
tools/perf/util/sort.c
1261
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/sort.c
1275
struct evsel *evsel;
tools/perf/util/sort.c
1277
evsel = hists_to_evsel(he->hists);
tools/perf/util/sort.c
1278
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/sort.c
2608
struct evsel *evsel = hists_to_evsel(he->hists);
tools/perf/util/sort.c
2610
if (evsel) {
tools/perf/util/sort.c
2611
struct perf_session *session = evsel__session(evsel);
tools/perf/util/sort.c
3140
struct evsel *evsel;
tools/perf/util/sort.c
3248
return hists_to_evsel(hists) == hde->evsel;
tools/perf/util/sort.c
3381
__alloc_dynamic_entry(struct evsel *evsel, struct tep_format_field *field,
tools/perf/util/sort.c
3392
hde->evsel = evsel;
tools/perf/util/sort.c
3480
static struct evsel *find_evsel(struct evlist *evlist, char *event_name)
tools/perf/util/sort.c
3482
struct evsel *evsel = NULL;
tools/perf/util/sort.c
3483
struct evsel *pos;
tools/perf/util/sort.c
3493
evsel = evlist__first(evlist);
tools/perf/util/sort.c
3495
evsel = evsel__next(evsel);
tools/perf/util/sort.c
3497
return evsel;
tools/perf/util/sort.c
3507
if (evsel) {
tools/perf/util/sort.c
3509
event_name, evsel->name, pos->name);
tools/perf/util/sort.c
3512
evsel = pos;
tools/perf/util/sort.c
3516
return evsel;
tools/perf/util/sort.c
3520
static int __dynamic_dimension__add(struct evsel *evsel,
tools/perf/util/sort.c
3526
hde = __alloc_dynamic_entry(evsel, field, level);
tools/perf/util/sort.c
3536
static int add_evsel_fields(struct evsel *evsel, bool raw_trace, int level)
tools/perf/util/sort.c
3539
struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/sort.c
3542
ret = __dynamic_dimension__add(evsel, field, raw_trace, level);
tools/perf/util/sort.c
3555
struct evsel *evsel;
tools/perf/util/sort.c
3557
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/sort.c
3558
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/sort.c
3561
ret = add_evsel_fields(evsel, raw_trace, level);
tools/perf/util/sort.c
3572
struct evsel *evsel;
tools/perf/util/sort.c
3574
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/sort.c
3578
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT)
tools/perf/util/sort.c
3581
tp_format = evsel__tp_format(evsel);
tools/perf/util/sort.c
3589
ret = __dynamic_dimension__add(evsel, field, raw_trace, level);
tools/perf/util/sort.c
3601
struct evsel *evsel;
tools/perf/util/sort.c
3637
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/sort.c
3638
if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) {
tools/perf/util/sort.c
3639
pr_err("%s %s", ret ? "," : "This perf binary isn't linked with libtraceevent, can't process", evsel__name(evsel));
tools/perf/util/sort.c
3650
evsel = find_evsel(evlist, event_name);
tools/perf/util/sort.c
3651
if (evsel == NULL) {
tools/perf/util/sort.c
3657
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) {
tools/perf/util/sort.c
3665
ret = add_evsel_fields(evsel, raw_trace, level);
tools/perf/util/sort.c
3667
struct tep_event *tp_format = evsel__tp_format(evsel);
tools/perf/util/sort.c
3677
ret = __dynamic_dimension__add(evsel, field, raw_trace, level);
tools/perf/util/sort.c
4006
struct evsel *evsel;
tools/perf/util/sort.c
4013
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/sort.c
4014
if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) {
tools/perf/util/stat-display.c
1016
struct evsel *evsel;
tools/perf/util/stat-display.c
1031
evsel = evlist__first(evlist);
tools/perf/util/stat-display.c
1033
aggr = &evsel->stats->aggr[aggr_idx];
tools/perf/util/stat-display.c
1034
aggr_printout(config, os, evsel, id, aggr->nr);
tools/perf/util/stat-display.c
1036
print_cgroup(config, os, os->cgrp ? : evsel->cgrp);
tools/perf/util/stat-display.c
1058
struct evsel *counter;
tools/perf/util/stat-display.c
1082
struct evsel *counter, *evsel;
tools/perf/util/stat-display.c
1088
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/stat-display.c
1089
if (os->cgrp == evsel->cgrp)
tools/perf/util/stat-display.c
1092
os->cgrp = evsel->cgrp;
tools/perf/util/stat-display.c
1109
struct evsel *counter, struct outstate *os)
tools/perf/util/stat-display.c
1130
struct evsel *counter;
tools/perf/util/stat-display.c
1147
os->evsel = counter;
tools/perf/util/stat-display.c
1208
struct evsel *counter;
tools/perf/util/stat-display.c
1238
os.evsel = counter;
tools/perf/util/stat-display.c
139
struct evsel *evsel;
tools/perf/util/stat-display.c
1465
struct evsel *counter, struct outstate *os)
tools/perf/util/stat-display.c
1515
struct evsel *counter;
tools/perf/util/stat-display.c
1537
struct evsel *counter;
tools/perf/util/stat-display.c
216
struct evsel *evsel, double avg, bool before_metric)
tools/perf/util/stat-display.c
223
ps = evsel->stats;
tools/perf/util/stat-display.c
258
struct evsel *evsel, struct aggr_cpu_id id, int aggr_nr)
tools/perf/util/stat-display.c
285
if (evsel->percore && !config->percore_show_thread) {
tools/perf/util/stat-display.c
297
COMM_LEN, perf_thread_map__comm(evsel->core.threads, id.thread_idx),
tools/perf/util/stat-display.c
298
PID_LEN, perf_thread_map__pid(evsel->core.threads, id.thread_idx));
tools/perf/util/stat-display.c
311
struct evsel *evsel, struct aggr_cpu_id id, int aggr_nr)
tools/perf/util/stat-display.c
342
if (evsel->percore && !config->percore_show_thread) {
tools/perf/util/stat-display.c
352
perf_thread_map__comm(evsel->core.threads, id.thread_idx),
tools/perf/util/stat-display.c
353
perf_thread_map__pid(evsel->core.threads, id.thread_idx),
tools/perf/util/stat-display.c
365
struct evsel *evsel, struct aggr_cpu_id id, int aggr_nr)
tools/perf/util/stat-display.c
393
if (evsel->percore && !config->percore_show_thread) {
tools/perf/util/stat-display.c
403
perf_thread_map__comm(evsel->core.threads, id.thread_idx),
tools/perf/util/stat-display.c
404
perf_thread_map__pid(evsel->core.threads, id.thread_idx));
tools/perf/util/stat-display.c
415
struct evsel *evsel, struct aggr_cpu_id id, int aggr_nr)
tools/perf/util/stat-display.c
418
print_aggr_id_json(config, os, evsel, id, aggr_nr);
tools/perf/util/stat-display.c
420
print_aggr_id_csv(config, evsel, id, aggr_nr);
tools/perf/util/stat-display.c
422
print_aggr_id_std(config, evsel, id, aggr_nr);
tools/perf/util/stat-display.c
439
aggr_printout(config, os, os->evsel, os->id, os->aggr_nr);
tools/perf/util/stat-display.c
544
aggr_printout(config, os, os->evsel, os->id, os->aggr_nr);
tools/perf/util/stat-display.c
670
os->evsel->priv != os->evsel->evlist->selected->priv)
tools/perf/util/stat-display.c
673
if (os->evsel->cgrp != os->cgrp)
tools/perf/util/stat-display.c
688
struct evsel *evsel, double avg, bool ok)
tools/perf/util/stat-display.c
691
double sc = evsel->scale;
tools/perf/util/stat-display.c
693
const char *bad_count = evsel->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED;
tools/perf/util/stat-display.c
705
if (evsel->unit)
tools/perf/util/stat-display.c
706
fprintf(output, "%-*s ", config->unit_width, evsel->unit);
tools/perf/util/stat-display.c
708
fprintf(output, "%-*s", EVNAME_LEN, evsel__name(evsel));
tools/perf/util/stat-display.c
712
struct evsel *evsel, double avg, bool ok)
tools/perf/util/stat-display.c
715
double sc = evsel->scale;
tools/perf/util/stat-display.c
718
const char *bad_count = evsel->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED;
tools/perf/util/stat-display.c
725
if (evsel->unit)
tools/perf/util/stat-display.c
726
fprintf(output, "%s%s", evsel->unit, sep);
tools/perf/util/stat-display.c
728
fprintf(output, "%s", evsel__name(evsel));
tools/perf/util/stat-display.c
732
struct evsel *evsel, double avg, bool ok)
tools/perf/util/stat-display.c
734
const char *bad_count = evsel->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED;
tools/perf/util/stat-display.c
741
if (evsel->unit)
tools/perf/util/stat-display.c
742
json_out(os, "\"unit\" : \"%s\"", evsel->unit);
tools/perf/util/stat-display.c
744
json_out(os, "\"event\" : \"%s\"", evsel__name(evsel));
tools/perf/util/stat-display.c
748
struct evsel *evsel, double avg, bool ok)
tools/perf/util/stat-display.c
751
print_counter_value_json(os, evsel, avg, ok);
tools/perf/util/stat-display.c
753
print_counter_value_csv(config, evsel, avg, ok);
tools/perf/util/stat-display.c
755
print_counter_value_std(config, evsel, avg, ok);
tools/perf/util/stat-display.c
761
struct evsel *evsel, double avg, bool ok)
tools/perf/util/stat-display.c
763
aggr_printout(config, os, evsel, id, aggr_nr);
tools/perf/util/stat-display.c
764
print_counter_value(config, os, evsel, avg, ok);
tools/perf/util/stat-display.c
765
print_cgroup(config, os, evsel->cgrp);
tools/perf/util/stat-display.c
770
struct evsel *evsel;
tools/perf/util/stat-display.c
776
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/stat-display.c
777
if (evsel->core.is_pmu_core) {
tools/perf/util/stat-display.c
778
struct perf_pmu *pmu = evsel__find_pmu(evsel);
tools/perf/util/stat-display.c
803
struct evsel *counter = os->evsel;
tools/perf/util/stat-display.c
847
aggr_printout(config, os, os->evsel, os->id, os->aggr_nr);
tools/perf/util/stat-display.c
894
struct evsel *counter,
tools/perf/util/stat-display.c
950
struct evsel *counter, int aggr_idx,
tools/perf/util/stat-display.c
964
os->evsel = counter;
tools/perf/util/stat-shadow.c
132
struct evsel *evsel,
tools/perf/util/stat-shadow.c
141
struct evsel * const *metric_events = mexp->metric_events;
tools/perf/util/stat-shadow.c
157
i = prepare_metric(config, mexp, evsel, pctx, aggr_idx);
tools/perf/util/stat-shadow.c
192
out->force_header ? evsel->name : "",
tools/perf/util/stat-shadow.c
198
(metric_name ?: evsel->name) : "", 0);
tools/perf/util/stat-shadow.c
203
(metric_name ?: evsel->name) : "", 0);
tools/perf/util/stat-shadow.c
21
const struct evsel *evsel, int *tool_aggr_idx)
tools/perf/util/stat-shadow.c
23
enum tool_pmu_event event = evsel__tool_event(evsel);
tools/perf/util/stat-shadow.c
230
struct evsel *evsel,
tools/perf/util/stat-shadow.c
247
if (last_name && !strcmp(last_name, name) && last_pmu == evsel->pmu) {
tools/perf/util/stat-shadow.c
252
if (need_full_name && evsel->pmu)
tools/perf/util/stat-shadow.c
253
scnprintf(full_name, sizeof(full_name), "%s (%s)", name, evsel->pmu->name);
tools/perf/util/stat-shadow.c
260
last_pmu = evsel->pmu;
tools/perf/util/stat-shadow.c
275
struct evsel *evsel,
tools/perf/util/stat-shadow.c
286
struct rblist *metric_events = &evsel->evlist->metric_events;
tools/perf/util/stat-shadow.c
288
me = metricgroup__lookup(metric_events, evsel, false);
tools/perf/util/stat-shadow.c
309
if (!header_printed && !evsel->default_show_events) {
tools/perf/util/stat-shadow.c
311
perf_stat__print_metricgroup_header(config, evsel, ctxp,
tools/perf/util/stat-shadow.c
318
generic_metric(config, mexp, evsel, aggr_idx, out);
tools/perf/util/stat-shadow.c
325
struct evsel *evsel,
tools/perf/util/stat-shadow.c
334
iostat_print_metric(config, evsel, out);
tools/perf/util/stat-shadow.c
336
perf_stat__print_shadow_stats_metricgroup(config, evsel, aggr_idx,
tools/perf/util/stat-shadow.c
349
bool perf_stat__skip_metric_event(struct evsel *evsel)
tools/perf/util/stat-shadow.c
351
if (!evsel->default_metricgroup)
tools/perf/util/stat-shadow.c
354
return !metricgroup__lookup(&evsel->evlist->metric_events, evsel, false);
tools/perf/util/stat-shadow.c
46
const struct evsel *evsel,
tools/perf/util/stat-shadow.c
50
struct evsel * const *metric_events = mexp->metric_events;
tools/perf/util/stat-shadow.c
68
if (evsel && evsel->metric_leader &&
tools/perf/util/stat-shadow.c
69
evsel->pmu != evsel->metric_leader->pmu &&
tools/perf/util/stat-shadow.c
70
mexp->metric_events[i]->pmu == evsel->metric_leader->pmu) {
tools/perf/util/stat-shadow.c
71
struct evsel *pos;
tools/perf/util/stat-shadow.c
73
evlist__for_each_entry(evsel->evlist, pos) {
tools/perf/util/stat-shadow.c
74
if (pos->pmu != evsel->pmu)
tools/perf/util/stat.c
114
struct evsel *evsel;
tools/perf/util/stat.c
116
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/stat.c
117
if (evsel__alloc_aggr_stats(evsel, nr_aggr) < 0)
tools/perf/util/stat.c
123
static int evsel__alloc_stat_priv(struct evsel *evsel, int nr_aggr)
tools/perf/util/stat.c
131
evsel->stats = ps;
tools/perf/util/stat.c
133
if (nr_aggr && evsel__alloc_aggr_stats(evsel, nr_aggr) < 0) {
tools/perf/util/stat.c
134
evsel->stats = NULL;
tools/perf/util/stat.c
139
evsel__reset_stat_priv(evsel);
tools/perf/util/stat.c
143
static void evsel__free_stat_priv(struct evsel *evsel)
tools/perf/util/stat.c
145
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
151
zfree(&evsel->stats);
tools/perf/util/stat.c
154
static int evsel__alloc_prev_raw_counts(struct evsel *evsel)
tools/perf/util/stat.c
156
int cpu_map_nr = evsel__nr_cpus(evsel);
tools/perf/util/stat.c
157
int nthreads = perf_thread_map__nr(evsel->core.threads);
tools/perf/util/stat.c
162
evsel->prev_raw_counts = counts;
tools/perf/util/stat.c
167
static void evsel__free_prev_raw_counts(struct evsel *evsel)
tools/perf/util/stat.c
169
perf_counts__delete(evsel->prev_raw_counts);
tools/perf/util/stat.c
170
evsel->prev_raw_counts = NULL;
tools/perf/util/stat.c
173
static void evsel__reset_prev_raw_counts(struct evsel *evsel)
tools/perf/util/stat.c
175
if (evsel->prev_raw_counts)
tools/perf/util/stat.c
176
perf_counts__reset(evsel->prev_raw_counts);
tools/perf/util/stat.c
179
static int evsel__alloc_stats(struct evsel *evsel, int nr_aggr, bool alloc_raw)
tools/perf/util/stat.c
181
if (evsel__alloc_stat_priv(evsel, nr_aggr) < 0 ||
tools/perf/util/stat.c
182
evsel__alloc_counts(evsel) < 0 ||
tools/perf/util/stat.c
183
(alloc_raw && evsel__alloc_prev_raw_counts(evsel) < 0))
tools/perf/util/stat.c
192
struct evsel *evsel;
tools/perf/util/stat.c
198
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/stat.c
199
if (evsel__alloc_stats(evsel, nr_aggr, alloc_raw))
tools/perf/util/stat.c
212
struct evsel *evsel;
tools/perf/util/stat.c
214
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/stat.c
215
evsel__free_stat_priv(evsel);
tools/perf/util/stat.c
216
evsel__free_counts(evsel);
tools/perf/util/stat.c
217
evsel__free_prev_raw_counts(evsel);
tools/perf/util/stat.c
223
struct evsel *evsel;
tools/perf/util/stat.c
225
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/stat.c
226
evsel__reset_stat_priv(evsel);
tools/perf/util/stat.c
227
evsel__reset_counts(evsel);
tools/perf/util/stat.c
233
struct evsel *evsel;
tools/perf/util/stat.c
235
evlist__for_each_entry(evlist, evsel)
tools/perf/util/stat.c
236
evsel__reset_aggr_stats(evsel);
tools/perf/util/stat.c
241
struct evsel *evsel;
tools/perf/util/stat.c
243
evlist__for_each_entry(evlist, evsel)
tools/perf/util/stat.c
244
evsel__reset_prev_raw_counts(evsel);
tools/perf/util/stat.c
247
static void evsel__copy_prev_raw_counts(struct evsel *evsel)
tools/perf/util/stat.c
249
int nthreads = perf_thread_map__nr(evsel->core.threads);
tools/perf/util/stat.c
254
perf_cpu_map__for_each_idx(idx, evsel__cpus(evsel)) {
tools/perf/util/stat.c
255
*perf_counts(evsel->counts, idx, thread) =
tools/perf/util/stat.c
256
*perf_counts(evsel->prev_raw_counts, idx, thread);
tools/perf/util/stat.c
263
struct evsel *evsel;
tools/perf/util/stat.c
265
evlist__for_each_entry(evlist, evsel)
tools/perf/util/stat.c
266
evsel__copy_prev_raw_counts(evsel);
tools/perf/util/stat.c
269
static void evsel__copy_res_stats(struct evsel *evsel)
tools/perf/util/stat.c
271
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
282
struct evsel *evsel;
tools/perf/util/stat.c
287
evlist__for_each_entry(evlist, evsel)
tools/perf/util/stat.c
288
evsel__copy_res_stats(evsel);
tools/perf/util/stat.c
306
static int check_per_pkg(struct evsel *counter, struct perf_counts_values *vals,
tools/perf/util/stat.c
368
static bool evsel__count_has_error(struct evsel *evsel,
tools/perf/util/stat.c
373
if (evsel->err || evsel->counts->scaled == -1)
tools/perf/util/stat.c
388
process_counter_values(struct perf_stat_config *config, struct evsel *evsel,
tools/perf/util/stat.c
392
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
396
if (check_per_pkg(evsel, count, cpu_map_idx, &skip)) {
tools/perf/util/stat.c
404
if (!evsel->snapshot)
tools/perf/util/stat.c
405
evsel__compute_deltas(evsel, cpu_map_idx, thread, count);
tools/perf/util/stat.c
427
struct perf_cpu cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx);
tools/perf/util/stat.c
444
if (evsel__count_has_error(evsel, count, config) && !ps_aggr->failed) {
tools/perf/util/stat.c
464
struct evsel *counter)
tools/perf/util/stat.c
482
struct evsel *counter)
tools/perf/util/stat.c
513
static int evsel__merge_aggr_counters(struct evsel *evsel, struct evsel *alias)
tools/perf/util/stat.c
515
struct perf_stat_evsel *ps_a = evsel->stats;
tools/perf/util/stat.c
541
static void evsel__merge_aliases(struct evsel *evsel)
tools/perf/util/stat.c
543
struct evlist *evlist = evsel->evlist;
tools/perf/util/stat.c
544
struct evsel *alias;
tools/perf/util/stat.c
546
alias = list_prepare_entry(evsel, &(evlist->core.entries), core.node);
tools/perf/util/stat.c
548
if (alias->first_wildcard_match == evsel) {
tools/perf/util/stat.c
550
evsel__merge_aggr_counters(evsel, alias);
tools/perf/util/stat.c
555
static bool evsel__should_merge_hybrid(const struct evsel *evsel,
tools/perf/util/stat.c
558
return config->hybrid_merge && evsel__is_hybrid(evsel);
tools/perf/util/stat.c
561
static void evsel__merge_stats(struct evsel *evsel, struct perf_stat_config *config)
tools/perf/util/stat.c
563
if (!evsel->pmu || !evsel->pmu->is_core || evsel__should_merge_hybrid(evsel, config))
tools/perf/util/stat.c
564
evsel__merge_aliases(evsel);
tools/perf/util/stat.c
570
struct evsel *evsel;
tools/perf/util/stat.c
575
evlist__for_each_entry(evlist, evsel)
tools/perf/util/stat.c
576
evsel__merge_stats(evsel, config);
tools/perf/util/stat.c
579
static void evsel__update_percore_stats(struct evsel *evsel, struct aggr_cpu_id *core_id)
tools/perf/util/stat.c
581
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
588
perf_cpu_map__for_each_cpu(cpu, idx, evsel->core.cpus) {
tools/perf/util/stat.c
601
perf_cpu_map__for_each_cpu(cpu, idx, evsel->core.cpus) {
tools/perf/util/stat.c
617
static void evsel__process_percore(struct evsel *evsel)
tools/perf/util/stat.c
619
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
624
if (!evsel->percore)
tools/perf/util/stat.c
627
perf_cpu_map__for_each_cpu(cpu, idx, evsel->core.cpus) {
tools/perf/util/stat.c
634
evsel__update_percore_stats(evsel, &core_id);
tools/perf/util/stat.c
641
struct evsel *evsel;
tools/perf/util/stat.c
646
evlist__for_each_entry(evlist, evsel)
tools/perf/util/stat.c
647
evsel__process_percore(evsel);
tools/perf/util/stat.c
656
struct evsel *counter;
tools/perf/util/stat.c
80
static void evsel__reset_aggr_stats(struct evsel *evsel)
tools/perf/util/stat.c
82
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
89
static void evsel__reset_stat_priv(struct evsel *evsel)
tools/perf/util/stat.c
91
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.c
94
evsel__reset_aggr_stats(evsel);
tools/perf/util/stat.c
97
static int evsel__alloc_aggr_stats(struct evsel *evsel, int nr_aggr)
tools/perf/util/stat.c
99
struct perf_stat_evsel *ps = evsel->stats;
tools/perf/util/stat.h
129
struct evsel;
tools/perf/util/stat.h
163
struct evsel *evsel,
tools/perf/util/stat.h
166
bool perf_stat__skip_metric_event(struct evsel *evsel);
tools/perf/util/stat.h
168
struct evsel *evsel,
tools/perf/util/stat.h
187
struct evsel *counter);
tools/perf/util/stream.c
131
struct evsel *pos;
tools/perf/util/stream.c
141
es[i].evsel = pos;
tools/perf/util/stream.c
168
const struct evsel *evsel)
tools/perf/util/stream.c
173
if (es[i].evsel == evsel)
tools/perf/util/stream.h
16
const struct evsel *evsel;
tools/perf/util/stream.h
33
const struct evsel *evsel);
tools/perf/util/stream.h
7
struct evsel;
tools/perf/util/synthetic-events.c
1867
struct evsel *evsel;
tools/perf/util/synthetic-events.c
1878
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/synthetic-events.c
1881
nr += evsel->core.ids;
tools/perf/util/synthetic-events.c
1901
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/synthetic-events.c
1906
for (j = 0; j < evsel->core.ids; j++, i++) {
tools/perf/util/synthetic-events.c
1923
e->id = evsel->core.id[j];
tools/perf/util/synthetic-events.c
2022
int perf_event__synthesize_event_update_unit(const struct perf_tool *tool, struct evsel *evsel,
tools/perf/util/synthetic-events.c
2025
size_t size = strlen(evsel->unit);
tools/perf/util/synthetic-events.c
2029
ev = event_update_event__new(size + 1, PERF_EVENT_UPDATE__UNIT, evsel->core.id[0]);
tools/perf/util/synthetic-events.c
2033
strlcpy(ev->unit, evsel->unit, size + 1);
tools/perf/util/synthetic-events.c
2039
int perf_event__synthesize_event_update_scale(const struct perf_tool *tool, struct evsel *evsel,
tools/perf/util/synthetic-events.c
2046
ev = event_update_event__new(sizeof(*ev_data), PERF_EVENT_UPDATE__SCALE, evsel->core.id[0]);
tools/perf/util/synthetic-events.c
2050
ev->scale.scale = evsel->scale;
tools/perf/util/synthetic-events.c
2056
int perf_event__synthesize_event_update_name(const struct perf_tool *tool, struct evsel *evsel,
tools/perf/util/synthetic-events.c
2060
size_t len = strlen(evsel__name(evsel));
tools/perf/util/synthetic-events.c
2063
ev = event_update_event__new(len + 1, PERF_EVENT_UPDATE__NAME, evsel->core.id[0]);
tools/perf/util/synthetic-events.c
2067
strlcpy(ev->name, evsel->name, len + 1);
tools/perf/util/synthetic-events.c
2073
int perf_event__synthesize_event_update_cpus(const struct perf_tool *tool, struct evsel *evsel,
tools/perf/util/synthetic-events.c
2076
struct synthesize_cpu_map_data syn_data = { .map = evsel->core.pmu_cpus };
tools/perf/util/synthetic-events.c
2088
ev->id = evsel->core.id[0];
tools/perf/util/synthetic-events.c
2099
struct evsel *evsel;
tools/perf/util/synthetic-events.c
2102
evlist__for_each_entry(evlist, evsel) {
tools/perf/util/synthetic-events.c
2103
err = perf_event__synthesize_attr(tool, &evsel->core.attr, evsel->core.ids,
tools/perf/util/synthetic-events.c
2104
evsel->core.id, process);
tools/perf/util/synthetic-events.c
2114
static bool has_unit(struct evsel *evsel)
tools/perf/util/synthetic-events.c
2116
return evsel->unit && *evsel->unit;
tools/perf/util/synthetic-events.c
2119
static bool has_scale(struct evsel *evsel)
tools/perf/util/synthetic-events.c
2121
return evsel->scale != 1;
tools/perf/util/synthetic-events.c
2127
struct evsel *evsel;
tools/perf/util/synthetic-events.c
2134
evlist__for_each_entry(evsel_list, evsel) {
tools/perf/util/synthetic-events.c
2135
if (!evsel->supported)
tools/perf/util/synthetic-events.c
2141
if (has_unit(evsel)) {
tools/perf/util/synthetic-events.c
2142
err = perf_event__synthesize_event_update_unit(tool, evsel, process);
tools/perf/util/synthetic-events.c
2149
if (has_scale(evsel)) {
tools/perf/util/synthetic-events.c
2150
err = perf_event__synthesize_event_update_scale(tool, evsel, process);
tools/perf/util/synthetic-events.c
2157
if (evsel->core.pmu_cpus) {
tools/perf/util/synthetic-events.c
2158
err = perf_event__synthesize_event_update_cpus(tool, evsel, process);
tools/perf/util/synthetic-events.c
2170
err = perf_event__synthesize_event_update_name(tool, evsel, process);
tools/perf/util/synthetic-events.c
2289
u64 sample_type = sample->evsel ? sample->evsel->core.attr.sample_type : 0;
tools/perf/util/synthetic-events.c
2342
u64 sample_type = sample->evsel ? sample->evsel->core.attr.sample_type : 0;
tools/perf/util/synthetic-events.h
15
struct evsel;
tools/perf/util/synthetic-events.h
67
int perf_event__synthesize_event_update_cpus(const struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process);
tools/perf/util/synthetic-events.h
68
int perf_event__synthesize_event_update_name(const struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process);
tools/perf/util/synthetic-events.h
69
int perf_event__synthesize_event_update_scale(const struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process);
tools/perf/util/synthetic-events.h
70
int perf_event__synthesize_event_update_unit(const struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process);
tools/perf/util/tool_pmu.c
101
enum tool_pmu_event evsel__tool_event(const struct evsel *evsel)
tools/perf/util/tool_pmu.c
103
if (!evsel__is_tool(evsel))
tools/perf/util/tool_pmu.c
106
return (enum tool_pmu_event)evsel->core.attr.config;
tools/perf/util/tool_pmu.c
109
const char *evsel__tool_pmu_event_name(const struct evsel *evsel)
tools/perf/util/tool_pmu.c
111
return tool_pmu__event_to_str(evsel->core.attr.config);
tools/perf/util/tool_pmu.c
206
int evsel__tool_pmu_prepare_open(struct evsel *evsel,
tools/perf/util/tool_pmu.c
210
enum tool_pmu_event ev = evsel__tool_event(evsel);
tools/perf/util/tool_pmu.c
213
if (!evsel->process_time.start_times) {
tools/perf/util/tool_pmu.c
214
evsel->process_time.start_times =
tools/perf/util/tool_pmu.c
216
if (!evsel->process_time.start_times)
tools/perf/util/tool_pmu.c
219
if (!evsel->process_time.accumulated_times) {
tools/perf/util/tool_pmu.c
220
evsel->process_time.accumulated_times =
tools/perf/util/tool_pmu.c
222
if (!evsel->process_time.accumulated_times)
tools/perf/util/tool_pmu.c
231
static int tool_pmu__read_stat(struct evsel *evsel, int cpu_map_idx, int thread, __u64 *val)
tools/perf/util/tool_pmu.c
233
enum tool_pmu_event ev = evsel__tool_event(evsel);
tools/perf/util/tool_pmu.c
235
int fd = FD(evsel, cpu_map_idx, thread);
tools/perf/util/tool_pmu.c
244
if (evsel->pid_stat) {
tools/perf/util/tool_pmu.c
251
struct perf_cpu cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx);
tools/perf/util/tool_pmu.c
261
int evsel__tool_pmu_open(struct evsel *evsel,
tools/perf/util/tool_pmu.c
265
enum tool_pmu_event ev = evsel__tool_event(evsel);
tools/perf/util/tool_pmu.c
272
if (evsel->core.attr.sample_period) /* no sampling */
tools/perf/util/tool_pmu.c
274
evsel->duration_time.accumulated_time = 0;
tools/perf/util/tool_pmu.c
275
if (evsel->core.attr.disabled) {
tools/perf/util/tool_pmu.c
276
evsel->disabled = true;
tools/perf/util/tool_pmu.c
277
evsel->duration_time.start_time = INVALID_START_TIME;
tools/perf/util/tool_pmu.c
279
evsel->disabled = false;
tools/perf/util/tool_pmu.c
280
evsel->duration_time.start_time = rdclock();
tools/perf/util/tool_pmu.c
285
if (evsel->cgrp)
tools/perf/util/tool_pmu.c
286
pid = evsel->cgrp->fd;
tools/perf/util/tool_pmu.c
291
if (!evsel->cgrp && !evsel->core.system_wide)
tools/perf/util/tool_pmu.c
299
if (evsel->core.attr.sample_period) {
tools/perf/util/tool_pmu.c
309
evsel->pid_stat = true;
tools/perf/util/tool_pmu.c
313
FD(evsel, idx, thread) = fd;
tools/perf/util/tool_pmu.c
318
start_time = xyarray__entry(evsel->process_time.start_times, idx,
tools/perf/util/tool_pmu.c
321
evsel->process_time.accumulated_times, idx, thread);
tools/perf/util/tool_pmu.c
324
if (evsel->core.attr.disabled) {
tools/perf/util/tool_pmu.c
325
evsel->disabled = true;
tools/perf/util/tool_pmu.c
328
evsel->disabled = false;
tools/perf/util/tool_pmu.c
329
err = tool_pmu__read_stat(evsel, idx, thread, start_time);
tools/perf/util/tool_pmu.c
332
FD(evsel, idx, thread) = -1;
tools/perf/util/tool_pmu.c
347
if (FD(evsel, idx, thread) >= 0)
tools/perf/util/tool_pmu.c
348
close(FD(evsel, idx, thread));
tools/perf/util/tool_pmu.c
349
FD(evsel, idx, thread) = -1;
tools/perf/util/tool_pmu.c
386
struct evsel *evsel,
tools/perf/util/tool_pmu.c
404
if (!evsel || perf_cpu_map__is_empty(evsel->core.cpus)) {
tools/perf/util/tool_pmu.c
407
} else if (!perf_cpu_map__has_any_cpu(evsel->core.cpus)) {
tools/perf/util/tool_pmu.c
409
*result = perf_cpu_map__nr(evsel->core.cpus);
tools/perf/util/tool_pmu.c
416
if (!perf_cpu_map__is_empty(evsel->core.pmu_cpus))
tools/perf/util/tool_pmu.c
417
*result = perf_cpu_map__nr(evsel->core.pmu_cpus);
tools/perf/util/tool_pmu.c
429
if (!evsel || perf_cpu_map__is_empty(evsel->core.cpus)) {
tools/perf/util/tool_pmu.c
432
} else if (!perf_cpu_map__has_any_cpu(evsel->core.cpus)) {
tools/perf/util/tool_pmu.c
435
perf_cpu_map__intersect(online, evsel->core.cpus);
tools/perf/util/tool_pmu.c
446
if (!perf_cpu_map__is_empty(evsel->core.pmu_cpus)) {
tools/perf/util/tool_pmu.c
448
perf_cpu_map__intersect(online, evsel->core.pmu_cpus);
tools/perf/util/tool_pmu.c
520
int evsel__tool_pmu_enable_cpu(struct evsel *evsel, int cpu_map_idx)
tools/perf/util/tool_pmu.c
522
enum tool_pmu_event ev = evsel__tool_event(evsel);
tools/perf/util/tool_pmu.c
525
if (!evsel->disabled)
tools/perf/util/tool_pmu.c
530
evsel->duration_time.start_time = rdclock();
tools/perf/util/tool_pmu.c
535
nthreads = xyarray__max_y(evsel->process_time.start_times);
tools/perf/util/tool_pmu.c
537
__u64 *start_time = xyarray__entry(evsel->process_time.start_times,
tools/perf/util/tool_pmu.c
542
err = tool_pmu__read_stat(evsel, cpu_map_idx, thread, &val);
tools/perf/util/tool_pmu.c
552
int evsel__tool_pmu_enable(struct evsel *evsel)
tools/perf/util/tool_pmu.c
557
if (!evsel->disabled)
tools/perf/util/tool_pmu.c
560
for (idx = 0; idx < perf_cpu_map__nr(evsel->core.cpus); idx++) {
tools/perf/util/tool_pmu.c
561
err = evsel__tool_pmu_enable_cpu(evsel, idx);
tools/perf/util/tool_pmu.c
568
int evsel__tool_pmu_disable_cpu(struct evsel *evsel, int cpu_map_idx)
tools/perf/util/tool_pmu.c
570
enum tool_pmu_event ev = evsel__tool_event(evsel);
tools/perf/util/tool_pmu.c
573
if (evsel->disabled)
tools/perf/util/tool_pmu.c
578
__u64 delta = rdclock() - evsel->duration_time.start_time;
tools/perf/util/tool_pmu.c
580
evsel->duration_time.accumulated_time += delta;
tools/perf/util/tool_pmu.c
586
nthreads = xyarray__max_y(evsel->process_time.start_times);
tools/perf/util/tool_pmu.c
588
__u64 *start_time = xyarray__entry(evsel->process_time.start_times,
tools/perf/util/tool_pmu.c
591
evsel->process_time.accumulated_times, cpu_map_idx, thread);
tools/perf/util/tool_pmu.c
595
err = tool_pmu__read_stat(evsel, cpu_map_idx, thread, &val);
tools/perf/util/tool_pmu.c
606
int evsel__tool_pmu_disable(struct evsel *evsel)
tools/perf/util/tool_pmu.c
611
if (evsel->disabled)
tools/perf/util/tool_pmu.c
614
for (idx = 0; idx < perf_cpu_map__nr(evsel->core.cpus); idx++) {
tools/perf/util/tool_pmu.c
615
err = evsel__tool_pmu_disable_cpu(evsel, idx);
tools/perf/util/tool_pmu.c
622
int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread)
tools/perf/util/tool_pmu.c
628
enum tool_pmu_event ev = evsel__tool_event(evsel);
tools/perf/util/tool_pmu.c
630
count = perf_counts(evsel->counts, cpu_map_idx, thread);
tools/perf/util/tool_pmu.c
631
if (evsel->prev_raw_counts)
tools/perf/util/tool_pmu.c
632
old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread);
tools/perf/util/tool_pmu.c
649
if (!tool_pmu__read_event(ev, evsel,
tools/perf/util/tool_pmu.c
662
delta_start = evsel->duration_time.accumulated_time;
tools/perf/util/tool_pmu.c
663
if (!evsel->disabled &&
tools/perf/util/tool_pmu.c
664
evsel->duration_time.start_time != INVALID_START_TIME)
tools/perf/util/tool_pmu.c
665
delta_start += (rdclock() - evsel->duration_time.start_time);
tools/perf/util/tool_pmu.c
672
__u64 accumulated = *(__u64 *)xyarray__entry(evsel->process_time.accumulated_times,
tools/perf/util/tool_pmu.c
675
if (evsel->disabled) {
tools/perf/util/tool_pmu.c
678
__u64 *start_time = xyarray__entry(evsel->process_time.start_times,
tools/perf/util/tool_pmu.c
682
err = tool_pmu__read_stat(evsel, cpu_map_idx, thread, &cur_time);
tools/perf/util/tool_pmu.c
96
bool evsel__is_tool(const struct evsel *evsel)
tools/perf/util/tool_pmu.c
98
return perf_pmu__is_tool(evsel->pmu);
tools/perf/util/tool_pmu.h
40
struct evsel *evsel,
tools/perf/util/tool_pmu.h
50
bool evsel__is_tool(const struct evsel *evsel);
tools/perf/util/tool_pmu.h
51
enum tool_pmu_event evsel__tool_event(const struct evsel *evsel);
tools/perf/util/tool_pmu.h
52
const char *evsel__tool_pmu_event_name(const struct evsel *evsel);
tools/perf/util/tool_pmu.h
53
int evsel__tool_pmu_prepare_open(struct evsel *evsel,
tools/perf/util/tool_pmu.h
56
int evsel__tool_pmu_open(struct evsel *evsel,
tools/perf/util/tool_pmu.h
59
int evsel__tool_pmu_enable_cpu(struct evsel *evsel, int cpu_map_idx);
tools/perf/util/tool_pmu.h
60
int evsel__tool_pmu_enable(struct evsel *evsel);
tools/perf/util/tool_pmu.h
61
int evsel__tool_pmu_disable_cpu(struct evsel *evsel, int cpu_map_idx);
tools/perf/util/tool_pmu.h
62
int evsel__tool_pmu_disable(struct evsel *evsel);
tools/perf/util/tool_pmu.h
63
int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
tools/perf/util/tool_pmu.h
7
struct evsel;
tools/perf/util/top.c
75
struct evsel *first = evlist__first(top->evlist);
tools/perf/util/top.h
17
struct evsel;
tools/perf/util/top.h
44
struct evsel *sym_evsel;
tools/perf/util/topdown.c
5
__weak bool arch_topdown_sample_read(struct evsel *leader __maybe_unused)
tools/perf/util/topdown.h
7
struct evsel;
tools/perf/util/topdown.h
9
bool arch_topdown_sample_read(struct evsel *leader);
tools/perf/util/trace-event-info.c
508
struct evsel *pos;
tools/perf/util/trace-event-info.c
544
struct evsel *pos;
tools/perf/util/trace-event-scripting.c
110
const struct tep_event *tp_format = evsel__tp_format(sample->evsel);
tools/perf/util/trace-event.h
105
struct evsel *evsel, u64 tstamp);
tools/perf/util/trace-event.h
17
struct evsel;
tools/perf/util/values.c
114
struct evsel **new_counters = realloc(values->counters,
tools/perf/util/values.c
147
struct evsel *evsel)
tools/perf/util/values.c
152
if (values->counters[i] == evsel)
tools/perf/util/values.c
163
values->counters[i] = evsel;
tools/perf/util/values.c
170
struct evsel *evsel, u64 value)
tools/perf/util/values.c
177
cindex = perf_read_values__findnew_counter(values, evsel);
tools/perf/util/values.h
16
struct evsel **counters;
tools/perf/util/values.h
25
struct evsel *evsel, u64 value);
tools/perf/util/values.h
8
struct evsel;