diff options
Diffstat (limited to 'tools/perf/util/parse-events.h')
-rw-r--r-- | tools/perf/util/parse-events.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index ca069f893381..3fddd610d350 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h | |||
@@ -4,7 +4,9 @@ | |||
4 | * Parse symbolic events/counts passed in as options: | 4 | * Parse symbolic events/counts passed in as options: |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <stdbool.h> | ||
7 | #include "../../../include/linux/perf_event.h" | 8 | #include "../../../include/linux/perf_event.h" |
9 | #include "types.h" | ||
8 | 10 | ||
9 | struct list_head; | 11 | struct list_head; |
10 | struct perf_evsel; | 12 | struct perf_evsel; |
@@ -34,16 +36,17 @@ extern int parse_filter(const struct option *opt, const char *str, int unset); | |||
34 | #define EVENTS_HELP_MAX (128*1024) | 36 | #define EVENTS_HELP_MAX (128*1024) |
35 | 37 | ||
36 | enum { | 38 | enum { |
39 | PARSE_EVENTS__TERM_TYPE_NUM, | ||
40 | PARSE_EVENTS__TERM_TYPE_STR, | ||
41 | }; | ||
42 | |||
43 | enum { | ||
44 | PARSE_EVENTS__TERM_TYPE_USER, | ||
37 | PARSE_EVENTS__TERM_TYPE_CONFIG, | 45 | PARSE_EVENTS__TERM_TYPE_CONFIG, |
38 | PARSE_EVENTS__TERM_TYPE_CONFIG1, | 46 | PARSE_EVENTS__TERM_TYPE_CONFIG1, |
39 | PARSE_EVENTS__TERM_TYPE_CONFIG2, | 47 | PARSE_EVENTS__TERM_TYPE_CONFIG2, |
40 | PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD, | 48 | PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD, |
41 | PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE, | 49 | PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE, |
42 | PARSE_EVENTS__TERM_TYPE_NUM, | ||
43 | PARSE_EVENTS__TERM_TYPE_STR, | ||
44 | |||
45 | PARSE_EVENTS__TERM_TYPE_HARDCODED_MAX = | ||
46 | PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE, | ||
47 | }; | 50 | }; |
48 | 51 | ||
49 | struct parse_events__term { | 52 | struct parse_events__term { |
@@ -52,14 +55,16 @@ struct parse_events__term { | |||
52 | char *str; | 55 | char *str; |
53 | long num; | 56 | long num; |
54 | } val; | 57 | } val; |
55 | int type; | 58 | int type_val; |
56 | 59 | int type_term; | |
57 | struct list_head list; | 60 | struct list_head list; |
58 | }; | 61 | }; |
59 | 62 | ||
60 | int parse_events__is_hardcoded_term(struct parse_events__term *term); | 63 | int parse_events__is_hardcoded_term(struct parse_events__term *term); |
61 | int parse_events__new_term(struct parse_events__term **term, int type, | 64 | int parse_events__term_num(struct parse_events__term **_term, |
62 | char *config, char *str, long num); | 65 | int type_term, char *config, long num); |
66 | int parse_events__term_str(struct parse_events__term **_term, | ||
67 | int type_term, char *config, char *str); | ||
63 | void parse_events__free_terms(struct list_head *terms); | 68 | void parse_events__free_terms(struct list_head *terms); |
64 | int parse_events_modifier(struct list_head *list __used, char *str __used); | 69 | int parse_events_modifier(struct list_head *list __used, char *str __used); |
65 | int parse_events_add_tracepoint(struct list_head *list, int *idx, | 70 | int parse_events_add_tracepoint(struct list_head *list, int *idx, |