public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Leo Yan <leo.yan@linaro.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH v1] perf kvm: Fix powerpc build
Date: Tue, 30 May 2023 12:05:01 -0300	[thread overview]
Message-ID: <ZHYQndjJ/lR3soZy@kernel.org> (raw)
In-Reply-To: <20230530021433.3107580-1-irogers@google.com>

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@canb.auug.org.au>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/arch/powerpc/util/kvm-stat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

[acme@quaco 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@quaco perf-tools-next]$ vim tools/perf/arch/powerpc/util/kvm-stat.c
[acme@quaco 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@quaco 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@quaco perf-tools-next]$ grep util\/pmus.h tools/perf/arch/powerpc/util/kvm-stat.c
[acme@quaco 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

      reply	other threads:[~2023-05-30 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30  2:14 [PATCH v1] perf kvm: Fix powerpc build Ian Rogers
2023-05-30 15:05 ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZHYQndjJ/lR3soZy@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox