Lines Matching refs:evsel
43 struct evsel { struct
90 struct evsel **metric_events; argument
91 struct evsel *metric_leader; argument
114 struct evsel *leader; argument
156 static inline struct perf_cpu_map *evsel__cpus(struct evsel *evsel) in evsel__cpus() argument
158 return perf_evsel__cpus(&evsel->core); in evsel__cpus()
161 static inline int evsel__nr_cpus(struct evsel *evsel) in evsel__nr_cpus() argument
163 return evsel__cpus(evsel)->nr; in evsel__nr_cpus()
169 void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
173 int (*init)(struct evsel *evsel),
174 void (*fini)(struct evsel *evsel));
176 struct perf_pmu *evsel__find_pmu(struct evsel *evsel);
177 bool evsel__is_aux_event(struct evsel *evsel);
179 struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx);
181 static inline struct evsel *evsel__new(struct perf_event_attr *attr) in evsel__new()
186 struct evsel *evsel__clone(struct evsel *orig);
187 struct evsel *evsel__newtp_idx(const char *sys, const char *name, int idx);
192 static inline struct evsel *evsel__newtp(const char *sys, const char *name) in evsel__newtp()
197 struct evsel *evsel__new_cycles(bool precise);
201 void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
202 void evsel__exit(struct evsel *evsel);
203 void evsel__delete(struct evsel *evsel);
207 void evsel__config(struct evsel *evsel, struct record_opts *opts,
209 void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
213 void evsel__calc_id_pos(struct evsel *evsel);
225 const char *evsel__name(struct evsel *evsel);
227 const char *evsel__group_name(struct evsel *evsel);
228 int evsel__group_desc(struct evsel *evsel, char *buf, size_t size);
230 void __evsel__set_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
231 void __evsel__reset_sample_bit(struct evsel *evsel, enum perf_event_sample_format bit);
233 #define evsel__set_sample_bit(evsel, bit) \ argument
234 __evsel__set_sample_bit(evsel, PERF_SAMPLE_##bit)
236 #define evsel__reset_sample_bit(evsel, bit) \ argument
237 __evsel__reset_sample_bit(evsel, PERF_SAMPLE_##bit)
239 void evsel__set_sample_id(struct evsel *evsel, bool use_sample_identifier);
241 int evsel__set_filter(struct evsel *evsel, const char *filter);
242 int evsel__append_tp_filter(struct evsel *evsel, const char *filter);
243 int evsel__append_addr_filter(struct evsel *evsel, const char *filter);
244 int evsel__enable_cpu(struct evsel *evsel, int cpu);
245 int evsel__enable(struct evsel *evsel);
246 int evsel__disable(struct evsel *evsel);
247 int evsel__disable_cpu(struct evsel *evsel, int cpu);
249 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu);
250 int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads);
251 int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
253 void evsel__close(struct evsel *evsel);
257 void *evsel__rawptr(struct evsel *evsel, struct perf_sample *sample, const char *name);
258 u64 evsel__intval(struct evsel *evsel, struct perf_sample *sample, const char *name);
260 static inline char *evsel__strval(struct evsel *evsel, struct perf_sample *sample, const char *name) in evsel__strval() argument
262 return evsel__rawptr(evsel, sample, name); in evsel__strval()
269 struct tep_format_field *evsel__field(struct evsel *evsel, const char *name);
271 #define evsel__match(evsel, t, c) \ argument
272 (evsel->core.attr.type == PERF_TYPE_##t && \
273 evsel->core.attr.config == PERF_COUNT_##c)
275 static inline bool evsel__match2(struct evsel *e1, struct evsel *e2) in evsel__match2()
281 int evsel__read_counter(struct evsel *evsel, int cpu, int thread);
283 int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale);
292 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread) in evsel__read_on_cpu() argument
294 return __evsel__read_on_cpu(evsel, cpu, thread, false); in evsel__read_on_cpu()
304 static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu, int thread) in evsel__read_on_cpu_scaled() argument
306 return __evsel__read_on_cpu(evsel, cpu, thread, true); in evsel__read_on_cpu_scaled()
309 int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
312 int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
315 static inline struct evsel *evsel__next(struct evsel *evsel) in evsel__next() argument
317 return list_entry(evsel->core.node.next, struct evsel, core.node); in evsel__next()
320 static inline struct evsel *evsel__prev(struct evsel *evsel) in evsel__prev() argument
322 return list_entry(evsel->core.node.prev, struct evsel, core.node); in evsel__prev()
332 static inline bool evsel__is_group_leader(const struct evsel *evsel) in evsel__is_group_leader() argument
334 return evsel->leader == evsel; in evsel__is_group_leader()
345 static inline bool evsel__is_group_event(struct evsel *evsel) in evsel__is_group_event() argument
350 return evsel__is_group_leader(evsel) && evsel->core.nr_members > 1; in evsel__is_group_event()
353 bool evsel__is_function_event(struct evsel *evsel);
355 static inline bool evsel__is_bpf_output(struct evsel *evsel) in evsel__is_bpf_output() argument
357 return evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT); in evsel__is_bpf_output()
360 static inline bool evsel__is_clock(struct evsel *evsel) in evsel__is_clock() argument
362 return evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK) || in evsel__is_clock()
363 evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK); in evsel__is_clock()
366 bool evsel__fallback(struct evsel *evsel, int err, char *msg, size_t msgsize);
367 int evsel__open_strerror(struct evsel *evsel, struct target *target,
370 static inline int evsel__group_idx(struct evsel *evsel) in evsel__group_idx() argument
372 return evsel->idx - evsel->leader->idx; in evsel__group_idx()
377 for ((_evsel) = list_entry((_leader)->core.node.next, struct evsel, core.node); \
379 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
385 (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
387 static inline bool evsel__has_branch_callstack(const struct evsel *evsel) in evsel__has_branch_callstack() argument
389 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK; in evsel__has_branch_callstack()
392 static inline bool evsel__has_branch_hw_idx(const struct evsel *evsel) in evsel__has_branch_hw_idx() argument
394 return evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX; in evsel__has_branch_hw_idx()
397 static inline bool evsel__has_callchain(const struct evsel *evsel) in evsel__has_callchain() argument
403 return evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN || in evsel__has_callchain()
404 evsel->synth_sample_type & PERF_SAMPLE_CALLCHAIN; in evsel__has_callchain()
407 static inline bool evsel__has_br_stack(const struct evsel *evsel) in evsel__has_br_stack() argument
413 return evsel->core.attr.sample_type & PERF_SAMPLE_BRANCH_STACK || in evsel__has_br_stack()
414 evsel->synth_sample_type & PERF_SAMPLE_BRANCH_STACK; in evsel__has_br_stack()
417 static inline bool evsel__is_dummy_event(struct evsel *evsel) in evsel__is_dummy_event() argument
419 return (evsel->core.attr.type == PERF_TYPE_SOFTWARE) && in evsel__is_dummy_event()
420 (evsel->core.attr.config == PERF_COUNT_SW_DUMMY); in evsel__is_dummy_event()
423 struct perf_env *evsel__env(struct evsel *evsel);
425 int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);