The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: adrian.hunter@intel.com, dapeng1.mi@linux.intel.com,
	james.clark@linaro.org, namhyung@kernel.org,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Li Guan <guanli.oerv@isrc.iscas.ac.cn>,
	9erthalion6@gmail.com, alex@ghiti.fr,
	alexander.shishkin@linux.intel.com,
	andrew.jones@oss.qualcomm.com, aou@eecs.berkeley.edu,
	atrajeev@linux.ibm.com, howardchu95@gmail.com,
	john.g.garry@oracle.com, jolsa@kernel.org, leo.yan@linux.dev,
	libunwind-devel@nongnu.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	linux-riscv@lists.infradead.org, mingo@redhat.com,
	palmer@dabbelt.com, peterz@infradead.org, pjw@kernel.org,
	shimin.guo@skydio.com, tglozar@redhat.com, tmricht@linux.ibm.com,
	will@kernel.org
Subject: Re: [PATCH v5 1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection
Date: Fri, 15 May 2026 08:27:53 -0300	[thread overview]
Message-ID: <agcDOac0qbP1KZ4Y@x1> (raw)
In-Reply-To: <agZk-CCrLUMTyWE4@x1>

On Thu, May 14, 2026 at 09:12:40PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, May 13, 2026 at 04:31:45PM -0700, Ian Rogers wrote:

<SNIP>

> > +++ b/tools/perf/util/unwind.h

<SNIP>

> > +static inline int libdw__get_entries(unwind_entry_cb_t cb __maybe_unused, void *arg __maybe_unused,
> > +				     struct thread *thread __maybe_unused,
> > +				     struct perf_sample *data __maybe_unused,
> > +				     int max_stack __maybe_unused,
> > +				     bool best_effort __maybe_unused)
> > +{
> > +	pr_err("Error: libdw dwarf unwinding not built into perf\n");
> > +	return 0;
> > +}
> > +#endif

I also addressed this local sashiko review comment:

-------------------------------------------------------------------------
Since unwinding is performed per-sample in the hot path, will using pr_err()
here cause console flooding if the user explicitly configures an unsupported
unwind style?
Should this use pr_warning_once() instead, similar to the UNWIND_STYLE_UNKNOWN
fallback behavior in unwind.c?
-------------------------------------------------------------------------

And in one other place, please ack,

- Arnaldo

diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index 28db3e3b9b513401..69ba08afda792d17 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -53,7 +53,7 @@ static inline int libdw__get_entries(unwind_entry_cb_t cb __maybe_unused, void *
 				     int max_stack __maybe_unused,
 				     bool best_effort __maybe_unused)
 {
-	pr_err("Error: libdw dwarf unwinding not built into perf\n");
+	pr_warning_once("Error: libdw dwarf unwinding not built into perf\n");
 	return 0;
 }
 #endif
@@ -81,7 +81,7 @@ static inline int libunwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
 					 int max_stack __maybe_unused,
 					 bool best_effort __maybe_unused)
 {
-	pr_err("Error: libunwind dwarf unwinding not built into perf\n");
+	pr_warning_once("Error: libunwind dwarf unwinding not built into perf\n");
 	return 0;
 }
 

  reply	other threads:[~2026-05-15 11:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260413024805.1316480-1-irogers@google.com>
2026-05-13 23:31 ` [PATCH v5 0/7] perf libunwind multiple remote support Ian Rogers
2026-05-13 23:31   ` [PATCH v5 1/7] perf unwind: Refactor get_entries to allow dynamic libdw/libunwind selection Ian Rogers
2026-05-15  0:12     ` Arnaldo Carvalho de Melo
2026-05-15 11:27       ` Arnaldo Carvalho de Melo [this message]
2026-05-13 23:31   ` [PATCH v5 2/7] tools build: Deduplicate test-libunwind for different architectures Ian Rogers
2026-05-13 23:31   ` [PATCH v5 3/7] perf build: Be more programmatic when setting up libunwind variables Ian Rogers
2026-05-13 23:31   ` [PATCH v5 4/7] perf unwind-libunwind: Make libunwind register reading cross platform Ian Rogers
2026-05-13 23:31   ` [PATCH v5 5/7] perf unwind-libunwind: Move flush/finish access out of local Ian Rogers
2026-05-13 23:31   ` [PATCH v5 6/7] perf unwind-libunwind: Remove libunwind-local Ian Rogers
2026-05-13 23:31   ` [PATCH v5 7/7] perf unwind-libunwind: Add RISC-V libunwind support Ian Rogers
2026-05-14 16:51   ` [PATCH v5 0/7] perf libunwind multiple remote support Ian Rogers
2026-05-15  0:01     ` Arnaldo Carvalho de Melo
2026-05-15  0:28       ` Arnaldo Carvalho de Melo

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=agcDOac0qbP1KZ4Y@x1 \
    --to=acme@kernel.org \
    --cc=9erthalion6@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=alex@ghiti.fr \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=atrajeev@linux.ibm.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=guanli.oerv@isrc.iscas.ac.cn \
    --cc=howardchu95@gmail.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linux.dev \
    --cc=libunwind-devel@nongnu.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pjw@kernel.org \
    --cc=shimin.guo@skydio.com \
    --cc=tglozar@redhat.com \
    --cc=tmricht@linux.ibm.com \
    --cc=will@kernel.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