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] [day] [month] [year] [list]
Message-ID: <ZHYQndjJ/lR3soZy@kernel.org>
Date:   Tue, 30 May 2023 12:05:01 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     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>,
        Leo Yan <leo.yan@...aro.org>, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v1] perf kvm: Fix powerpc build

Em Mon, May 29, 2023 at 07:14:33PM -0700, Ian Rogers escreveu:
> Missed function rename from pmu_have_event to perf_pmus__have_event.
> 
> Fixes: 1eaf496ed386 ("perf pmu: Separate pmu and pmus")
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/arch/powerpc/util/kvm-stat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

[acme@...co perf-tools-next]$ grep perf_pmus__have_event tools/perf/util/*.h
tools/perf/util/pmus.h:bool perf_pmus__have_event(const char *pname, const char *name);
[acme@...co perf-tools-next]$ vim tools/perf/arch/powerpc/util/kvm-stat.c
[acme@...co perf-tools-next]$ grep -w perf_pmus__have_event tools/perf/util/*.h
tools/perf/util/pmus.h:bool perf_pmus__have_event(const char *pname, const char *name);
[acme@...co perf-tools-next]$ grep -w perf_pmus__have_event tools/perf/arch/powerpc/util/kvm-stat.c
		if (perf_pmus__have_event("trace_imc", "trace_cycles")) {
[acme@...co perf-tools-next]$ grep util\/pmus.h tools/perf/arch/powerpc/util/kvm-stat.c
[acme@...co perf-tools-next]$ 

I'm adding the missing explicit:

#include "util/pmus.h"

to tools/perf/arch/powerpc/util/kvm-stat.c, ok?

Also removing the now needless util/pmu.h include.

Thanks,

- Arnaldo
 
> diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/perf/arch/powerpc/util/kvm-stat.c
> index ea1220d66b67..1039e15c27c9 100644
> --- a/tools/perf/arch/powerpc/util/kvm-stat.c
> +++ b/tools/perf/arch/powerpc/util/kvm-stat.c
> @@ -204,7 +204,7 @@ int kvm_add_default_arch_event(int *argc, const char **argv)
>  
>  	parse_options(j, tmp, event_options, NULL, PARSE_OPT_KEEP_UNKNOWN);
>  	if (!event) {
> -		if (pmu_have_event("trace_imc", "trace_cycles")) {
> +		if (perf_pmus__have_event("trace_imc", "trace_cycles")) {
>  			argv[j++] = strdup("-e");
>  			argv[j++] = strdup("trace_imc/trace_cycles/");
>  			*argc += 2;
> -- 
> 2.41.0.rc0.172.g3f132b7071-goog
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ