Thread (40 messages) 40 messages, 3 authors, 2022-08-11

Re: [PATCH v4 10/17] perf pmu-events: Hide pmu_events_map

From: John Garry <hidden>
Date: 2022-08-11 14:47:44
Also in: linux-perf-users, lkml

On 10/08/2022 15:29, Ian Rogers wrote:
quoted
quoted
         _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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help