parse-events.h 1.1 KB
Newer Older
1 2
#ifndef __PERF_PARSE_EVENTS_H
#define __PERF_PARSE_EVENTS_H
3 4 5 6
/*
 * Parse symbolic events/counts passed in as options:
 */

7
#include "../../../include/linux/perf_event.h"
8 9 10 11

struct list_head;
struct perf_evsel;

12 13
struct option;

14 15 16 17 18 19 20
struct tracepoint_path {
	char *system;
	char *name;
	struct tracepoint_path *next;
};

extern struct tracepoint_path *tracepoint_id_to_path(u64 config);
21
extern bool have_tracepoints(struct list_head *evlist);
22

23
const char *event_type(int type);
24
const char *event_name(struct perf_evsel *event);
25
extern const char *__event_name(int type, u64 config);
26 27

extern int parse_events(const struct option *opt, const char *str, int unset);
L
Li Zefan 已提交
28
extern int parse_filter(const struct option *opt, const char *str, int unset);
29 30 31

#define EVENTS_HELP_MAX (128*1024)

32 33 34 35
void print_events(const char *event_glob);
void print_events_type(u8 type);
void print_tracepoint_events(const char *subsys_glob, const char *event_glob);
int print_hwcache_events(const char *event_glob);
36
extern int is_valid_tracepoint(const char *event_string);
37

38 39 40
extern char debugfs_path[];
extern int valid_debugfs_mount(const char *debugfs);

41
#endif /* __PERF_PARSE_EVENTS_H */