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: <YdyDsm6fzC+E2C0b@kernel.org>
Date:   Mon, 10 Jan 2022 16:06:26 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        John Garry <john.garry@...wei.com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        "Paul A . Clarke" <pc@...ibm.com>,
        Riccardo Mancini <rickyman7@...il.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Vineet Singh <vineet.singh@...el.com>,
        James Clark <james.clark@....com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>, coresight@...ts.linaro.org,
        linux-arm-kernel@...ts.infradead.org, zhengjun.xing@...el.com,
        eranian@...gle.com
Subject: Re: [PATCH v4 17/48] perf cpumap: Remove cpu_map__cpu, use libperf
 function.

Em Mon, Jan 10, 2022 at 04:04:08PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Jan 10, 2022 at 04:02:49PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Tue, Jan 04, 2022 at 10:13:20PM -0800, Ian Rogers escreveu:
> > > Switch the remaining few users of cpu_map__cpu to perf_cpu_map__cpu and
> > > remove the function.
> > > 
> > > Reviewed-by: James Clark <james.clark@....com>
> > > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > 
> > util/bpf_ftrace.c: In function ‘perf_ftrace__latency_prepare_bpf’:
> > util/bpf_ftrace.c:66:31: error: implicit declaration of function ‘cpu_map__cpu’; did you mean ‘cpu_map__has’? [-Werror=implicit-function-declaration]
> >    66 |                         cpu = cpu_map__cpu(ftrace->evlist->core.cpus, i);
> >       |                               ^~~~~~~~~~~~
> >       |                               cpu_map__has
> > cc1: all warnings being treated as errors
> > make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/util/bpf_ftrace.o] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> >   LD      /tmp/build/perf/ui/browsers/perf-in.o
> >   LD      /tmp/build/perf/ui/perf-in.o
> >   LD      /tmp/build/perf/util/scripting-engines/perf-in.o
> > make[3]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > make[2]: *** [Makefile.perf:665: /tmp/build/perf/perf-in.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [Makefile.perf:240: sub-make] Error 2
> > make: *** [Makefile:113: install-bin] Error 2
> > make: Leaving directory '/var/home/acme/git/perf/tools/perf'
> > 
> >  Performance counter stats for 'make -k BUILD_BPF_SKEL=1 CORESIGHT=1 PYTHON=python3 O=/tmp/build/perf -C tools/perf install-bin':
> > 
> >    163,635,422,196      cycles:u                                                    
> >    213,602,262,800      instructions:u            #    1.31  insn per cycle         
> > 
> >        3.804738555 seconds time elapsed
> > 
> >       40.622581000 seconds user
> >        6.589980000 seconds sys
> > 
> > 
> > ⬢[acme@...lbox perf]$ git log --oneline -1
> > dfe103e757aeff79 (HEAD) perf cpumap: Remove cpu_map__cpu, use libperf function.
> > 
> > This is the first breakage, trying to fix now.
> 
> ⬢[acme@...lbox perf]$ find tools/perf/ -name "*.c" | xargs grep -w cpu_map__cpu
> tools/perf/util/bpf_ftrace.c:			cpu = cpu_map__cpu(ftrace->evlist->core.cpus, i);
> ⬢[acme@...lbox perf]$
> 
> Only this one remaining, so just moving to perf_cpu_map__cpu() like done
> elsewhere in this patch.
> 

⬢[acme@...lbox perf]$ git diff
diff --git a/tools/perf/util/bpf_ftrace.c b/tools/perf/util/bpf_ftrace.c
index f00a2de6778ccb97..28dc4c60c7884818 100644
--- a/tools/perf/util/bpf_ftrace.c
+++ b/tools/perf/util/bpf_ftrace.c
@@ -63,7 +63,7 @@ int perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace)
                fd = bpf_map__fd(skel->maps.cpu_filter);

                for (i = 0; i < ncpus; i++) {
-                       cpu = cpu_map__cpu(ftrace->evlist->core.cpus, i);
+                       cpu = perf_cpu_map__cpu(ftrace->evlist->core.cpus, i);
                        bpf_map_update_elem(fd, &cpu, &val, BPF_ANY);
                }
        }
⬢[acme@...lbox perf]$

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ