From: kajoljain <kjain@linux.ibm.com>
To: John Garry <john.garry@huawei.com>, Ian Rogers <irogers@google.com>
Cc: Will Deacon <will@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Leo Yan <leo.yan@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
linuxarm@huawei.com, "Liang, Kan" <kan.liang@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
zhangshaokun@hisilicon.com, Paul Clarke <pc@us.ibm.com>
Subject: Re: [PATCH v2 1/6] perf metricgroup: Make find_metric() public with name change
Date: Wed, 7 Apr 2021 11:09:03 +0530 [thread overview]
Message-ID: <e5fc65ef-b146-e677-43de-42482c755441@linux.ibm.com> (raw)
In-Reply-To: <4b406e70-9ff6-dd26-d9b7-78b094041651@huawei.com>
On 4/6/21 3:24 PM, John Garry wrote:
> On 02/04/2021 00:16, Ian Rogers wrote:
>> On Thu, Mar 25, 2021 at 3:38 AM John Garry <john.garry@huawei.com> wrote:
>>>
>>> Function find_metric() is required for the metric processing in the
>>> pmu-events testcase, so make it public. Also change the name to include
>>> "metricgroup".
>>
>> Would it make more sense as "pmu_events_map__find_metric" ?
>>
>
> So all functions apart from one in metricgroup.h are named metricgroup__XXX, so I was trying to keep this style - apart from the double-underscore (which can be remedied).
>
> Personally I don't think pmu_events_map__find_metric name fits with that convention.
I agree, most of the functions in metricgroup.c named as metricgroup__xxx. May be something like metricgroup__find_metric will be better.
Thanks,
Kajol Jain
>
> Thanks,
> John
>
>> Thanks,
>> Ian
>>
>>> Signed-off-by: John Garry <john.garry@huawei.com>
>>> ---
>>> tools/perf/util/metricgroup.c | 5 +++--
>>> tools/perf/util/metricgroup.h | 3 ++-
>>> 2 files changed, 5 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
>>> index 6acb44ad439b..71a13406e0bd 100644
>>> --- a/tools/perf/util/metricgroup.c
>>> +++ b/tools/perf/util/metricgroup.c
>>> @@ -900,7 +900,8 @@ static int __add_metric(struct list_head *metric_list,
>>> (match_metric(__pe->metric_group, __metric) || \
>>> match_metric(__pe->metric_name, __metric)))
>>>
>>> -static struct pmu_event *find_metric(const char *metric, struct pmu_events_map *map)
>>> +struct pmu_event *metrcgroup_find_metric(const char *metric,
>>> + struct pmu_events_map *map)
>>> {
>>> struct pmu_event *pe;
>>> int i;
>>> @@ -985,7 +986,7 @@ static int __resolve_metric(struct metric *m,
>>> struct expr_id *parent;
>>> struct pmu_event *pe;
>>>
>>> - pe = find_metric(cur->key, map);
>>> + pe = metrcgroup_find_metric(cur->key, map);
>>> if (!pe)
>>> continue;
>>>
>>> diff --git a/tools/perf/util/metricgroup.h b/tools/perf/util/metricgroup.h
>>> index ed1b9392e624..1674c6a36d74 100644
>>> --- a/tools/perf/util/metricgroup.h
>>> +++ b/tools/perf/util/metricgroup.h
>>> @@ -44,7 +44,8 @@ int metricgroup__parse_groups(const struct option *opt,
>>> bool metric_no_group,
>>> bool metric_no_merge,
>>> struct rblist *metric_events);
>>> -
>>> +struct pmu_event *metrcgroup_find_metric(const char *metric,
>>> + struct pmu_events_map *map);
>>> int metricgroup__parse_groups_test(struct evlist *evlist,
>>> struct pmu_events_map *map,
>>> const char *str,
>>> --
>>> 2.26.2
>>>
>> .
>>
>
_______________________________________________
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:[~2021-04-07 5:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 10:33 [PATCH v2 0/6] perf arm64 metricgroup support John Garry
2021-03-25 10:33 ` [PATCH v2 1/6] perf metricgroup: Make find_metric() public with name change John Garry
2021-04-01 23:16 ` Ian Rogers
2021-04-06 9:54 ` John Garry
2021-04-07 5:39 ` kajoljain [this message]
2021-03-25 10:33 ` [PATCH v2 2/6] perf test: Handle metric reuse in pmu-events parsing test John Garry
2021-04-01 13:49 ` Jiri Olsa
2021-04-06 11:00 ` John Garry
2021-04-06 12:17 ` Jiri Olsa
2021-04-06 12:43 ` John Garry
2021-04-06 12:55 ` Jiri Olsa
2021-04-06 13:21 ` John Garry
2021-04-06 13:34 ` Jiri Olsa
2021-04-06 13:38 ` John Garry
2021-03-25 10:33 ` [PATCH v2 3/6] perf pmu: Add pmu_events_map__find() John Garry
2021-03-25 10:33 ` [PATCH v2 4/6] perf vendor events arm64: Add Hisi hip08 L1 metrics John Garry
2021-03-25 10:33 ` [PATCH v2 5/6] perf vendor events arm64: Add Hisi hip08 L2 metrics John Garry
2021-03-25 10:33 ` [PATCH v2 6/6] perf vendor events arm64: Add Hisi hip08 L3 metrics John Garry
2021-03-25 20:39 ` [PATCH v2 0/6] perf arm64 metricgroup support Paul A. Clarke
2021-03-26 10:57 ` John Garry
2021-03-26 13:13 ` Paul A. Clarke
2021-03-29 21:07 ` Paul A. Clarke
2021-03-30 6:41 ` kajoljain
2021-04-06 11:02 ` John Garry
2021-04-06 12:18 ` Paul A. Clarke
2021-04-07 6:03 ` kajoljain
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=e5fc65ef-b146-e677-43de-42482c755441@linux.ibm.com \
--to=kjain@linux.ibm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=john.garry@huawei.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=pc@us.ibm.com \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
--cc=zhangshaokun@hisilicon.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).