Lines Matching refs:evsel

133 	struct evsel *first = evlist__first(evlist);  in evlist__set_id_pos()
141 struct evsel *evsel; in evlist__update_id_pos() local
143 evlist__for_each_entry(evlist, evsel) in evlist__update_id_pos()
144 evsel__calc_id_pos(evsel); in evlist__update_id_pos()
151 struct evsel *pos, *n; in evlist__purge()
183 void evlist__add(struct evlist *evlist, struct evsel *entry) in evlist__add()
193 void evlist__remove(struct evlist *evlist, struct evsel *evsel) in evlist__remove() argument
195 evsel->evlist = NULL; in evlist__remove()
196 perf_evlist__remove(&evlist->core, &evsel->core); in evlist__remove()
202 struct evsel *evsel, *temp, *leader = NULL; in evlist__splice_list_tail() local
204 __evlist__for_each_entry_safe(list, temp, evsel) { in evlist__splice_list_tail()
205 list_del_init(&evsel->core.node); in evlist__splice_list_tail()
206 evlist__add(evlist, evsel); in evlist__splice_list_tail()
207 leader = evsel; in evlist__splice_list_tail()
211 __evlist__for_each_entry_safe(list, temp, evsel) { in evlist__splice_list_tail()
212 if (evsel__has_leader(evsel, leader)) { in evlist__splice_list_tail()
213 list_del_init(&evsel->core.node); in evlist__splice_list_tail()
214 evlist__add(evlist, evsel); in evlist__splice_list_tail()
228 struct evsel *evsel = evlist__find_tracepoint_by_name(evlist, assocs[i].name); in __evlist__set_tracepoints_handlers() local
229 if (evsel == NULL) in __evlist__set_tracepoints_handlers()
233 if (evsel->handler != NULL) in __evlist__set_tracepoints_handlers()
235 evsel->handler = assocs[i].handler; in __evlist__set_tracepoints_handlers()
248 static struct evsel *evlist__dummy_event(struct evlist *evlist) in evlist__dummy_event()
261 struct evsel *evsel = evlist__dummy_event(evlist); in evlist__add_dummy() local
263 if (evsel == NULL) in evlist__add_dummy()
266 evlist__add(evlist, evsel); in evlist__add_dummy()
270 struct evsel *evlist__add_aux_dummy(struct evlist *evlist, bool system_wide) in evlist__add_aux_dummy()
272 struct evsel *evsel = evlist__dummy_event(evlist); in evlist__add_aux_dummy() local
274 if (!evsel) in evlist__add_aux_dummy()
277 evsel->core.attr.exclude_kernel = 1; in evlist__add_aux_dummy()
278 evsel->core.attr.exclude_guest = 1; in evlist__add_aux_dummy()
279 evsel->core.attr.exclude_hv = 1; in evlist__add_aux_dummy()
280 evsel->core.attr.freq = 0; in evlist__add_aux_dummy()
281 evsel->core.attr.sample_period = 1; in evlist__add_aux_dummy()
282 evsel->core.system_wide = system_wide; in evlist__add_aux_dummy()
283 evsel->no_aux_samples = true; in evlist__add_aux_dummy()
284 evsel->name = strdup("dummy:u"); in evlist__add_aux_dummy()
286 evlist__add(evlist, evsel); in evlist__add_aux_dummy()
287 return evsel; in evlist__add_aux_dummy()
291 struct evsel *evlist__add_sched_switch(struct evlist *evlist, bool system_wide) in evlist__add_sched_switch()
293 struct evsel *evsel = evsel__newtp_idx("sched", "sched_switch", 0); in evlist__add_sched_switch() local
295 if (IS_ERR(evsel)) in evlist__add_sched_switch()
296 return evsel; in evlist__add_sched_switch()
298 evsel__set_sample_bit(evsel, CPU); in evlist__add_sched_switch()
299 evsel__set_sample_bit(evsel, TIME); in evlist__add_sched_switch()
301 evsel->core.system_wide = system_wide; in evlist__add_sched_switch()
302 evsel->no_aux_samples = true; in evlist__add_sched_switch()
304 evlist__add(evlist, evsel); in evlist__add_sched_switch()
305 return evsel; in evlist__add_sched_switch()
311 struct evsel *evsel, *n; in evlist__add_attrs() local
316 evsel = evsel__new_idx(attrs + i, evlist->core.nr_entries + i); in evlist__add_attrs()
317 if (evsel == NULL) in evlist__add_attrs()
319 list_add_tail(&evsel->core.node, &head); in evlist__add_attrs()
327 __evlist__for_each_entry_safe(&head, n, evsel) in evlist__add_attrs()
328 evsel__delete(evsel); in evlist__add_attrs()
352 struct evsel *evlist__find_tracepoint_by_id(struct evlist *evlist, int id) in evlist__find_tracepoint_by_id()
354 struct evsel *evsel; in evlist__find_tracepoint_by_id() local
356 evlist__for_each_entry(evlist, evsel) { in evlist__find_tracepoint_by_id()
357 if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT && in evlist__find_tracepoint_by_id()
358 (int)evsel->core.attr.config == id) in evlist__find_tracepoint_by_id()
359 return evsel; in evlist__find_tracepoint_by_id()
365 struct evsel *evlist__find_tracepoint_by_name(struct evlist *evlist, const char *name) in evlist__find_tracepoint_by_name()
367 struct evsel *evsel; in evlist__find_tracepoint_by_name() local
369 evlist__for_each_entry(evlist, evsel) { in evlist__find_tracepoint_by_name()
370 if ((evsel->core.attr.type == PERF_TYPE_TRACEPOINT) && in evlist__find_tracepoint_by_name()
371 (strcmp(evsel->name, name) == 0)) in evlist__find_tracepoint_by_name()
372 return evsel; in evlist__find_tracepoint_by_name()
381 struct evsel *evsel = evsel__newtp(sys, name); in evlist__add_newtp() local
383 if (IS_ERR(evsel)) in evlist__add_newtp()
386 evsel->handler = handler; in evlist__add_newtp()
387 evlist__add(evlist, evsel); in evlist__add_newtp()
396 .evsel = NULL, in evlist__cpu_begin()
408 itr.evsel = evlist__first(evlist); in evlist__cpu_begin()
412 itr.cpu_map_idx = perf_cpu_map__idx(itr.evsel->core.cpus, itr.cpu); in evlist__cpu_begin()
426 while (evlist_cpu_itr->evsel != evlist__last(evlist_cpu_itr->container)) { in evlist_cpu_iterator__next()
427 evlist_cpu_itr->evsel = evsel__next(evlist_cpu_itr->evsel); in evlist_cpu_iterator__next()
429 perf_cpu_map__idx(evlist_cpu_itr->evsel->core.cpus, in evlist_cpu_iterator__next()
436 evlist_cpu_itr->evsel = evlist__first(evlist_cpu_itr->container); in evlist_cpu_iterator__next()
443 perf_cpu_map__idx(evlist_cpu_itr->evsel->core.cpus, in evlist_cpu_iterator__next()
459 static int evsel__strcmp(struct evsel *pos, char *evsel_name) in evsel__strcmp()
470 struct evsel *pos; in evlist__is_enabled()
484 struct evsel *pos; in __evlist__disable()
499 pos = evlist_cpu_itr.evsel; in __evlist__disable()
554 struct evsel *pos; in __evlist__enable()
566 pos = evlist_cpu_itr.evsel; in __evlist__enable()
654 struct evsel *evlist__id2evsel(struct evlist *evlist, u64 id) in evlist__id2evsel()
663 return container_of(sid->evsel, struct evsel, core); in evlist__id2evsel()
671 struct evsel *evlist__id2evsel_strict(struct evlist *evlist, u64 id) in evlist__id2evsel_strict()
680 return container_of(sid->evsel, struct evsel, core); in evlist__id2evsel_strict()
705 struct evsel *evlist__event2evsel(struct evlist *evlist, union perf_event *event) in evlist__event2evsel()
707 struct evsel *first = evlist__first(evlist); in evlist__event2evsel()
732 return container_of(sid->evsel, struct evsel, core); in evlist__event2evsel()
830 struct evsel *evsel = container_of(_evsel, struct evsel, core); in perf_evlist__mmap_cb_idx() local
832 auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, evsel, idx); in perf_evlist__mmap_cb_idx()
1080 int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel) in evlist__apply_filters()
1082 struct evsel *evsel; in evlist__apply_filters() local
1085 evlist__for_each_entry(evlist, evsel) { in evlist__apply_filters()
1090 if (evsel->filter) { in evlist__apply_filters()
1091 err = perf_evsel__apply_filter(&evsel->core, evsel->filter); in evlist__apply_filters()
1093 *err_evsel = evsel; in evlist__apply_filters()
1101 if (!list_empty(&evsel->bpf_filters)) { in evlist__apply_filters()
1102 err = perf_bpf_filter__prepare(evsel); in evlist__apply_filters()
1104 *err_evsel = evsel; in evlist__apply_filters()
1115 struct evsel *evsel; in evlist__set_tp_filter() local
1121 evlist__for_each_entry(evlist, evsel) { in evlist__set_tp_filter()
1122 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) in evlist__set_tp_filter()
1125 err = evsel__set_filter(evsel, filter); in evlist__set_tp_filter()
1135 struct evsel *evsel; in evlist__append_tp_filter() local
1141 evlist__for_each_entry(evlist, evsel) { in evlist__append_tp_filter()
1142 if (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) in evlist__append_tp_filter()
1145 err = evsel__append_tp_filter(evsel, filter); in evlist__append_tp_filter()
1209 struct evsel *pos; in evlist__valid_sample_type()
1228 struct evsel *evsel; in __evlist__combined_sample_type() local
1233 evlist__for_each_entry(evlist, evsel) in __evlist__combined_sample_type()
1234 evlist->combined_sample_type |= evsel->core.attr.sample_type; in __evlist__combined_sample_type()
1247 struct evsel *evsel; in evlist__combined_branch_type() local
1250 evlist__for_each_entry(evlist, evsel) in evlist__combined_branch_type()
1251 branch_type |= evsel->core.attr.branch_sample_type; in evlist__combined_branch_type()
1257 struct evsel *first = evlist__first(evlist), *pos = first; in evlist__valid_read_format()
1279 struct evsel *first = evlist__first(evlist); in evlist__id_hdr_size()
1286 struct evsel *first = evlist__first(evlist), *pos = first; in evlist__valid_sample_id_all()
1298 struct evsel *first = evlist__first(evlist); in evlist__sample_id_all()
1302 void evlist__set_selected(struct evlist *evlist, struct evsel *evsel) in evlist__set_selected() argument
1304 evlist->selected = evsel; in evlist__set_selected()
1309 struct evsel *evsel; in evlist__close() local
1319 evlist__for_each_entry_reverse(evlist, evsel) in evlist__close()
1320 evsel__close(evsel); in evlist__close()
1328 perf_evsel__close_cpu(&evlist_cpu_itr.evsel->core, in evlist__close()
1333 evlist__for_each_entry_reverse(evlist, evsel) { in evlist__close()
1334 perf_evsel__free_fd(&evsel->core); in evlist__close()
1335 perf_evsel__free_id(&evsel->core); in evlist__close()
1373 struct evsel *evsel; in evlist__open() local
1388 evlist__for_each_entry(evlist, evsel) { in evlist__open()
1389 err = evsel__open(evsel, evsel->core.cpus, evsel->core.threads); in evlist__open()
1542 struct evsel *evsel = evlist__event2evsel(evlist, event); in evlist__parse_sample() local
1545 if (!evsel) in evlist__parse_sample()
1547 ret = evsel__parse_sample(evsel, event, sample); in evlist__parse_sample()
1563 struct evsel *evsel = evlist__event2evsel(evlist, event); in evlist__parse_sample_timestamp() local
1565 if (!evsel) in evlist__parse_sample_timestamp()
1567 return evsel__parse_sample_timestamp(evsel, event, timestamp); in evlist__parse_sample_timestamp()
1598 struct evsel *first = evlist__first(evlist); in evlist__strerror_open()
1654 void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel) in evlist__to_front()
1656 struct evsel *evsel, *n; in evlist__to_front() local
1662 evlist__for_each_entry_safe(evlist, n, evsel) { in evlist__to_front()
1663 if (evsel__leader(evsel) == evsel__leader(move_evsel)) in evlist__to_front()
1664 list_move_tail(&evsel->core.node, &move); in evlist__to_front()
1670 struct evsel *evlist__get_tracking_event(struct evlist *evlist) in evlist__get_tracking_event()
1672 struct evsel *evsel; in evlist__get_tracking_event() local
1674 evlist__for_each_entry(evlist, evsel) { in evlist__get_tracking_event()
1675 if (evsel->tracking) in evlist__get_tracking_event()
1676 return evsel; in evlist__get_tracking_event()
1682 void evlist__set_tracking_event(struct evlist *evlist, struct evsel *tracking_evsel) in evlist__set_tracking_event()
1684 struct evsel *evsel; in evlist__set_tracking_event() local
1689 evlist__for_each_entry(evlist, evsel) { in evlist__set_tracking_event()
1690 if (evsel != tracking_evsel) in evlist__set_tracking_event()
1691 evsel->tracking = false; in evlist__set_tracking_event()
1697 struct evsel *evlist__find_evsel_by_str(struct evlist *evlist, const char *str) in evlist__find_evsel_by_str()
1699 struct evsel *evsel; in evlist__find_evsel_by_str() local
1701 evlist__for_each_entry(evlist, evsel) { in evlist__find_evsel_by_str()
1702 if (!evsel->name) in evlist__find_evsel_by_str()
1704 if (evsel__name_is(evsel, str)) in evlist__find_evsel_by_str()
1705 return evsel; in evlist__find_evsel_by_str()
1770 struct evsel *evsel; in evlist__exclude_kernel() local
1772 evlist__for_each_entry(evlist, evsel) { in evlist__exclude_kernel()
1773 if (!evsel->core.attr.exclude_kernel) in evlist__exclude_kernel()
1788 struct evsel *leader = evlist__first(evlist); in evlist__force_leader()
1795 struct evsel *evlist__reset_weak_group(struct evlist *evsel_list, struct evsel *evsel, bool close) in evlist__reset_weak_group() argument
1797 struct evsel *c2, *leader; in evlist__reset_weak_group()
1800 leader = evsel__leader(evsel); in evlist__reset_weak_group()
1810 if (c2 == evsel) in evlist__reset_weak_group()
2060 struct evsel *evsel; in evlist__ctlfd_enable() local
2074 evsel = evlist__find_evsel_by_str(evlist, name); in evlist__ctlfd_enable()
2075 if (evsel) { in evlist__ctlfd_enable()
2080 pr_info("Event %s %s\n", evsel->name, in evlist__ctlfd_enable()
2101 struct evsel *evsel; in evlist__ctlfd_list() local
2126 evlist__for_each_entry(evlist, evsel) in evlist__ctlfd_list()
2127 evsel__fprintf(evsel, &details, stderr); in evlist__ctlfd_list()
2409 struct evsel *evlist__find_evsel(struct evlist *evlist, int idx) in evlist__find_evsel()
2411 struct evsel *evsel; in evlist__find_evsel() local
2413 evlist__for_each_entry(evlist, evsel) { in evlist__find_evsel()
2414 if (evsel->core.idx == idx) in evlist__find_evsel()
2415 return evsel; in evlist__find_evsel()
2422 struct evsel *evsel; in evlist__scnprintf_evsels() local
2425 evlist__for_each_entry(evlist, evsel) { in evlist__scnprintf_evsels()
2426 if (evsel__is_dummy_event(evsel)) in evlist__scnprintf_evsels()
2428 if (size > (strlen(evsel__name(evsel)) + (printed ? 2 : 1))) { in evlist__scnprintf_evsels()
2429 …printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "," : "", evsel__name(evsel)); in evlist__scnprintf_evsels()
2441 struct evsel *leader, *evsel, *pos; in evlist__check_mem_load_aux() local
2450 evlist__for_each_entry(evlist, evsel) { in evlist__check_mem_load_aux()
2451 leader = evsel__leader(evsel); in evlist__check_mem_load_aux()
2452 if (leader == evsel) in evlist__check_mem_load_aux()
2476 struct evsel *pos; in evlist__warn_user_requested_cpus()