• Home
  • Raw
  • Download

Lines Matching refs:evsel

86 	struct perf_evsel *evsel;  in perf_evlist__update_id_pos()  local
88 evlist__for_each(evlist, evsel) in perf_evlist__update_id_pos()
89 perf_evsel__calc_id_pos(evsel); in perf_evlist__update_id_pos()
149 struct perf_evsel *evsel, *leader; in __perf_evlist__set_leader() local
152 evsel = list_entry(list->prev, struct perf_evsel, node); in __perf_evlist__set_leader()
154 leader->nr_members = evsel->idx - leader->idx + 1; in __perf_evlist__set_leader()
156 __evlist__for_each(list, evsel) { in __perf_evlist__set_leader()
157 evsel->leader = leader; in __perf_evlist__set_leader()
175 struct perf_evsel *evsel; in perf_evlist__add_default() local
179 evsel = perf_evsel__new(&attr); in perf_evlist__add_default()
180 if (evsel == NULL) in perf_evlist__add_default()
184 evsel->name = strdup("cycles"); in perf_evlist__add_default()
185 if (!evsel->name) in perf_evlist__add_default()
188 perf_evlist__add(evlist, evsel); in perf_evlist__add_default()
191 perf_evsel__delete(evsel); in perf_evlist__add_default()
199 struct perf_evsel *evsel, *n; in perf_evlist__add_attrs() local
204 evsel = perf_evsel__new_idx(attrs + i, evlist->nr_entries + i); in perf_evlist__add_attrs()
205 if (evsel == NULL) in perf_evlist__add_attrs()
207 list_add_tail(&evsel->node, &head); in perf_evlist__add_attrs()
215 __evlist__for_each_safe(&head, n, evsel) in perf_evlist__add_attrs()
216 perf_evsel__delete(evsel); in perf_evlist__add_attrs()
234 struct perf_evsel *evsel; in perf_evlist__find_tracepoint_by_id() local
236 evlist__for_each(evlist, evsel) { in perf_evlist__find_tracepoint_by_id()
237 if (evsel->attr.type == PERF_TYPE_TRACEPOINT && in perf_evlist__find_tracepoint_by_id()
238 (int)evsel->attr.config == id) in perf_evlist__find_tracepoint_by_id()
239 return evsel; in perf_evlist__find_tracepoint_by_id()
249 struct perf_evsel *evsel; in perf_evlist__find_tracepoint_by_name() local
251 evlist__for_each(evlist, evsel) { in perf_evlist__find_tracepoint_by_name()
252 if ((evsel->attr.type == PERF_TYPE_TRACEPOINT) && in perf_evlist__find_tracepoint_by_name()
253 (strcmp(evsel->name, name) == 0)) in perf_evlist__find_tracepoint_by_name()
254 return evsel; in perf_evlist__find_tracepoint_by_name()
263 struct perf_evsel *evsel = perf_evsel__newtp(sys, name); in perf_evlist__add_newtp() local
265 if (evsel == NULL) in perf_evlist__add_newtp()
268 evsel->handler = handler; in perf_evlist__add_newtp()
269 perf_evlist__add(evlist, evsel); in perf_evlist__add_newtp()
274 struct perf_evsel *evsel) in perf_evlist__nr_threads() argument
276 if (evsel->system_wide) in perf_evlist__nr_threads()
321 struct perf_evsel *evsel) in perf_evlist__disable_event() argument
325 int nr_threads = perf_evlist__nr_threads(evlist, evsel); in perf_evlist__disable_event()
327 if (!evsel->fd) in perf_evlist__disable_event()
332 err = ioctl(FD(evsel, cpu, thread), in perf_evlist__disable_event()
342 struct perf_evsel *evsel) in perf_evlist__enable_event() argument
346 int nr_threads = perf_evlist__nr_threads(evlist, evsel); in perf_evlist__enable_event()
348 if (!evsel->fd) in perf_evlist__enable_event()
353 err = ioctl(FD(evsel, cpu, thread), in perf_evlist__enable_event()
363 struct perf_evsel *evsel, int cpu) in perf_evlist__enable_event_cpu() argument
366 int nr_threads = perf_evlist__nr_threads(evlist, evsel); in perf_evlist__enable_event_cpu()
368 if (!evsel->fd) in perf_evlist__enable_event_cpu()
372 err = ioctl(FD(evsel, cpu, thread), in perf_evlist__enable_event_cpu()
381 struct perf_evsel *evsel, in perf_evlist__enable_event_thread() argument
387 if (!evsel->fd) in perf_evlist__enable_event_thread()
391 err = ioctl(FD(evsel, cpu, thread), PERF_EVENT_IOC_ENABLE, 0); in perf_evlist__enable_event_thread()
399 struct perf_evsel *evsel, int idx) in perf_evlist__enable_event_idx() argument
404 return perf_evlist__enable_event_cpu(evlist, evsel, idx); in perf_evlist__enable_event_idx()
406 return perf_evlist__enable_event_thread(evlist, evsel, idx); in perf_evlist__enable_event_idx()
414 struct perf_evsel *evsel; in perf_evlist__alloc_pollfd() local
416 list_for_each_entry(evsel, &evlist->entries, node) { in perf_evlist__alloc_pollfd()
417 if (evsel->system_wide) in perf_evlist__alloc_pollfd()
470 struct perf_evsel *evsel, in perf_evlist__id_hash() argument
474 struct perf_sample_id *sid = SID(evsel, cpu, thread); in perf_evlist__id_hash()
477 sid->evsel = evsel; in perf_evlist__id_hash()
482 void perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel, in perf_evlist__id_add() argument
485 perf_evlist__id_hash(evlist, evsel, cpu, thread, id); in perf_evlist__id_add()
486 evsel->id[evsel->ids++] = id; in perf_evlist__id_add()
490 struct perf_evsel *evsel, in perf_evlist__id_add_fd() argument
514 if (!(evsel->attr.read_format & PERF_FORMAT_ID) || in perf_evlist__id_add_fd()
518 if (evsel->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) in perf_evlist__id_add_fd()
520 if (evsel->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) in perf_evlist__id_add_fd()
526 perf_evlist__id_add(evlist, evsel, cpu, thread, id); in perf_evlist__id_add_fd()
555 return sid->evsel; in perf_evlist__id2evsel()
612 return sid->evsel; in perf_evlist__event2evsel()
782 struct perf_evsel *evsel; in perf_evlist__mmap_per_evsel() local
784 evlist__for_each(evlist, evsel) { in perf_evlist__mmap_per_evsel()
787 if (evsel->system_wide && thread) in perf_evlist__mmap_per_evsel()
790 fd = FD(evsel, cpu, thread); in perf_evlist__mmap_per_evsel()
808 if ((evsel->attr.read_format & PERF_FORMAT_ID) && in perf_evlist__mmap_per_evsel()
809 perf_evlist__id_add_fd(evlist, evsel, cpu, thread, fd) < 0) in perf_evlist__mmap_per_evsel()
955 struct perf_evsel *evsel; in perf_evlist__mmap() local
973 evlist__for_each(evlist, evsel) { in perf_evlist__mmap()
974 if ((evsel->attr.read_format & PERF_FORMAT_ID) && in perf_evlist__mmap()
975 evsel->sample_id == NULL && in perf_evlist__mmap()
976 perf_evsel__alloc_id(evsel, cpu_map__nr(cpus), threads->nr) < 0) in perf_evlist__mmap()
1012 struct perf_evsel *evsel; in perf_evlist__apply_filters() local
1017 evlist__for_each(evlist, evsel) { in perf_evlist__apply_filters()
1018 if (evsel->filter == NULL) in perf_evlist__apply_filters()
1021 err = perf_evsel__set_filter(evsel, ncpus, nthreads, evsel->filter); in perf_evlist__apply_filters()
1031 struct perf_evsel *evsel; in perf_evlist__set_filter() local
1036 evlist__for_each(evlist, evsel) { in perf_evlist__set_filter()
1037 err = perf_evsel__set_filter(evsel, ncpus, nthreads, filter); in perf_evlist__set_filter()
1066 struct perf_evsel *evsel; in __perf_evlist__combined_sample_type() local
1071 evlist__for_each(evlist, evsel) in __perf_evlist__combined_sample_type()
1072 evlist->combined_sample_type |= evsel->attr.sample_type; in __perf_evlist__combined_sample_type()
1161 struct perf_evsel *evsel) in perf_evlist__set_selected() argument
1163 evlist->selected = evsel; in perf_evlist__set_selected()
1168 struct perf_evsel *evsel; in perf_evlist__close() local
1173 evlist__for_each_reverse(evlist, evsel) { in perf_evlist__close()
1174 n = evsel->cpus ? evsel->cpus->nr : ncpus; in perf_evlist__close()
1175 perf_evsel__close(evsel, n, nthreads); in perf_evlist__close()
1211 struct perf_evsel *evsel; in perf_evlist__open() local
1226 evlist__for_each(evlist, evsel) { in perf_evlist__open()
1227 err = perf_evsel__open(evsel, evlist->cpus, evlist->threads); in perf_evlist__open()
1375 struct perf_evsel *evsel = perf_evlist__event2evsel(evlist, event); in perf_evlist__parse_sample() local
1377 if (!evsel) in perf_evlist__parse_sample()
1379 return perf_evsel__parse_sample(evsel, event, sample); in perf_evlist__parse_sample()
1384 struct perf_evsel *evsel; in perf_evlist__fprintf() local
1387 evlist__for_each(evlist, evsel) { in perf_evlist__fprintf()
1388 printed += fprintf(fp, "%s%s", evsel->idx ? ", " : "", in perf_evlist__fprintf()
1389 perf_evsel__name(evsel)); in perf_evlist__fprintf()
1461 struct perf_evsel *evsel, *n; in perf_evlist__to_front() local
1467 evlist__for_each_safe(evlist, n, evsel) { in perf_evlist__to_front()
1468 if (evsel->leader == move_evsel->leader) in perf_evlist__to_front()
1469 list_move_tail(&evsel->node, &move); in perf_evlist__to_front()
1478 struct perf_evsel *evsel; in perf_evlist__set_tracking_event() local
1483 evlist__for_each(evlist, evsel) { in perf_evlist__set_tracking_event()
1484 if (evsel != tracking_evsel) in perf_evlist__set_tracking_event()
1485 evsel->tracking = false; in perf_evlist__set_tracking_event()