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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y908vNzJp7cVM8gN@kernel.org>
Date:   Fri, 3 Feb 2023 13:56:28 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     John Garry <john.g.garry@...cle.com>,
        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>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Kim Phillips <kim.phillips@....com>,
        Florian Fischer <florian.fischer@...q.space>,
        Ravi Bangoria <ravi.bangoria@....com>,
        Xing Zhengjun <zhengjun.xing@...ux.intel.com>,
        Rob Herring <robh@...nel.org>,
        Kang Minchul <tegongkang@...il.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Sandipan Das <sandipan.das@....com>,
        Jing Zhang <renyu.zj@...ux.alibaba.com>,
        linuxppc-dev@...ts.ozlabs.org, Kajol Jain <kjain@...ux.ibm.com>,
        Stephane Eranian <eranian@...gle.com>,
        Perry Taylor <perry.taylor@...el.com>,
        Caleb Biggers <caleb.biggers@...el.com>
Subject: Re: [PATCH v1] perf pmu: Fix aarch64 build

Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > I tried bisecting, but at this cset:
> > 
> > acme@...-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@...-rk3399-pc:~/git/perf$
> > 
> > I'm getting this:
> > 
> >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> >       |                                ^~~~~~~~~~~~~~~~~~~~
> >   CC      /tmp/build/perf/builtin-ftrace.o
> >   CC      /tmp/build/perf/builtin-help.o
> >   CC      /tmp/build/perf/builtin-buildid-list.o
> > cc1: all warnings being treated as errors
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > 
> > <SNIP>
> > 
> >   CC      /tmp/build/perf/tests/attr.o
> > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~
> >       |                        perf_pmu__find_by_type
> > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > make[3]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > 
> > -----
> > 
> > I'm building with:
> 
> So:
> 
> acme@...-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
> tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> acme@...-rk3399-pc:~/git/perf$
> acme@...-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@...-rk3399-pc:~/git/perf$
> 
> Tring to fix...

tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
strange as I build using O=, not to clutter the source dir, so perhaps
handling that is missing, I'll check.

Fixed aarch64 specific one with:

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 801bf52e2ea6..b4eaf00ec5a8 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
 	struct perf_pmu *pmu = pmu__find_core_pmu();
 
 	if (pmu)
-		return perf_pmu__find_table(pmu);
+		return perf_pmu__find_events_table(pmu);
 
 	return NULL;
 }


---

Continuing...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ