diff options
author | 2020-05-25 00:42:08 +0200 | |
---|---|---|
committer | 2020-05-28 10:03:28 -0300 | |
commit | 1244a32736f8f6a12e0959aa897813744122d690 (patch) | |
tree | 8217f11cd7b88b56ba2a6526fdc16b6fbb83ade4 /tools/perf/util/parse-events.l | |
parent | perf stat: Do not pass avg to generic_metric (diff) | |
download | linux-1244a32736f8f6a12e0959aa897813744122d690.tar.gz linux-1244a32736f8f6a12e0959aa897813744122d690.tar.bz2 linux-1244a32736f8f6a12e0959aa897813744122d690.zip |
perf parse: Add 'struct parse_events_state' pointer to scanner
We need to pass more data to the scanner so let's start with having it
to take pointer to 'struct parse_events_state' object instead of just
start token.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200524224219.234847-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.l')
-rw-r--r-- | tools/perf/util/parse-events.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 394132254447..002802e17059 100644 --- a/tools/perf/util/parse-events.l +++ b/tools/perf/util/parse-events.l @@ -209,10 +209,10 @@ modifier_bp [rwx]{1,3} %% %{ - { - int start_token; + struct parse_events_state *_parse_state = parse_events_get_extra(yyscanner); - start_token = parse_events_get_extra(yyscanner); + { + int start_token = _parse_state->stoken; if (start_token == PE_START_TERMS) BEGIN(config); @@ -220,7 +220,7 @@ modifier_bp [rwx]{1,3} BEGIN(event); if (start_token) { - parse_events_set_extra(NULL, yyscanner); + _parse_state->stoken = 0; /* * The flex parser does not init locations variable * via the scan_string interface, so we need do the |