2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2011-01-11 20:56:53 -02:00
|
|
|
#ifndef __PERF_EVLIST_H
|
|
|
|
|
#define __PERF_EVLIST_H 1
|
|
|
|
|
|
2017-06-16 11:39:15 -03:00
|
|
|
#include <linux/compiler.h>
|
2017-04-17 11:39:06 -03:00
|
|
|
#include <linux/kernel.h>
|
2017-02-21 17:35:01 +02:00
|
|
|
#include <linux/refcount.h>
|
2011-01-11 20:56:53 -02:00
|
|
|
#include <linux/list.h>
|
2014-09-03 18:02:59 -03:00
|
|
|
#include <api/fd/array.h>
|
2011-11-04 09:10:59 -02:00
|
|
|
#include <stdio.h>
|
2011-01-12 22:39:13 -02:00
|
|
|
#include "../perf.h"
|
2011-01-15 10:40:59 -02:00
|
|
|
#include "event.h"
|
2012-08-14 16:42:15 -03:00
|
|
|
#include "evsel.h"
|
2017-10-06 10:31:47 -03:00
|
|
|
#include "mmap.h"
|
2011-11-04 09:10:59 -02:00
|
|
|
#include "util.h"
|
2017-04-19 15:49:18 -03:00
|
|
|
#include <signal.h>
|
2011-11-09 08:47:15 -02:00
|
|
|
#include <unistd.h>
|
2011-01-11 20:56:53 -02:00
|
|
|
|
2011-01-11 22:30:02 -02:00
|
|
|
struct pollfd;
|
2011-01-30 10:46:46 -02:00
|
|
|
struct thread_map;
|
|
|
|
|
struct cpu_map;
|
2013-12-19 14:43:45 -03:00
|
|
|
struct record_opts;
|
2011-01-11 22:30:02 -02:00
|
|
|
|
2011-01-12 22:39:13 -02:00
|
|
|
#define PERF_EVLIST__HLIST_BITS 8
|
|
|
|
|
#define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS)
|
|
|
|
|
|
2011-01-11 20:56:53 -02:00
|
|
|
struct perf_evlist {
|
|
|
|
|
struct list_head entries;
|
2011-01-12 22:39:13 -02:00
|
|
|
struct hlist_head heads[PERF_EVLIST__HLIST_SIZE];
|
2011-01-11 20:56:53 -02:00
|
|
|
int nr_entries;
|
2013-01-22 18:09:29 +09:00
|
|
|
int nr_groups;
|
2011-05-15 09:39:00 -03:00
|
|
|
int nr_mmaps;
|
2015-06-17 16:40:26 -03:00
|
|
|
bool enabled;
|
2015-09-08 10:58:52 +03:00
|
|
|
bool has_user_cpus;
|
2013-09-01 12:36:12 +02:00
|
|
|
size_t mmap_len;
|
2013-08-27 11:23:09 +03:00
|
|
|
int id_pos;
|
|
|
|
|
int is_pos;
|
|
|
|
|
u64 combined_sample_type;
|
2016-07-14 08:34:42 +00:00
|
|
|
enum bkw_mmap_state bkw_mmap_state;
|
2011-11-09 08:47:15 -02:00
|
|
|
struct {
|
|
|
|
|
int cork_fd;
|
|
|
|
|
pid_t pid;
|
|
|
|
|
} workload;
|
2014-09-03 18:02:59 -03:00
|
|
|
struct fdarray pollfd;
|
2011-01-12 22:39:13 -02:00
|
|
|
struct perf_mmap *mmap;
|
2017-12-04 16:51:07 +00:00
|
|
|
struct perf_mmap *overwrite_mmap;
|
2011-01-30 11:59:43 -02:00
|
|
|
struct thread_map *threads;
|
|
|
|
|
struct cpu_map *cpus;
|
2011-10-05 19:11:32 -03:00
|
|
|
struct perf_evsel *selected;
|
2015-02-14 14:50:11 -03:00
|
|
|
struct events_stats stats;
|
2015-08-28 05:48:05 -04:00
|
|
|
struct perf_env *env;
|
2017-12-08 21:13:41 +08:00
|
|
|
u64 first_sample_time;
|
|
|
|
|
u64 last_sample_time;
|
2011-01-11 20:56:53 -02:00
|
|
|
};
|
|
|
|
|
|
2011-11-28 17:57:40 -02:00
|
|
|
struct perf_evsel_str_handler {
|
|
|
|
|
const char *name;
|
|
|
|
|
void *handler;
|
|
|
|
|
};
|
|
|
|
|
|
2013-03-11 16:43:12 +09:00
|
|
|
struct perf_evlist *perf_evlist__new(void);
|
2013-09-01 12:36:14 +02:00
|
|
|
struct perf_evlist *perf_evlist__new_default(void);
|
2016-01-07 13:14:56 -03:00
|
|
|
struct perf_evlist *perf_evlist__new_dummy(void);
|
2011-01-30 11:59:43 -02:00
|
|
|
void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus,
|
|
|
|
|
struct thread_map *threads);
|
2011-01-18 21:41:45 -02:00
|
|
|
void perf_evlist__exit(struct perf_evlist *evlist);
|
2011-01-11 20:56:53 -02:00
|
|
|
void perf_evlist__delete(struct perf_evlist *evlist);
|
|
|
|
|
|
|
|
|
|
void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry);
|
2015-09-25 16:15:53 +03:00
|
|
|
void perf_evlist__remove(struct perf_evlist *evlist, struct perf_evsel *evsel);
|
2017-07-03 13:10:20 -03:00
|
|
|
|
|
|
|
|
int __perf_evlist__add_default(struct perf_evlist *evlist, bool precise);
|
|
|
|
|
|
|
|
|
|
static inline int perf_evlist__add_default(struct perf_evlist *evlist)
|
|
|
|
|
{
|
|
|
|
|
return __perf_evlist__add_default(evlist, true);
|
|
|
|
|
}
|
|
|
|
|
|
2012-05-30 13:53:54 -03:00
|
|
|
int __perf_evlist__add_default_attrs(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_event_attr *attrs, size_t nr_attrs);
|
2011-11-04 09:10:59 -02:00
|
|
|
|
2012-05-30 13:53:54 -03:00
|
|
|
#define perf_evlist__add_default_attrs(evlist, array) \
|
|
|
|
|
__perf_evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array))
|
2011-01-11 20:56:53 -02:00
|
|
|
|
2016-01-07 13:14:56 -03:00
|
|
|
int perf_evlist__add_dummy(struct perf_evlist *evlist);
|
|
|
|
|
|
2012-10-03 11:40:22 -03:00
|
|
|
int perf_evlist__add_newtp(struct perf_evlist *evlist,
|
|
|
|
|
const char *sys, const char *name, void *handler);
|
|
|
|
|
|
2016-04-11 18:37:45 -03:00
|
|
|
void __perf_evlist__set_sample_bit(struct perf_evlist *evlist,
|
|
|
|
|
enum perf_event_sample_format bit);
|
|
|
|
|
void __perf_evlist__reset_sample_bit(struct perf_evlist *evlist,
|
|
|
|
|
enum perf_event_sample_format bit);
|
|
|
|
|
|
|
|
|
|
#define perf_evlist__set_sample_bit(evlist, bit) \
|
|
|
|
|
__perf_evlist__set_sample_bit(evlist, PERF_SAMPLE_##bit)
|
|
|
|
|
|
|
|
|
|
#define perf_evlist__reset_sample_bit(evlist, bit) \
|
|
|
|
|
__perf_evlist__reset_sample_bit(evlist, PERF_SAMPLE_##bit)
|
|
|
|
|
|
2012-09-26 15:07:39 -03:00
|
|
|
int perf_evlist__set_filter(struct perf_evlist *evlist, const char *filter);
|
2015-02-21 10:09:55 -08:00
|
|
|
int perf_evlist__set_filter_pid(struct perf_evlist *evlist, pid_t pid);
|
2015-02-21 11:33:47 -08:00
|
|
|
int perf_evlist__set_filter_pids(struct perf_evlist *evlist, size_t npids, pid_t *pids);
|
2012-09-26 15:07:39 -03:00
|
|
|
|
2012-06-27 13:08:42 -03:00
|
|
|
struct perf_evsel *
|
|
|
|
|
perf_evlist__find_tracepoint_by_id(struct perf_evlist *evlist, int id);
|
|
|
|
|
|
2013-08-28 22:29:51 -06:00
|
|
|
struct perf_evsel *
|
|
|
|
|
perf_evlist__find_tracepoint_by_name(struct perf_evlist *evlist,
|
|
|
|
|
const char *name);
|
|
|
|
|
|
2011-03-10 11:15:54 -03:00
|
|
|
void perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel,
|
|
|
|
|
int cpu, int thread, u64 id);
|
2015-11-05 15:40:49 +01:00
|
|
|
int perf_evlist__id_add_fd(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_evsel *evsel,
|
|
|
|
|
int cpu, int thread, int fd);
|
2011-03-04 22:29:39 -03:00
|
|
|
|
2014-08-18 16:44:06 -03:00
|
|
|
int perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd);
|
|
|
|
|
int perf_evlist__alloc_pollfd(struct perf_evlist *evlist);
|
2014-08-12 23:04:11 -03:00
|
|
|
int perf_evlist__filter_pollfd(struct perf_evlist *evlist, short revents_and_mask);
|
|
|
|
|
|
2014-08-18 17:25:59 -03:00
|
|
|
int perf_evlist__poll(struct perf_evlist *evlist, int timeout);
|
|
|
|
|
|
2011-01-12 22:39:13 -02:00
|
|
|
struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id);
|
2015-09-25 16:15:52 +03:00
|
|
|
struct perf_evsel *perf_evlist__id2evsel_strict(struct perf_evlist *evlist,
|
|
|
|
|
u64 id);
|
2011-01-12 22:39:13 -02:00
|
|
|
|
2012-10-11 14:10:35 +02:00
|
|
|
struct perf_sample_id *perf_evlist__id2sid(struct perf_evlist *evlist, u64 id);
|
|
|
|
|
|
2016-07-14 08:34:42 +00:00
|
|
|
void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist, enum bkw_mmap_state state);
|
|
|
|
|
|
2013-10-24 15:43:33 +08:00
|
|
|
void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx);
|
|
|
|
|
|
2012-08-08 12:22:36 +02:00
|
|
|
int perf_evlist__open(struct perf_evlist *evlist);
|
2013-03-15 14:48:48 +09:00
|
|
|
void perf_evlist__close(struct perf_evlist *evlist);
|
2011-10-25 10:42:19 -02:00
|
|
|
|
2016-04-11 18:15:29 -03:00
|
|
|
struct callchain_param;
|
|
|
|
|
|
2013-08-27 11:23:09 +03:00
|
|
|
void perf_evlist__set_id_pos(struct perf_evlist *evlist);
|
|
|
|
|
bool perf_can_sample_identifier(void);
|
2015-07-21 12:44:04 +03:00
|
|
|
bool perf_can_record_switch_events(void);
|
2015-08-13 12:40:56 +03:00
|
|
|
bool perf_can_record_cpu_wide(void);
|
2016-04-11 18:15:29 -03:00
|
|
|
void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts,
|
|
|
|
|
struct callchain_param *callchain);
|
2013-12-19 14:43:45 -03:00
|
|
|
int record_opts__config(struct record_opts *opts);
|
2011-11-08 14:41:57 -02:00
|
|
|
|
2011-11-09 08:47:15 -02:00
|
|
|
int perf_evlist__prepare_workload(struct perf_evlist *evlist,
|
2013-11-12 16:46:16 -03:00
|
|
|
struct target *target,
|
2013-03-11 16:43:17 +09:00
|
|
|
const char *argv[], bool pipe_output,
|
2014-01-03 14:56:49 -03:00
|
|
|
void (*exec_error)(int signo, siginfo_t *info,
|
|
|
|
|
void *ucontext));
|
2011-11-09 08:47:15 -02:00
|
|
|
int perf_evlist__start_workload(struct perf_evlist *evlist);
|
|
|
|
|
|
2014-10-17 12:16:00 -03:00
|
|
|
struct option;
|
|
|
|
|
|
2015-04-09 18:53:46 +03:00
|
|
|
int __perf_evlist__parse_mmap_pages(unsigned int *mmap_pages, const char *str);
|
2013-09-01 12:36:12 +02:00
|
|
|
int perf_evlist__parse_mmap_pages(const struct option *opt,
|
|
|
|
|
const char *str,
|
|
|
|
|
int unset);
|
|
|
|
|
|
2016-04-15 17:46:31 -03:00
|
|
|
unsigned long perf_event_mlock_kb_in_pages(void);
|
|
|
|
|
|
2015-04-09 18:53:42 +03:00
|
|
|
int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
|
2017-12-03 02:00:38 +00:00
|
|
|
unsigned int auxtrace_pages,
|
2015-04-09 18:53:42 +03:00
|
|
|
bool auxtrace_overwrite);
|
2017-12-03 02:00:37 +00:00
|
|
|
int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages);
|
2011-01-30 11:59:43 -02:00
|
|
|
void perf_evlist__munmap(struct perf_evlist *evlist);
|
|
|
|
|
|
2017-01-09 10:51:59 +01:00
|
|
|
size_t perf_evlist__mmap_size(unsigned long pages);
|
|
|
|
|
|
2011-07-25 11:06:19 -03:00
|
|
|
void perf_evlist__disable(struct perf_evlist *evlist);
|
2011-08-25 10:17:55 -06:00
|
|
|
void perf_evlist__enable(struct perf_evlist *evlist);
|
2015-06-17 16:40:26 -03:00
|
|
|
void perf_evlist__toggle_enable(struct perf_evlist *evlist);
|
2011-07-25 11:06:19 -03:00
|
|
|
|
2014-07-31 09:00:56 +03:00
|
|
|
int perf_evlist__enable_event_idx(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_evsel *evsel, int idx);
|
2013-08-31 21:50:53 +03:00
|
|
|
|
2011-10-05 19:11:32 -03:00
|
|
|
void perf_evlist__set_selected(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_evsel *evsel);
|
|
|
|
|
|
2015-09-08 10:58:51 +03:00
|
|
|
void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus,
|
|
|
|
|
struct thread_map *threads);
|
2013-11-12 16:46:16 -03:00
|
|
|
int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target);
|
2015-03-24 19:23:47 -03:00
|
|
|
int perf_evlist__apply_filters(struct perf_evlist *evlist, struct perf_evsel **err_evsel);
|
2011-01-30 10:46:46 -02:00
|
|
|
|
2012-08-14 16:35:48 -03:00
|
|
|
void __perf_evlist__set_leader(struct list_head *list);
|
|
|
|
|
void perf_evlist__set_leader(struct perf_evlist *evlist);
|
|
|
|
|
|
2012-10-10 17:38:13 +02:00
|
|
|
u64 perf_evlist__read_format(struct perf_evlist *evlist);
|
2013-08-27 11:23:09 +03:00
|
|
|
u64 __perf_evlist__combined_sample_type(struct perf_evlist *evlist);
|
|
|
|
|
u64 perf_evlist__combined_sample_type(struct perf_evlist *evlist);
|
2015-07-18 08:24:47 -07:00
|
|
|
u64 perf_evlist__combined_branch_type(struct perf_evlist *evlist);
|
2012-08-14 16:42:15 -03:00
|
|
|
bool perf_evlist__sample_id_all(struct perf_evlist *evlist);
|
|
|
|
|
u16 perf_evlist__id_hdr_size(struct perf_evlist *evlist);
|
2011-05-21 17:49:00 +02:00
|
|
|
|
2012-08-02 12:23:46 -03:00
|
|
|
int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *event,
|
2012-09-26 12:48:18 -03:00
|
|
|
struct perf_sample *sample);
|
2012-08-02 11:42:57 -03:00
|
|
|
|
2017-08-03 13:10:28 +02:00
|
|
|
int perf_evlist__parse_sample_timestamp(struct perf_evlist *evlist,
|
|
|
|
|
union perf_event *event,
|
|
|
|
|
u64 *timestamp);
|
|
|
|
|
|
2012-08-14 16:42:15 -03:00
|
|
|
bool perf_evlist__valid_sample_type(struct perf_evlist *evlist);
|
|
|
|
|
bool perf_evlist__valid_sample_id_all(struct perf_evlist *evlist);
|
2012-10-10 17:38:13 +02:00
|
|
|
bool perf_evlist__valid_read_format(struct perf_evlist *evlist);
|
2012-01-27 15:34:20 +01:00
|
|
|
|
|
|
|
|
void perf_evlist__splice_list_tail(struct perf_evlist *evlist,
|
2015-09-08 10:58:53 +03:00
|
|
|
struct list_head *list);
|
2012-08-14 16:42:15 -03:00
|
|
|
|
2017-07-20 22:11:57 -07:00
|
|
|
static inline bool perf_evlist__empty(struct perf_evlist *evlist)
|
|
|
|
|
{
|
|
|
|
|
return list_empty(&evlist->entries);
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-14 16:42:15 -03:00
|
|
|
static inline struct perf_evsel *perf_evlist__first(struct perf_evlist *evlist)
|
|
|
|
|
{
|
|
|
|
|
return list_entry(evlist->entries.next, struct perf_evsel, node);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline struct perf_evsel *perf_evlist__last(struct perf_evlist *evlist)
|
|
|
|
|
{
|
|
|
|
|
return list_entry(evlist->entries.prev, struct perf_evsel, node);
|
|
|
|
|
}
|
2012-09-06 14:54:11 -03:00
|
|
|
|
|
|
|
|
size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp);
|
2013-02-05 14:12:42 -07:00
|
|
|
|
2013-10-17 17:38:29 -03:00
|
|
|
int perf_evlist__strerror_open(struct perf_evlist *evlist, int err, char *buf, size_t size);
|
2014-12-11 18:03:01 -03:00
|
|
|
int perf_evlist__strerror_mmap(struct perf_evlist *evlist, int err, char *buf, size_t size);
|
2013-10-17 12:07:58 -03:00
|
|
|
|
2013-12-11 14:36:29 +02:00
|
|
|
bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str);
|
2013-12-11 14:36:35 +02:00
|
|
|
void perf_evlist__to_front(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_evsel *move_evsel);
|
|
|
|
|
|
2014-01-10 10:37:27 -03:00
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* __evlist__for_each_entry - iterate thru all the evsels
|
2014-01-10 10:37:27 -03:00
|
|
|
* @list: list_head instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define __evlist__for_each_entry(list, evsel) \
|
2014-01-10 10:37:27 -03:00
|
|
|
list_for_each_entry(evsel, list, node)
|
|
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* evlist__for_each_entry - iterate thru all the evsels
|
2014-01-10 10:37:27 -03:00
|
|
|
* @evlist: evlist instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define evlist__for_each_entry(evlist, evsel) \
|
|
|
|
|
__evlist__for_each_entry(&(evlist)->entries, evsel)
|
2014-01-10 10:37:27 -03:00
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* __evlist__for_each_entry_continue - continue iteration thru all the evsels
|
2014-01-10 10:37:27 -03:00
|
|
|
* @list: list_head instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define __evlist__for_each_entry_continue(list, evsel) \
|
2014-01-10 10:37:27 -03:00
|
|
|
list_for_each_entry_continue(evsel, list, node)
|
|
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* evlist__for_each_entry_continue - continue iteration thru all the evsels
|
2014-01-10 10:37:27 -03:00
|
|
|
* @evlist: evlist instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define evlist__for_each_entry_continue(evlist, evsel) \
|
|
|
|
|
__evlist__for_each_entry_continue(&(evlist)->entries, evsel)
|
2014-01-10 10:37:27 -03:00
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* __evlist__for_each_entry_reverse - iterate thru all the evsels in reverse order
|
2014-01-10 10:37:27 -03:00
|
|
|
* @list: list_head instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define __evlist__for_each_entry_reverse(list, evsel) \
|
2014-01-10 10:37:27 -03:00
|
|
|
list_for_each_entry_reverse(evsel, list, node)
|
|
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* evlist__for_each_entry_reverse - iterate thru all the evsels in reverse order
|
2014-01-10 10:37:27 -03:00
|
|
|
* @evlist: evlist instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define evlist__for_each_entry_reverse(evlist, evsel) \
|
|
|
|
|
__evlist__for_each_entry_reverse(&(evlist)->entries, evsel)
|
2014-01-10 10:37:27 -03:00
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* __evlist__for_each_entry_safe - safely iterate thru all the evsels
|
2014-01-10 10:37:27 -03:00
|
|
|
* @list: list_head instance to iterate
|
|
|
|
|
* @tmp: struct evsel temp iterator
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define __evlist__for_each_entry_safe(list, tmp, evsel) \
|
2014-01-10 10:37:27 -03:00
|
|
|
list_for_each_entry_safe(evsel, tmp, list, node)
|
|
|
|
|
|
|
|
|
|
/**
|
2016-06-23 11:26:15 -03:00
|
|
|
* evlist__for_each_entry_safe - safely iterate thru all the evsels
|
2014-01-10 10:37:27 -03:00
|
|
|
* @evlist: evlist instance to iterate
|
|
|
|
|
* @evsel: struct evsel iterator
|
|
|
|
|
* @tmp: struct evsel temp iterator
|
|
|
|
|
*/
|
2016-06-23 11:26:15 -03:00
|
|
|
#define evlist__for_each_entry_safe(evlist, tmp, evsel) \
|
|
|
|
|
__evlist__for_each_entry_safe(&(evlist)->entries, tmp, evsel)
|
2013-12-11 14:36:29 +02:00
|
|
|
|
2014-07-31 09:00:52 +03:00
|
|
|
void perf_evlist__set_tracking_event(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_evsel *tracking_evsel);
|
2015-10-05 20:06:04 +02:00
|
|
|
|
|
|
|
|
void perf_event_attr__set_max_precise_ip(struct perf_event_attr *attr);
|
2016-02-22 09:10:33 +00:00
|
|
|
|
|
|
|
|
struct perf_evsel *
|
|
|
|
|
perf_evlist__find_evsel_by_str(struct perf_evlist *evlist, const char *str);
|
2016-07-10 13:07:53 +02:00
|
|
|
|
|
|
|
|
struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist,
|
|
|
|
|
union perf_event *event);
|
2017-11-14 11:01:06 -03:00
|
|
|
|
|
|
|
|
bool perf_evlist__exclude_kernel(struct perf_evlist *evlist);
|
2018-05-21 22:57:44 +08:00
|
|
|
|
|
|
|
|
void perf_evlist__force_leader(struct perf_evlist *evlist);
|
|
|
|
|
|
2018-10-01 12:59:26 -07:00
|
|
|
struct perf_evsel *perf_evlist__reset_weak_group(struct perf_evlist *evlist,
|
|
|
|
|
struct perf_evsel *evsel);
|
|
|
|
|
|
2011-01-11 20:56:53 -02:00
|
|
|
#endif /* __PERF_EVLIST_H */
|