Lines Matching refs:evsel

48 struct evsel {  struct
97 struct evsel **metric_events; argument
98 struct evsel *metric_leader; argument
183 static inline struct perf_cpu_map *evsel__cpus(struct evsel *evsel) in evsel__cpus() argument
185 return perf_evsel__cpus(&evsel->core); in evsel__cpus()
188 static inline int evsel__nr_cpus(struct evsel *evsel) in evsel__nr_cpus() argument
190 return evsel__cpus(evsel)->nr; in evsel__nr_cpus()
196 void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
200 int (*init)(struct evsel *evsel),
201 void (*fini)(struct evsel *evsel));
203 struct perf_pmu *evsel__find_pmu(struct evsel *evsel);
204 bool evsel__is_aux_event(struct evsel *evsel);
206 struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx);
208 static inline struct evsel *evsel__new(struct perf_event_attr *attr) in evsel__new()
213 struct evsel *evsel__clone(struct evsel *orig);
214 struct evsel *evsel__newtp_idx(const char *sys, const char *name, int idx);
222 static inline struct evsel *evsel__newtp(const char *sys, const char *name) in evsel__newtp()
227 struct evsel *evsel__new_cycles(bool precise, __u32 type, __u64 config);
231 void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
232 void evsel__exit(struct evsel *evsel);
233 void evsel__delete(struct evsel *evsel);
237 void evsel__config(struct evsel *evsel, struct record_opts *opts,
239 void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
243 void evsel__calc_id_pos(struct evsel *evsel);
247 static inline bool evsel__is_bpf(struct evsel *evsel) in evsel__is_bpf() argument
249 return evsel->bpf_counter_ops != NULL; in evsel__is_bpf()
263 const char *evsel__name(struct evsel *evsel);
265 const char *evsel__group_name(struct evsel *evsel);
266 int evsel__group_desc(struct evsel *evsel, char *buf, size_t size);
268 void __evsel__set_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
269 void __evsel__reset_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
271 #define evsel__set_sample_bit(evsel, bit) \ argument
272 __evsel__set_sample_bit(evsel, PERF_SAMPLE_##bit)
274 #define evsel__reset_sample_bit(evsel, bit) \ argument
275 __evsel__reset_sample_bit(evsel, PERF_SAMPLE_##bit)
277 void evsel__set_sample_id(struct evsel *evsel, bool use_sample_identifier);
279 void arch_evsel__set_sample_weight(struct evsel *evsel);
281 int evsel__set_filter(struct evsel *evsel, const char *filter);
282 int evsel__append_tp_filter(struct evsel *evsel, const char *filter);
283 int evsel__append_addr_filter(struct evsel *evsel, const char *filter);
284 int evsel__enable_cpu(struct evsel *evsel, int cpu);
285 int evsel__enable(struct evsel *evsel);
286 int evsel__disable(struct evsel *evsel);
287 int evsel__disable_cpu(struct evsel *evsel, int cpu);
289 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu);
290 int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads);
291 int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
293 void evsel__close(struct evsel *evsel);
294 int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
296 bool evsel__detect_missing_features(struct evsel *evsel);
301 bool evsel__ignore_missing_thread(struct evsel *evsel,
305 bool evsel__precise_ip_fallback(struct evsel *evsel);
309 void *evsel__rawptr(struct evsel *evsel, struct perf_sample *sample, const char *name);
310 u64 evsel__intval(struct evsel *evsel, struct perf_sample *sample, const char *name);
312 static inline char *evsel__strval(struct evsel *evsel, struct perf_sample *sample, const char *name) in evsel__strval() argument
314 return evsel__rawptr(evsel, sample, name); in evsel__strval()
321 struct tep_format_field *evsel__field(struct evsel *evsel, const char *name);
323 #define evsel__match(evsel, t, c) \ argument
324 (evsel->core.attr.type == PERF_TYPE_##t && \
325 evsel->core.attr.config == PERF_COUNT_##c)
327 static inline bool evsel__match2(struct evsel *e1, struct evsel *e2) in evsel__match2()
333 int evsel__read_counter(struct evsel *evsel, int cpu, int thread);
335 int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale);
344 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread) in evsel__read_on_cpu() argument
346 return __evsel__read_on_cpu(evsel, cpu, thread, false); in evsel__read_on_cpu()
356 static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu, int thread) in evsel__read_on_cpu_scaled() argument
358 return __evsel__read_on_cpu(evsel, cpu, thread, true); in evsel__read_on_cpu_scaled()
361 int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
364 int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
367 static inline struct evsel *evsel__next(struct evsel *evsel) in evsel__next() argument
369 return list_entry(evsel->core.node.next, struct evsel, core.node); in evsel__next()
372 static inline struct evsel *evsel__prev(struct evsel *evsel) in evsel__prev() argument
374 return list_entry(evsel->core.node.prev, struct evsel, core.node); in evsel__prev()
384 static inline bool evsel__is_group_leader(const struct evsel *evsel) in evsel__is_group_leader() argument
386 return evsel->core.leader == &evsel->core; in evsel__is_group_leader()
397 static inline bool evsel__is_group_event(struct evsel *evsel) in evsel__is_group_event() argument
402 return evsel__is_group_leader(evsel) && evsel->core.nr_members > 1; in evsel__is_group_event()
405 bool evsel__is_function_event(struct evsel *evsel);
407 static inline bool evsel__is_bpf_output(struct evsel *evsel) in evsel__is_bpf_output() argument
409 return evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT); in evsel__is_bpf_output()
412 static inline bool evsel__is_clock(struct evsel *evsel) in evsel__is_clock() argument
414 return evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK) || in evsel__is_clock()
415 evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK); in evsel__is_clock()
418 bool evsel__fallback(struct evsel *evsel, int err, char *msg, size_t msgsize);
419 int evsel__open_strerror(struct evsel *evsel, struct target *target,
422 static inline int evsel__group_idx(struct evsel *evsel) in evsel__group_idx() argument
424 return evsel->core.idx - evsel->core.leader->idx; in evsel__group_idx()
429 for ((_evsel) = list_entry((_leader)->core.node.next, struct evsel, core.node); \
431 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
437 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
439 static inline bool evsel__has_branch_callstack(const struct evsel *evsel) in evsel__has_branch_callstack() argument
441 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK; in evsel__has_branch_callstack()
444 static inline bool evsel__has_branch_hw_idx(const struct evsel *evsel) in evsel__has_branch_hw_idx() argument
446 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX; in evsel__has_branch_hw_idx()
449 static inline bool evsel__has_callchain(const struct evsel *evsel) in evsel__has_callchain() argument
455 return evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN || in evsel__has_callchain()
456 evsel->synth_sample_type & PERF_SAMPLE_CALLCHAIN; in evsel__has_callchain()
459 static inline bool evsel__has_br_stack(const struct evsel *evsel) in evsel__has_br_stack() argument
465 return evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK || in evsel__has_br_stack()
466 evsel->synth_sample_type & PERF_SAMPLE_BRANCH_STACK; in evsel__has_br_stack()
469 static inline bool evsel__is_dummy_event(struct evsel *evsel) in evsel__is_dummy_event() argument
471 return (evsel->core.attr.type == PERF_TYPE_SOFTWARE) && in evsel__is_dummy_event()
472 (evsel->core.attr.config == PERF_COUNT_SW_DUMMY); in evsel__is_dummy_event()
475 struct perf_env *evsel__env(struct evsel *evsel);
477 int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
479 void evsel__zero_per_pkg(struct evsel *evsel);
480 bool evsel__is_hybrid(struct evsel *evsel);
481 struct evsel *evsel__leader(struct evsel *evsel);
482 bool evsel__has_leader(struct evsel *evsel, struct evsel *leader);
483 bool evsel__is_leader(struct evsel *evsel);
484 void evsel__set_leader(struct evsel *evsel, struct evsel *leader);