summaryrefslogtreecommitdiff
path: root/tools/perf/util/expr.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-08-31 10:49:21 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-04 08:55:22 -0300
commit1a6abdde13bb6542e72dbe7a2219762795f0161a (patch)
treea00041993a11c6087c26f97879dc4c1fc9b72fe6 /tools/perf/util/expr.h
parent76ed5927ca6185f141336061c4865eb20048c288 (diff)
downloadlwn-1a6abdde13bb6542e72dbe7a2219762795f0161a.tar.gz
lwn-1a6abdde13bb6542e72dbe7a2219762795f0161a.zip
perf expr: Move the scanner_ctx into the parse_ctx
We currently maintain the two independently and copy from one to the other. This is a burden when additional scanner context values are necessary, so combine them. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Ahmad Yasin <ahmad.yasin@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Caleb Biggers <caleb.biggers@intel.com> Cc: Florian Fischer <florian.fischer@muhq.space> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.garry@huawei.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Miaoqian Lin <linmq006@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Perry Taylor <perry.taylor@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: https://lore.kernel.org/r/20220831174926.579643-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/expr.h')
-rw-r--r--tools/perf/util/expr.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h
index 0403a92d9dcc..07af3d438eb2 100644
--- a/tools/perf/util/expr.h
+++ b/tools/perf/util/expr.h
@@ -10,17 +10,17 @@
struct metric_ref;
+struct expr_scanner_ctx {
+ int runtime;
+};
+
struct expr_parse_ctx {
struct hashmap *ids;
- int runtime;
+ struct expr_scanner_ctx sctx;
};
struct expr_id_data;
-struct expr_scanner_ctx {
- int runtime;
-};
-
struct hashmap *ids__new(void);
void ids__free(struct hashmap *ids);
int ids__insert(struct hashmap *ids, const char *id);