Lines Matching refs:evsel
45 struct evsel { struct
77 struct evsel *first_wildcard_match;
102 struct evsel **metric_events; argument
103 struct evsel *metric_leader; argument
232 static inline struct perf_cpu_map *evsel__cpus(struct evsel *evsel) in evsel__cpus() argument
234 return perf_evsel__cpus(&evsel->core); in evsel__cpus()
237 static inline int evsel__nr_cpus(struct evsel *evsel) in evsel__nr_cpus() argument
239 return perf_cpu_map__nr(evsel__cpus(evsel)); in evsel__nr_cpus()
242 void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
246 int (*init)(struct evsel *evsel),
247 void (*fini)(struct evsel *evsel));
249 struct perf_pmu *evsel__find_pmu(const struct evsel *evsel);
250 const char *evsel__pmu_name(const struct evsel *evsel);
251 bool evsel__is_aux_event(const struct evsel *evsel);
253 struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx);
255 static inline struct evsel *evsel__new(struct perf_event_attr *attr) in evsel__new()
260 struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig);
269 struct evsel *evsel__newtp_idx(const char *sys, const char *name, int idx, bool format);
270 static inline struct evsel *evsel__newtp(const char *sys, const char *name) in evsel__newtp()
276 struct tep_event *evsel__tp_format(struct evsel *evsel);
279 void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
280 void evsel__exit(struct evsel *evsel);
281 void evsel__delete(struct evsel *evsel);
287 void evsel__config(struct evsel *evsel, struct record_opts *opts,
289 void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
293 void evsel__calc_id_pos(struct evsel *evsel);
297 static inline bool evsel__is_bpf(struct evsel *evsel) in evsel__is_bpf() argument
299 return evsel->bpf_counter_ops != NULL; in evsel__is_bpf()
302 static inline bool evsel__is_bperf(struct evsel *evsel) in evsel__is_bperf() argument
304 return evsel->bpf_counter_ops != NULL && list_empty(&evsel->bpf_counter_list); in evsel__is_bperf()
316 int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size);
319 const char *evsel__name(struct evsel *evsel);
320 bool evsel__name_is(struct evsel *evsel, const char *name);
321 const char *evsel__metric_id(const struct evsel *evsel);
323 static inline bool evsel__is_retire_lat(const struct evsel *evsel) in evsel__is_retire_lat() argument
325 return evsel->retire_lat; in evsel__is_retire_lat()
328 const char *evsel__group_name(struct evsel *evsel);
329 int evsel__group_desc(struct evsel *evsel, char *buf, size_t size);
331 void __evsel__set_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
332 void __evsel__reset_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
334 #define evsel__set_sample_bit(evsel, bit) \ argument
335 __evsel__set_sample_bit(evsel, PERF_SAMPLE_##bit)
337 #define evsel__reset_sample_bit(evsel, bit) \ argument
338 __evsel__reset_sample_bit(evsel, PERF_SAMPLE_##bit)
340 void evsel__set_sample_id(struct evsel *evsel, bool use_sample_identifier);
342 void arch_evsel__set_sample_weight(struct evsel *evsel);
343 void arch__post_evsel_config(struct evsel *evsel, struct perf_event_attr *attr);
344 int arch_evsel__open_strerror(struct evsel *evsel, char *msg, size_t size);
346 int evsel__set_filter(struct evsel *evsel, const char *filter);
347 int evsel__append_tp_filter(struct evsel *evsel, const char *filter);
348 int evsel__append_addr_filter(struct evsel *evsel, const char *filter);
349 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx);
350 int evsel__enable(struct evsel *evsel);
351 int evsel__disable(struct evsel *evsel);
352 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx);
354 int evsel__open_per_cpu_and_thread(struct evsel *evsel,
357 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx);
358 int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads);
359 int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
361 void evsel__close(struct evsel *evsel);
362 int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
365 bool evsel__precise_ip_fallback(struct evsel *evsel);
370 void *evsel__rawptr(struct evsel *evsel, struct perf_sample *sample, const char *name);
371 u64 evsel__intval(struct evsel *evsel, struct perf_sample *sample, const char *name);
372 u64 evsel__intval_common(struct evsel *evsel, struct perf_sample *sample, const char *name);
373 char evsel__taskstate(struct evsel *evsel, struct perf_sample *sample, const char *name);
375 static inline char *evsel__strval(struct evsel *evsel, struct perf_sample *sample, const char *name) in evsel__strval() argument
377 return evsel__rawptr(evsel, sample, name); in evsel__strval()
385 struct tep_format_field *evsel__field(struct evsel *evsel, const char *name);
386 struct tep_format_field *evsel__common_field(struct evsel *evsel, const char *name);
388 bool __evsel__match(const struct evsel *evsel, u32 type, u64 config);
390 #define evsel__match(evsel, t, c) __evsel__match(evsel, PERF_TYPE_##t, PERF_COUNT_##c) argument
392 int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread);
394 int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale);
403 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu() argument
405 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, false); in evsel__read_on_cpu()
415 static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu_scaled() argument
417 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, true); in evsel__read_on_cpu_scaled()
420 int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
423 int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
426 u16 evsel__id_hdr_size(const struct evsel *evsel);
428 static inline struct evsel *evsel__next(struct evsel *evsel) in evsel__next() argument
430 return list_entry(evsel->core.node.next, struct evsel, core.node); in evsel__next()
433 static inline struct evsel *evsel__prev(struct evsel *evsel) in evsel__prev() argument
435 return list_entry(evsel->core.node.prev, struct evsel, core.node); in evsel__prev()
445 static inline bool evsel__is_group_leader(const struct evsel *evsel) in evsel__is_group_leader() argument
447 return evsel->core.leader == &evsel->core; in evsel__is_group_leader()
458 static inline bool evsel__is_group_event(struct evsel *evsel) in evsel__is_group_event() argument
463 return evsel__is_group_leader(evsel) && evsel->core.nr_members > 1; in evsel__is_group_event()
466 bool evsel__is_function_event(struct evsel *evsel);
468 static inline bool evsel__is_bpf_output(struct evsel *evsel) in evsel__is_bpf_output() argument
470 return evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT); in evsel__is_bpf_output()
473 static inline bool evsel__is_clock(const struct evsel *evsel) in evsel__is_clock() argument
475 return evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK) || in evsel__is_clock()
476 evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK); in evsel__is_clock()
479 bool evsel__fallback(struct evsel *evsel, struct target *target, int err,
481 int evsel__open_strerror(struct evsel *evsel, struct target *target,
484 static inline int evsel__group_idx(struct evsel *evsel) in evsel__group_idx() argument
486 return evsel->core.idx - evsel->core.leader->idx; in evsel__group_idx()
491 for ((_evsel) = list_entry((_leader)->core.node.next, struct evsel, core.node); \
494 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
504 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
509 static inline bool evsel__has_branch_callstack(const struct evsel *evsel) in evsel__has_branch_callstack() argument
511 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK; in evsel__has_branch_callstack()
514 static inline bool evsel__has_branch_hw_idx(const struct evsel *evsel) in evsel__has_branch_hw_idx() argument
516 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX; in evsel__has_branch_hw_idx()
519 static inline bool evsel__has_callchain(const struct evsel *evsel) in evsel__has_callchain() argument
525 return evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN || in evsel__has_callchain()
526 evsel->synth_sample_type & PERF_SAMPLE_CALLCHAIN; in evsel__has_callchain()
529 static inline bool evsel__has_br_stack(const struct evsel *evsel) in evsel__has_br_stack() argument
535 return evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK || in evsel__has_br_stack()
536 evsel->synth_sample_type & PERF_SAMPLE_BRANCH_STACK; in evsel__has_br_stack()
539 static inline bool evsel__is_dummy_event(struct evsel *evsel) in evsel__is_dummy_event() argument
541 return (evsel->core.attr.type == PERF_TYPE_SOFTWARE) && in evsel__is_dummy_event()
542 (evsel->core.attr.config == PERF_COUNT_SW_DUMMY); in evsel__is_dummy_event()
545 struct perf_session *evsel__session(struct evsel *evsel);
546 struct perf_env *evsel__env(struct evsel *evsel);
548 int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
550 void evsel__zero_per_pkg(struct evsel *evsel);
551 bool evsel__is_hybrid(const struct evsel *evsel);
552 struct evsel *evsel__leader(const struct evsel *evsel);
553 bool evsel__has_leader(struct evsel *evsel, struct evsel *leader);
554 bool evsel__is_leader(struct evsel *evsel);
555 void evsel__set_leader(struct evsel *evsel, struct evsel *leader);
556 int evsel__source_count(const struct evsel *evsel);
557 void evsel__remove_from_group(struct evsel *evsel, struct evsel *leader);
559 bool arch_evsel__must_be_in_group(const struct evsel *evsel);
561 bool evsel__set_needs_uniquify(struct evsel *counter, const struct perf_stat_config *config);
562 void evsel__uniquify_counter(struct evsel *counter);
576 void evsel__set_config_if_unset(struct perf_pmu *pmu, struct evsel *evsel,
579 bool evsel__is_offcpu_event(struct evsel *evsel);
581 void evsel__warn_user_requested_cpus(struct evsel *evsel, struct perf_cpu_map *user_requested_cpus);