[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0dff14dc-0287-71cf-72e8-0c8419c6fb3a@huawei.com>
Date: Thu, 11 Aug 2022 15:47:30 +0100
From: John Garry <john.garry@...wei.com>
To: Ian Rogers <irogers@...gle.com>
CC: Will Deacon <will@...nel.org>, James Clark <james.clark@....com>,
"Mike Leach" <mike.leach@...aro.org>, Leo Yan <leo.yan@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
"Arnaldo Carvalho de Melo" <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
"Zhengjun Xing" <zhengjun.xing@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Kan Liang <kan.liang@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-perf-users@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v4 10/17] perf pmu-events: Hide pmu_events_map
On 10/08/2022 15:29, Ian Rogers wrote:
>>> _args.output_file.write("""{
>>> @@ -389,6 +409,61 @@ static const struct pmu_sys_events pmu_sys_event_tables[] = {
>>> \t},
>>> };
>>>
>>> +const struct pmu_event *perf_pmu__find_table(struct perf_pmu *pmu)
>>> +{
>>> + const struct pmu_event *table = NULL;
>>> + char *cpuid = perf_pmu__getcpuid(pmu);
>> This seems an identical implementation to that in empty-pmu-events.c -
>> can we reduce this duplication? Maybe a seperate common c file which can
>> be linked in
>>
>> The indentation seems different also - this version seems to use whitespaces
> Agreed. Later on this will change, the empty version isn't compressed
> and the jevents.py one is. Having a common C file would defeat the
> goal of hiding the API, but ultimately we'd need to get rid of it in
> later changes when the empty/compressed implementations diverge.
ok, I suppose.. I have to say that this divergence is less then ideal
and I don't so like much all the difference in pmu-events/pmu-events.c
and pmu-events/empty-pmu-events.c
thanks,
John
Powered by blists - more mailing lists