All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Liebold <simonlie@amazon.de>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	"Namhyung Kim" <namhyung@kernel.org>,
	Simon Liebold <simonlie@amazon.de>,
	Ian Rogers <irogers@google.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: [PATCH 6.1.y 0/2] Backport dependency commits for 616b14b47a86 ("perf build: Conditionally define NDEBUG")
Date: Thu, 25 Jun 2026 13:32:20 +0000	[thread overview]
Message-ID: <20260625133222.3412820-1-simonlie@amazon.de> (raw)

Hi, please backport the following two patches to 6.1.y:

- d1babea9c382 ("perf bench: Avoid NDEBUG warning")
- 984a785f25e5 ("perf block-range: Move debug code behind ifndef NDEBUG")

They are stable dependencies for commit 616b14b47a86 ("perf build: Conditionally
define NDEBUG") which was backported to v6.1.176 as 7bf35a0237d04.

That commit adds -DNDEBUG=1 to perf CFLAGS, which compiles out assert() calls,
leaving variables consumed only by asserts as unused-but-set. Combined with
-Werror this breaks the build:

    bench/find-bit-bench.c:64:22: error: variable 'old' set but not used
    util/block-range.c:20:13: error: variable 'old' set but not used

We need these two dependency patches, because both guard assert-only variables
with #ifndef NDEBUG so they are compiled out alongside the asserts they
validate.

Tested using our regression test suite including kselftest and LTP on various
EC2 instances.

Thanks.

- Simon

Ian Rogers (2):
  perf bench: Avoid NDEBUG warning
  perf block-range: Move debug code behind ifndef NDEBUG

 tools/perf/bench/find-bit-bench.c | 8 ++++++--
 tools/perf/util/block-range.c     | 6 +-----
 2 files changed, 7 insertions(+), 7 deletions(-)


base-commit: fdb6fcb41cc741ad5eaa7995f278dfcb94fdf795
-- 
2.50.1




Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597


             reply	other threads:[~2026-06-25 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 13:32 Simon Liebold [this message]
2026-06-25 13:32 ` [PATCH 6.1.y 1/2] perf bench: Avoid NDEBUG warning Simon Liebold
2026-06-25 13:32 ` [PATCH 6.1.y 2/2] perf block-range: Move debug code behind ifndef NDEBUG Simon Liebold
2026-06-26 17:54 ` [PATCH 6.1.y 0/2] Backport dependency commits for 616b14b47a86 ("perf build: Conditionally define NDEBUG") Sasha Levin

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=20260625133222.3412820-1-simonlie@amazon.de \
    --to=simonlie@amazon.de \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.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=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.