lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 16 Dec 2020 11:41:10 +0000 From: John Garry <john.garry@...wei.com> To: Arnaldo Carvalho de Melo <acme@...nel.org> CC: Jiri Olsa <jolsa@...hat.com>, Alexei Budankov <abudankov@...wei.com>, "Jiri Olsa" <jolsa@...nel.org>, lkml <linux-kernel@...r.kernel.org>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Ingo Molnar <mingo@...nel.org>, Mark Rutland <mark.rutland@....com>, Namhyung Kim <namhyung@...nel.org>, "Alexander Shishkin" <alexander.shishkin@...ux.intel.com>, Michael Petlan <mpetlan@...hat.com>, Ian Rogers <irogers@...gle.com>, Stephane Eranian <eranian@...gle.com> Subject: Re: [BUG] jevents problem when cross building Re: [PATCH 2/3] perf tools: Allow to enable/disable events via control file On 10/12/2020 19:57, John Garry wrote: > Hi Arnaldo, > > Can you try this on top: > > ----8<----- > > From 201aa2cb7bc8723765afd84a5d3972248af0f0a1 Mon Sep 17 00:00:00 2001 > From: John Garry <john.garry@...wei.com> > Date: Thu, 10 Dec 2020 19:45:14 +0000 > Subject: [PATCH] perf jevents: Add system events table for empty mapping > > For architectures which have no PMU event lists - like arm32 - an empty > mapping table is printed. This is how the "pmu_events_map" symbol - > referenced in util/pmu.c::perf_pmu__find_map() - is created for those > architectures. > > Since pmu-events.c now includes a new table - "pmu_sys_event_tables" - > which is also referenced from util/pmu.c, also add this for the empty > mappings. > > Signed-off-by: John Garry <john.garry@...wei.com> > > diff --git a/tools/perf/pmu-events/jevents.c > b/tools/perf/pmu-events/jevents.c > index e930096ad713..28e20d9ec0f5 100644 > --- a/tools/perf/pmu-events/jevents.c > +++ b/tools/perf/pmu-events/jevents.c > @@ -816,19 +816,30 @@ static void print_mapping_test_table(FILE *outfp) > fprintf(outfp, "},\n"); > } > > +static void print_system_event_mapping_table_prefix(FILE *outfp) > +{ > + fprintf(outfp, "\nstruct pmu_sys_events pmu_sys_event_tables[] = {"); > +} > + > +static void print_system_event_mapping_table_suffix(FILE *outfp) > +{ > + fprintf(outfp, "\n\t{\n\t\t.table = 0\n\t},"); > + > + fprintf(outfp, "\n};\n"); > +} > + > static int process_system_event_tables(FILE *outfp) > { > struct sys_event_table *sys_event_table; > > - fprintf(outfp, "\nstruct pmu_sys_events pmu_sys_event_tables[] = {"); > + print_system_event_mapping_table_prefix(outfp); > > list_for_each_entry(sys_event_table, &sys_event_tables, list) { > fprintf(outfp, "\n\t{\n\t\t.table = %s,\n\t},", > sys_event_table->soc_id); > } > - fprintf(outfp, "\n\t{\n\t\t.table = 0\n\t},"); > > - fprintf(outfp, "\n};\n"); > + print_system_event_mapping_table_suffix(outfp); > > return 0; > } > @@ -938,6 +949,9 @@ static void create_empty_mapping(const char > *output_file) > fprintf(outfp, "#include \"pmu-events/pmu-events.h\"\n"); > print_mapping_table_prefix(outfp); > print_mapping_table_suffix(outfp); > + print_system_event_mapping_table_prefix(outfp); > + print_system_event_mapping_table_suffix(outfp); > + > fclose(outfp); > } > > ---->8---- > > Obviously I never tested building for one of test architectures which > does not use PMU events - sorry! > Hi Arnaldo, Just wondering if you have had any more problems here? Shall I send a formal patch? I tested that change and it looked ok. Thanks, John
Powered by blists - more mailing lists