Lines Matching refs:evsel

49 struct evsel {  struct
99 struct evsel **metric_events; argument
100 struct evsel *metric_leader; argument
188 static inline struct perf_cpu_map *evsel__cpus(struct evsel *evsel) in evsel__cpus() argument
190 return perf_evsel__cpus(&evsel->core); in evsel__cpus()
193 static inline int evsel__nr_cpus(struct evsel *evsel) in evsel__nr_cpus() argument
195 return evsel__cpus(evsel)->nr; in evsel__nr_cpus()
201 void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
205 int (*init)(struct evsel *evsel),
206 void (*fini)(struct evsel *evsel));
208 struct perf_pmu *evsel__find_pmu(struct evsel *evsel);
209 bool evsel__is_aux_event(struct evsel *evsel);
211 struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx);
213 static inline struct evsel *evsel__new(struct perf_event_attr *attr) in evsel__new()
218 struct evsel *evsel__clone(struct evsel *orig);
219 struct evsel *evsel__newtp_idx(const char *sys, const char *name, int idx);
227 static inline struct evsel *evsel__newtp(const char *sys, const char *name) in evsel__newtp()
232 struct evsel *evsel__new_cycles(bool precise, __u32 type, __u64 config);
236 void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
237 void evsel__exit(struct evsel *evsel);
238 void evsel__delete(struct evsel *evsel);
242 void evsel__config(struct evsel *evsel, struct record_opts *opts,
244 void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
248 void evsel__calc_id_pos(struct evsel *evsel);
252 static inline bool evsel__is_bpf(struct evsel *evsel) in evsel__is_bpf() argument
254 return evsel->bpf_counter_ops != NULL; in evsel__is_bpf()
268 const char *evsel__name(struct evsel *evsel);
269 const char *evsel__metric_id(const struct evsel *evsel);
271 const char *evsel__group_name(struct evsel *evsel);
272 int evsel__group_desc(struct evsel *evsel, char *buf, size_t size);
274 void __evsel__set_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
275 void __evsel__reset_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
277 #define evsel__set_sample_bit(evsel, bit) \ argument
278 __evsel__set_sample_bit(evsel, PERF_SAMPLE_##bit)
280 #define evsel__reset_sample_bit(evsel, bit) \ argument
281 __evsel__reset_sample_bit(evsel, PERF_SAMPLE_##bit)
283 void evsel__set_sample_id(struct evsel *evsel, bool use_sample_identifier);
285 void arch_evsel__set_sample_weight(struct evsel *evsel);
288 int evsel__set_filter(struct evsel *evsel, const char *filter);
289 int evsel__append_tp_filter(struct evsel *evsel, const char *filter);
290 int evsel__append_addr_filter(struct evsel *evsel, const char *filter);
291 int evsel__enable_cpu(struct evsel *evsel, int cpu);
292 int evsel__enable(struct evsel *evsel);
293 int evsel__disable(struct evsel *evsel);
294 int evsel__disable_cpu(struct evsel *evsel, int cpu);
296 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu);
297 int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads);
298 int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
300 void evsel__close(struct evsel *evsel);
301 int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
303 bool evsel__detect_missing_features(struct evsel *evsel);
308 bool evsel__ignore_missing_thread(struct evsel *evsel,
312 bool evsel__precise_ip_fallback(struct evsel *evsel);
316 void *evsel__rawptr(struct evsel *evsel, struct perf_sample *sample, const char *name);
317 u64 evsel__intval(struct evsel *evsel, struct perf_sample *sample, const char *name);
319 static inline char *evsel__strval(struct evsel *evsel, struct perf_sample *sample, const char *name) in evsel__strval() argument
321 return evsel__rawptr(evsel, sample, name); in evsel__strval()
328 struct tep_format_field *evsel__field(struct evsel *evsel, const char *name);
330 #define evsel__match(evsel, t, c) \ argument
331 (evsel->core.attr.type == PERF_TYPE_##t && \
332 evsel->core.attr.config == PERF_COUNT_##c)
334 static inline bool evsel__match2(struct evsel *e1, struct evsel *e2) in evsel__match2()
340 int evsel__read_counter(struct evsel *evsel, int cpu, int thread);
342 int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale);
351 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread) in evsel__read_on_cpu() argument
353 return __evsel__read_on_cpu(evsel, cpu, thread, false); in evsel__read_on_cpu()
363 static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu, int thread) in evsel__read_on_cpu_scaled() argument
365 return __evsel__read_on_cpu(evsel, cpu, thread, true); in evsel__read_on_cpu_scaled()
368 int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
371 int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
374 static inline struct evsel *evsel__next(struct evsel *evsel) in evsel__next() argument
376 return list_entry(evsel->core.node.next, struct evsel, core.node); in evsel__next()
379 static inline struct evsel *evsel__prev(struct evsel *evsel) in evsel__prev() argument
381 return list_entry(evsel->core.node.prev, struct evsel, core.node); in evsel__prev()
391 static inline bool evsel__is_group_leader(const struct evsel *evsel) in evsel__is_group_leader() argument
393 return evsel->core.leader == &evsel->core; in evsel__is_group_leader()
404 static inline bool evsel__is_group_event(struct evsel *evsel) in evsel__is_group_event() argument
409 return evsel__is_group_leader(evsel) && evsel->core.nr_members > 1; in evsel__is_group_event()
412 bool evsel__is_function_event(struct evsel *evsel);
414 static inline bool evsel__is_bpf_output(struct evsel *evsel) in evsel__is_bpf_output() argument
416 return evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT); in evsel__is_bpf_output()
419 static inline bool evsel__is_clock(struct evsel *evsel) in evsel__is_clock() argument
421 return evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK) || in evsel__is_clock()
422 evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK); in evsel__is_clock()
425 bool evsel__fallback(struct evsel *evsel, int err, char *msg, size_t msgsize);
426 int evsel__open_strerror(struct evsel *evsel, struct target *target,
429 static inline int evsel__group_idx(struct evsel *evsel) in evsel__group_idx() argument
431 return evsel->core.idx - evsel->core.leader->idx; in evsel__group_idx()
436 for ((_evsel) = list_entry((_leader)->core.node.next, struct evsel, core.node); \
438 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
444 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
446 static inline bool evsel__has_branch_callstack(const struct evsel *evsel) in evsel__has_branch_callstack() argument
448 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK; in evsel__has_branch_callstack()
451 static inline bool evsel__has_branch_hw_idx(const struct evsel *evsel) in evsel__has_branch_hw_idx() argument
453 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX; in evsel__has_branch_hw_idx()
456 static inline bool evsel__has_callchain(const struct evsel *evsel) in evsel__has_callchain() argument
462 return evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN || in evsel__has_callchain()
463 evsel->synth_sample_type & PERF_SAMPLE_CALLCHAIN; in evsel__has_callchain()
466 static inline bool evsel__has_br_stack(const struct evsel *evsel) in evsel__has_br_stack() argument
472 return evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK || in evsel__has_br_stack()
473 evsel->synth_sample_type & PERF_SAMPLE_BRANCH_STACK; in evsel__has_br_stack()
476 static inline bool evsel__is_dummy_event(struct evsel *evsel) in evsel__is_dummy_event() argument
478 return (evsel->core.attr.type == PERF_TYPE_SOFTWARE) && in evsel__is_dummy_event()
479 (evsel->core.attr.config == PERF_COUNT_SW_DUMMY); in evsel__is_dummy_event()
482 struct perf_env *evsel__env(struct evsel *evsel);
484 int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
486 void evsel__zero_per_pkg(struct evsel *evsel);
487 bool evsel__is_hybrid(struct evsel *evsel);
488 struct evsel *evsel__leader(struct evsel *evsel);
489 bool evsel__has_leader(struct evsel *evsel, struct evsel *leader);
490 bool evsel__is_leader(struct evsel *evsel);
491 void evsel__set_leader(struct evsel *evsel, struct evsel *leader);
492 int evsel__source_count(const struct evsel *evsel);