[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191218075455.5106-7-tanxiaojun@huawei.com>
Date: Wed, 18 Dec 2019 15:54:55 +0800
From: Tan Xiaojun <tanxiaojun@...wei.com>
To: <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
<namhyung@...nel.org>, <ak@...ux.intel.com>,
<adrian.hunter@...el.com>, <yao.jin@...ux.intel.com>,
<tmricht@...ux.ibm.com>, <brueckner@...ux.ibm.com>,
<songliubraving@...com>, <gregkh@...uxfoundation.org>,
<kim.phillips@....com>, <James.Clark@....com>,
<jeremy.linton@....com>
CC: <gengdongjiu@...wei.com>, <wxf.wang@...ilicon.com>,
<liwei391@...wei.com>, <tanxiaojun@...wei.com>,
<liuqi115@...ilicon.com>, <huawei.libin@...wei.com>,
<linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>
Subject: [PATCH 6/6] perf tools: arm-spe: fix record hang after being terminated
From: Wei Li <liwei391@...wei.com>
If the spe event is terminated, we don't enable it again here.
Signed-off-by: Wei Li <liwei391@...wei.com>
Tested-by: Qi Liu <liuqi115@...ilicon.com>
---
tools/perf/arch/arm64/util/arm-spe.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index eba6541ec0f1..629badda724d 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -165,9 +165,13 @@ static int arm_spe_read_finish(struct auxtrace_record *itr, int idx)
struct evsel *evsel;
evlist__for_each_entry(sper->evlist, evsel) {
- if (evsel->core.attr.type == sper->arm_spe_pmu->type)
- return perf_evlist__enable_event_idx(sper->evlist,
- evsel, idx);
+ if (evsel->core.attr.type == sper->arm_spe_pmu->type) {
+ if (evsel->terminated)
+ return 0;
+ else
+ return perf_evlist__enable_event_idx(
+ sper->evlist, evsel, idx);
+ }
}
return -EINVAL;
}
--
2.17.1
Powered by blists - more mailing lists