aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-events.l8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index dcfdafdc2f1c..6680e4fb7967 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -154,6 +154,10 @@ do { \
154 yycolumn += yyleng; \ 154 yycolumn += yyleng; \
155} while (0); 155} while (0);
156 156
157#define USER_REJECT \
158 yycolumn -= yyleng; \
159 REJECT
160
157%} 161%}
158 162
159%x mem 163%x mem
@@ -335,8 +339,8 @@ r{num_raw_hex} { return raw(yyscanner); }
335{num_hex} { return value(yyscanner, 16); } 339{num_hex} { return value(yyscanner, 16); }
336 340
337{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); } 341{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
338{bpf_object} { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_OBJECT); } 342{bpf_object} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); }
339{bpf_source} { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_SOURCE); } 343{bpf_source} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); }
340{name} { return pmu_str_check(yyscanner); } 344{name} { return pmu_str_check(yyscanner); }
341"/" { BEGIN(config); return '/'; } 345"/" { BEGIN(config); return '/'; }
342- { return '-'; } 346- { return '-'; }