[tip: perf/core] perf expr: Increase EXPR_MAX_OTHER to support metrics with more than 15 variables

From: tip-bot2 for Jiri Olsa
Date: Thu Mar 19 2020 - 10:12:07 EST


The following commit has been merged into the perf/core branch of tip:

Commit-ID: 58ca707636dc44c8803a098fb68129f64272f151
Gitweb: https://git.kernel.org/tip/58ca707636dc44c8803a098fb68129f64272f151
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
AuthorDate: Fri, 28 Feb 2020 10:36:14 +01:00
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitterDate: Mon, 09 Mar 2020 21:43:24 -03:00

perf expr: Increase EXPR_MAX_OTHER to support metrics with more than 15 variables

We have metrics that define more than 15 variables, like
Branch_Misprediction_Cost. Increasing the allowed variables count to 20.

As Andy pointed out, we can't go too high in here, because some of the
code has O(n^2) complexity (already_seen) and we might want to do some
other changes (like using hash tables) before increasing the maximum
even more.

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: John Garry <john.garry@xxxxxxxxxx>
Cc: Kajol Jain <kjain@xxxxxxxxxxxxx>
Cc: Michael Petlan <mpetlan@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Ravi Bangoria <ravi.bangoria@xxxxxxxxxxxxx>
Link: http://lore.kernel.org/lkml/20200228093616.67125-4-jolsa@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/expr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h
index 9332796..df0a17d 100644
--- a/tools/perf/util/expr.h
+++ b/tools/perf/util/expr.h
@@ -2,7 +2,7 @@
#ifndef PARSE_CTX_H
#define PARSE_CTX_H 1

-#define EXPR_MAX_OTHER 15
+#define EXPR_MAX_OTHER 20
#define MAX_PARSE_ID EXPR_MAX_OTHER

struct parse_id {