From: Arnaldo Carvalho de Melo <acme@kernel.org> To: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Wei Li <liwei391@huawei.com>, leo.yan@linaro.org, Suzuki K Poulose <suzuki.poulose@arm.com>, Mike Leach <mike.leach@linaro.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Kim Phillips <kim.phillips@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, guohanjun@huawei.com Subject: Re: [PATCH v2 2/2] perf tools: ARM SPE code cleanup Date: Tue, 28 Jul 2020 08:42:34 -0300 [thread overview] Message-ID: <20200728114234.GA3328@kernel.org> (raw) In-Reply-To: <20200727203436.GC2381376@xps15> Em Mon, Jul 27, 2020 at 02:34:36PM -0600, Mathieu Poirier escreveu: > On Fri, Jul 24, 2020 at 03:11:11PM +0800, Wei Li wrote: > > - Firstly, the function auxtrace_record__init() will be invoked only > > once, the variable "arm_spe_pmus" will not be used afterwards, thus > > we don't need to check "arm_spe_pmus" is NULL or not; > > - Another reason is, even though SPE is micro-architecture dependent, > > but so far it only supports "statistical-profiling-extension-v1" and > > we have no chance to use multiple SPE's PMU events in Perf command. > > I find the above changelog somewhat out of touch with the patch itself. The > only thing that is happening here is the removal of a useless check and a fix > for a memory leak. > > Once again whether Arnaldo wants to make the changes by hand or not you may have > to resubmit. I'll fix it now, thanks for reviewing. - Arnaldo > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> > > > > > So remove the useless check code to make it clear. > > > > Signed-off-by: Wei Li <liwei391@huawei.com> > > --- > > tools/perf/arch/arm/util/auxtrace.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c > > index 28a5d0c18b1d..b187bddbd01a 100644 > > --- a/tools/perf/arch/arm/util/auxtrace.c > > +++ b/tools/perf/arch/arm/util/auxtrace.c > > @@ -57,17 +57,15 @@ struct auxtrace_record > > struct evsel *evsel; > > bool found_etm = false; > > struct perf_pmu *found_spe = NULL; > > - static struct perf_pmu **arm_spe_pmus = NULL; > > - static int nr_spes = 0; > > + struct perf_pmu **arm_spe_pmus = NULL; > > + int nr_spes = 0; > > int i = 0; > > > > if (!evlist) > > return NULL; > > > > cs_etm_pmu = perf_pmu__find(CORESIGHT_ETM_PMU_NAME); > > - > > - if (!arm_spe_pmus) > > - arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err); > > + arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err); > > > > evlist__for_each_entry(evlist, evsel) { > > if (cs_etm_pmu && > > @@ -84,6 +82,7 @@ struct auxtrace_record > > } > > } > > } > > + free(arm_spe_pmus); > > > > if (found_etm && found_spe) { > > pr_err("Concurrent ARM Coresight ETM and SPE operation not currently supported\n"); > > -- > > 2.17.1 > > -- - Arnaldo
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@kernel.org> To: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com>, Kim Phillips <kim.phillips@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, guohanjun@huawei.com, linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, leo.yan@linaro.org, Namhyung Kim <namhyung@kernel.org>, Wei Li <liwei391@huawei.com>, linux-arm-kernel@lists.infradead.org, Mike Leach <mike.leach@linaro.org> Subject: Re: [PATCH v2 2/2] perf tools: ARM SPE code cleanup Date: Tue, 28 Jul 2020 08:42:34 -0300 [thread overview] Message-ID: <20200728114234.GA3328@kernel.org> (raw) In-Reply-To: <20200727203436.GC2381376@xps15> Em Mon, Jul 27, 2020 at 02:34:36PM -0600, Mathieu Poirier escreveu: > On Fri, Jul 24, 2020 at 03:11:11PM +0800, Wei Li wrote: > > - Firstly, the function auxtrace_record__init() will be invoked only > > once, the variable "arm_spe_pmus" will not be used afterwards, thus > > we don't need to check "arm_spe_pmus" is NULL or not; > > - Another reason is, even though SPE is micro-architecture dependent, > > but so far it only supports "statistical-profiling-extension-v1" and > > we have no chance to use multiple SPE's PMU events in Perf command. > > I find the above changelog somewhat out of touch with the patch itself. The > only thing that is happening here is the removal of a useless check and a fix > for a memory leak. > > Once again whether Arnaldo wants to make the changes by hand or not you may have > to resubmit. I'll fix it now, thanks for reviewing. - Arnaldo > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> > > > > > So remove the useless check code to make it clear. > > > > Signed-off-by: Wei Li <liwei391@huawei.com> > > --- > > tools/perf/arch/arm/util/auxtrace.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c > > index 28a5d0c18b1d..b187bddbd01a 100644 > > --- a/tools/perf/arch/arm/util/auxtrace.c > > +++ b/tools/perf/arch/arm/util/auxtrace.c > > @@ -57,17 +57,15 @@ struct auxtrace_record > > struct evsel *evsel; > > bool found_etm = false; > > struct perf_pmu *found_spe = NULL; > > - static struct perf_pmu **arm_spe_pmus = NULL; > > - static int nr_spes = 0; > > + struct perf_pmu **arm_spe_pmus = NULL; > > + int nr_spes = 0; > > int i = 0; > > > > if (!evlist) > > return NULL; > > > > cs_etm_pmu = perf_pmu__find(CORESIGHT_ETM_PMU_NAME); > > - > > - if (!arm_spe_pmus) > > - arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err); > > + arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err); > > > > evlist__for_each_entry(evlist, evsel) { > > if (cs_etm_pmu && > > @@ -84,6 +82,7 @@ struct auxtrace_record > > } > > } > > } > > + free(arm_spe_pmus); > > > > if (found_etm && found_spe) { > > pr_err("Concurrent ARM Coresight ETM and SPE operation not currently supported\n"); > > -- > > 2.17.1 > > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-28 11:42 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-24 7:11 [PATCH v2 0/2] perf tools: Fix record failure when mixed with ARM SPE event Wei Li 2020-07-24 7:11 ` Wei Li 2020-07-24 7:11 ` [PATCH v2 1/2] " Wei Li 2020-07-24 7:11 ` Wei Li 2020-07-24 8:59 ` Leo Yan 2020-07-24 8:59 ` Leo Yan 2020-07-27 20:29 ` Mathieu Poirier 2020-07-27 20:29 ` Mathieu Poirier 2020-07-24 7:11 ` [PATCH v2 2/2] perf tools: ARM SPE code cleanup Wei Li 2020-07-24 7:11 ` Wei Li 2020-07-27 20:34 ` Mathieu Poirier 2020-07-27 20:34 ` Mathieu Poirier 2020-07-28 11:42 ` Arnaldo Carvalho de Melo [this message] 2020-07-28 11:42 ` Arnaldo Carvalho de Melo 2020-07-28 12:02 ` Arnaldo Carvalho de Melo 2020-07-28 12:02 ` Arnaldo Carvalho de Melo 2020-07-28 12:38 ` Leo Yan 2020-07-28 12:38 ` Leo Yan 2020-07-28 15:46 ` Mathieu Poirier 2020-07-28 15:46 ` Mathieu Poirier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200728114234.GA3328@kernel.org \ --to=acme@kernel.org \ --cc=alexander.shishkin@linux.intel.com \ --cc=guohanjun@huawei.com \ --cc=jolsa@redhat.com \ --cc=kim.phillips@arm.com \ --cc=leo.yan@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=liwei391@huawei.com \ --cc=mark.rutland@arm.com \ --cc=mathieu.poirier@linaro.org \ --cc=mike.leach@linaro.org \ --cc=mingo@redhat.com \ --cc=namhyung@kernel.org \ --cc=peterz@infradead.org \ --cc=suzuki.poulose@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.