linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Li, Tianyou" <tianyou.li@intel.com>
To: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	<linux-perf-users@vger.kernel.org>,
	"James Clark" <james.clark@linaro.org>
Subject: Re: [PATCH] perf annotate: Fix build with NO_SLANG=1
Date: Tue, 21 Oct 2025 12:45:23 +0800	[thread overview]
Message-ID: <a12268cc-3e7b-4432-a620-6a7400f1da4a@intel.com> (raw)
In-Reply-To: <20251021030750.254186-1-namhyung@kernel.org>

Hi Namhyung,

My bad. Thanks for taking time to fix this. I've tested with my ICX box 
with and without the patch. I can confirm the issue reproduced and fixed 
by your patch, tested through 'make NO_SLANG=1'. Sorry about the 
inconvenience. Thanks.

Regards,

Tianyou


On 10/21/2025 11:07 AM, Namhyung Kim wrote:
> The recent change for perf c2c annotate broke build without slang
> support like below.
>
>    builtin-annotate.c: In function 'hists__find_annotations':
>    builtin-annotate.c:522:73: error: 'NO_ADDR' undeclared (first use in this function); did you mean 'NR_ADDR'?
>      522 |                         key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR);
>          |                                                                         ^~~~~~~
>          |                                                                         NR_ADDR
>    builtin-annotate.c:522:73: note: each undeclared identifier is reported only once for each function it appears in
>
>    builtin-annotate.c:522:31: error: too many arguments to function 'hist_entry__tui_annotate'
>      522 |                         key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR);
>          |                               ^~~~~~~~~~~~~~~~~~~~~~~~
>    In file included from util/sort.h:6,
>                     from builtin-annotate.c:28:
>    util/hist.h:756:19: note: declared here
>      756 | static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
>          |                   ^~~~~~~~~~~~~~~~~~~~~~~~
>
> And I noticed that it missed to update the other side of #ifdef
> HAVE_SLANG_SUPPORT.  Let's fix it.
>
> Fixes: cd3466cd2639783d ("perf c2c: Add annotation support to perf c2c report")
> Cc: Tianyou Li <tianyou.li@intel.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>   tools/perf/util/hist.h | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
> index 6795816eee856e8f..1d5ea632ca4e1b0b 100644
> --- a/tools/perf/util/hist.h
> +++ b/tools/perf/util/hist.h
> @@ -709,12 +709,12 @@ struct block_hist {
>   	struct hist_entry	he;
>   };
>   
> +#define NO_ADDR 0
> +
>   #ifdef HAVE_SLANG_SUPPORT
>   #include "../ui/keysyms.h"
>   void attr_to_script(char *buf, struct perf_event_attr *attr);
>   
> -#define NO_ADDR 0
> -
>   int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,
>   			       struct evsel *evsel,
>   			       struct hist_browser_timer *hbt, u64 al_addr);
> @@ -748,14 +748,16 @@ int evlist__tui_browse_hists(struct evlist *evlist __maybe_unused,
>   static inline int __hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
>   					     struct map_symbol *ms __maybe_unused,
>   					     struct evsel *evsel __maybe_unused,
> -					     struct hist_browser_timer *hbt __maybe_unused)
> +					     struct hist_browser_timer *hbt __maybe_unused,
> +					     u64 al_addr __maybe_unused)
>   {
>   	return 0;
>   }
>   
>   static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
>   					   struct evsel *evsel __maybe_unused,
> -					   struct hist_browser_timer *hbt __maybe_unused)
> +					   struct hist_browser_timer *hbt __maybe_unused,
> +					   u64 al_addr __maybe_unused)
>   {
>   	return 0;
>   }

  reply	other threads:[~2025-10-21  4:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21  3:07 [PATCH] perf annotate: Fix build with NO_SLANG=1 Namhyung Kim
2025-10-21  4:45 ` Li, Tianyou [this message]
2025-10-22  0:39 ` Namhyung Kim

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=a12268cc-3e7b-4432-a620-6a7400f1da4a@intel.com \
    --to=tianyou.li@intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).