[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e581ed83-97d2-f37e-b1c1-b13b24e601c8@arm.com>
Date: Wed, 15 Jan 2020 12:02:10 +0000
From: James Clark <James.Clark@....com>
To: Tan Xiaojun <tanxiaojun@...wei.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"acme@...nel.org" <acme@...nel.org>,
"alexander.shishkin@...ux.intel.com"
<alexander.shishkin@...ux.intel.com>,
"jolsa@...hat.com" <jolsa@...hat.com>,
"namhyung@...nel.org" <namhyung@...nel.org>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"yao.jin@...ux.intel.com" <yao.jin@...ux.intel.com>,
"tmricht@...ux.ibm.com" <tmricht@...ux.ibm.com>,
"brueckner@...ux.ibm.com" <brueckner@...ux.ibm.com>,
"songliubraving@...com" <songliubraving@...com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Kim Phillips <Kim.Phillips@....com>,
Jeremy Linton <Jeremy.Linton@....com>
CC: "gengdongjiu@...wei.com" <gengdongjiu@...wei.com>,
"wxf.wang@...ilicon.com" <wxf.wang@...ilicon.com>,
"liwei391@...wei.com" <liwei391@...wei.com>,
"liuqi115@...ilicon.com" <liuqi115@...ilicon.com>,
"huawei.libin@...wei.com" <huawei.libin@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
nd <nd@....com>
Subject: Re: [PATCH 6/6] perf tools: arm-spe: fix record hang after being
terminated
Hi Xiaojun,
I've tested this and it all seems to be working OK. I only have one final change to propose, that if we unset precise_ip, along with this change
http://lists.infradead.org/pipermail/linux-arm-kernel/2020-January/705720.html we will get feedback if an event is not supported in precise mode.
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 0fcaefd386a6..a3c23d289482 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;
}
}
}
Thanks
James
On 18/12/2019 07:54, Tan Xiaojun wrote:
> 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;
> }
>
Powered by blists - more mailing lists