blob: fc4ab3fe877a22d191450a6bc4c75118cf71901d [file] [log] [blame]
John Kacur8b40f522009-09-24 18:02:18 +02001#ifndef __PERF_PARSE_EVENTS_H
2#define __PERF_PARSE_EVENTS_H
Ingo Molnar52425192009-05-26 09:17:18 +02003/*
4 * Parse symbolic events/counts passed in as options:
5 */
6
Jason Baron5beeded2009-07-21 14:16:29 -04007struct option;
8
Frederic Weisbecker1ef2ed12009-08-28 03:09:58 +02009struct tracepoint_path {
10 char *system;
11 char *name;
12 struct tracepoint_path *next;
13};
14
15extern struct tracepoint_path *tracepoint_id_to_path(u64 config);
Tom Zanussi63e0c772010-05-03 00:14:48 -050016extern bool have_tracepoints(struct perf_event_attr *pattrs, int nb_events);
Frederic Weisbecker1ef2ed12009-08-28 03:09:58 +020017
Ingo Molnara21ca2c2009-06-06 09:58:57 +020018extern int nr_counters;
Ingo Molnar52425192009-05-26 09:17:18 +020019
Ingo Molnarcdd6c482009-09-21 12:02:48 +020020extern struct perf_event_attr attrs[MAX_COUNTERS];
Li Zefanc171b552009-10-15 11:22:07 +080021extern char *filters[MAX_COUNTERS];
Ingo Molnar52425192009-05-26 09:17:18 +020022
Ingo Molnar83a09442009-08-15 12:26:57 +020023extern const char *event_name(int ctr);
24extern const char *__event_name(int type, u64 config);
Ingo Molnar8ad8db32009-05-26 11:10:09 +020025
26extern int parse_events(const struct option *opt, const char *str, int unset);
Li Zefanc171b552009-10-15 11:22:07 +080027extern int parse_filter(const struct option *opt, const char *str, int unset);
Ingo Molnar8ad8db32009-05-26 11:10:09 +020028
29#define EVENTS_HELP_MAX (128*1024)
30
Thomas Gleixner86847b62009-06-06 12:24:17 +020031extern void print_events(void);
Ingo Molnar8ad8db32009-05-26 11:10:09 +020032
Jason Baron5beeded2009-07-21 14:16:29 -040033extern char debugfs_path[];
34extern int valid_debugfs_mount(const char *debugfs);
35
Frederic Weisbecker1ef2ed12009-08-28 03:09:58 +020036
John Kacur8b40f522009-09-24 18:02:18 +020037#endif /* __PERF_PARSE_EVENTS_H */