[PATCH v2 7/7] perf tools: Unset precise_ip when using SPE

From: James Clark
Date: Thu Jan 23 2020 - 11:08:53 EST


precise_ip is not supported on Arm and the kernel may be
updated to reflect this. So unset it when we know we can use
SPE to get precise data instead.

Signed-off-by: James Clark <james.clark@xxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Tan Xiaojun <tanxiaojun@xxxxxxxxxx>
Cc: Al Grant <al.grant@xxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/arm-spe.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 0fcaefd386a6..0ed2a68db0b3 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -937,6 +937,7 @@ void arm_spe_precise_ip_support(struct evlist *evlist, struct evsel *evsel)
evsel->core.attr.config = SPE_ATTR_TS_ENABLE
| SPE_ATTR_BRANCH_FILTER;
evsel->core.attr.config1 = SPE_ATTR_EV_BRANCH;
+ evsel->core.attr.precise_ip = 0;
}
}
}
--
2.25.0