aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/parse-events.h')
-rw-r--r--tools/perf/util/parse-events.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 5cb002894a17..3fddd610d350 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -36,16 +36,17 @@ extern int parse_filter(const struct option *opt, const char *str, int unset);
36#define EVENTS_HELP_MAX (128*1024) 36#define EVENTS_HELP_MAX (128*1024)
37 37
38enum { 38enum {
39 PARSE_EVENTS__TERM_TYPE_NUM,
40 PARSE_EVENTS__TERM_TYPE_STR,
41};
42
43enum {
44 PARSE_EVENTS__TERM_TYPE_USER,
39 PARSE_EVENTS__TERM_TYPE_CONFIG, 45 PARSE_EVENTS__TERM_TYPE_CONFIG,
40 PARSE_EVENTS__TERM_TYPE_CONFIG1, 46 PARSE_EVENTS__TERM_TYPE_CONFIG1,
41 PARSE_EVENTS__TERM_TYPE_CONFIG2, 47 PARSE_EVENTS__TERM_TYPE_CONFIG2,
42 PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD, 48 PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD,
43 PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE, 49 PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE,
44 PARSE_EVENTS__TERM_TYPE_NUM,
45 PARSE_EVENTS__TERM_TYPE_STR,
46
47 PARSE_EVENTS__TERM_TYPE_HARDCODED_MAX =
48 PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE,
49}; 50};
50 51
51struct parse_events__term { 52struct parse_events__term {
@@ -54,14 +55,16 @@ struct parse_events__term {
54 char *str; 55 char *str;
55 long num; 56 long num;
56 } val; 57 } val;
57 int type; 58 int type_val;
58 59 int type_term;
59 struct list_head list; 60 struct list_head list;
60}; 61};
61 62
62int parse_events__is_hardcoded_term(struct parse_events__term *term); 63int parse_events__is_hardcoded_term(struct parse_events__term *term);
63int parse_events__new_term(struct parse_events__term **term, int type, 64int parse_events__term_num(struct parse_events__term **_term,
64 char *config, char *str, long num); 65 int type_term, char *config, long num);
66int parse_events__term_str(struct parse_events__term **_term,
67 int type_term, char *config, char *str);
65void parse_events__free_terms(struct list_head *terms); 68void parse_events__free_terms(struct list_head *terms);
66int parse_events_modifier(struct list_head *list __used, char *str __used); 69int parse_events_modifier(struct list_head *list __used, char *str __used);
67int parse_events_add_tracepoint(struct list_head *list, int *idx, 70int parse_events_add_tracepoint(struct list_head *list, int *idx,