[PATCH stable 6.1 0/3] perf build fixes

Florian Fainelli posted 3 patches 5 days, 5 hours ago
There is a newer version of this series
tools/perf/Makefile.config     |  1 +
tools/perf/util/Build          | 12 ++++++++----
tools/perf/util/expr.y         |  4 +++-
tools/perf/util/parse-events.y |  3 +++
tools/perf/util/pmu.y          |  3 +++
5 files changed, 18 insertions(+), 5 deletions(-)
[PATCH stable 6.1 0/3] perf build fixes
Posted by Florian Fainelli 5 days, 5 hours ago
This patch series contains "perf" build fixes specific to 6.1. We have
seen occasional build failures in our CI looking like these:

util/parse-events-bison.c: In function 'yy_symbol_print':
util/parse-events-bison.c:901: error: unterminated #if
  901 | #if YYDEBUG
      |
util/parse-events-bison.c:1020:62: error: '_p' undeclared (first use in this function)
 1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
      |                                                              ^~
util/parse-events-bison.c:1020:62: note: each undeclared identifier is reported only once for each function it appears in
util/parse-events-bison.c:1020:64: error: expected ')' at end of input
 1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
      |                         ~                                      ^
      |                                                                )
 1021 |   YYFPRINTF (yyo, ")");
      |
util/parse-events-bison.c:1020:3: error: too few arguments to function 'yy_symbol_value_print'
 1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
      |   ^~~~~~~~~~~~~~~~~~~~~
util/parse-events-bison.c:991:1: note: declared here
  991 | yy_symbol_value_print (FILE *yyo,
      | ^~~~~~~~~~~~~~~~~~~~~

which are resolved by these patches.

Ian Rogers (3):
  perf build: Conditionally define NDEBUG
  perf parse-events: Make YYDEBUG dependent on doing a debug build
  perf build: Disable fewer bison warnings

 tools/perf/Makefile.config     |  1 +
 tools/perf/util/Build          | 12 ++++++++----
 tools/perf/util/expr.y         |  4 +++-
 tools/perf/util/parse-events.y |  3 +++
 tools/perf/util/pmu.y          |  3 +++
 5 files changed, 18 insertions(+), 5 deletions(-)

-- 
2.34.1
Re: [PATCH stable 6.1 0/3] perf build fixes
Posted by Sasha Levin 4 days, 9 hours ago
> This patch series contains "perf" build fixes specific to 6.1. We have
> seen occasional build failures in our CI looking like these:
[...]
> Ian Rogers (3):
>   perf build: Conditionally define NDEBUG
>   perf parse-events: Make YYDEBUG dependent on doing a debug build
>   perf build: Disable fewer bison warnings

Thanks for the series.

Patch 3/3 (ddc8e4c96692) has an upstream Fixes: follow-up,
878460e8d0ff8 ("perf build: Remove -Wno-unused-but-set-variable from
the flex flags when building with clang < 13.0.0"), which we need on
6.1 alongside 3/3 to keep clang<13 perf builds working. Without it,
3/3 unconditionally adds -Wno-unused-but-set-variable and drops the
-Wno-unknown-warning-option guard that was previously gated by
BISON_GE_35, so clang 11/12 fails under WERROR=1.

878460e8d0ff8 does not cherry-pick cleanly onto 6.1 - it references
the 'version-lt3' make macro (introduced by a9b451509565d, not in 6.1)
and bpf-filter-flex.o (no such file in 6.1's tools/perf). I wasn't
comfortable resolving that conflict blind on a 6.1-only perf change.

Could you send a v2 6.1 series that includes 878460e8d0ff8 adapted to
6.1 (or an equivalent 6.1-specific patch that preserves the
-Wno-unknown-warning-option guard for clang<13)? I'll queue the whole
thing once that piece is in.

--
Thanks,
Sasha
Re: [PATCH stable 6.1 0/3] perf build fixes
Posted by Ian Rogers 5 days, 5 hours ago
On Tue, May 19, 2026 at 11:51 AM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> This patch series contains "perf" build fixes specific to 6.1. We have
> seen occasional build failures in our CI looking like these:
>
> util/parse-events-bison.c: In function 'yy_symbol_print':
> util/parse-events-bison.c:901: error: unterminated #if
>   901 | #if YYDEBUG
>       |
> util/parse-events-bison.c:1020:62: error: '_p' undeclared (first use in this function)
>  1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
>       |                                                              ^~
> util/parse-events-bison.c:1020:62: note: each undeclared identifier is reported only once for each function it appears in
> util/parse-events-bison.c:1020:64: error: expected ')' at end of input
>  1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
>       |                         ~                                      ^
>       |                                                                )
>  1021 |   YYFPRINTF (yyo, ")");
>       |
> util/parse-events-bison.c:1020:3: error: too few arguments to function 'yy_symbol_value_print'
>  1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
>       |   ^~~~~~~~~~~~~~~~~~~~~
> util/parse-events-bison.c:991:1: note: declared here
>   991 | yy_symbol_value_print (FILE *yyo,
>       | ^~~~~~~~~~~~~~~~~~~~~
>
> which are resolved by these patches.

Lgtm, but the changes should be unnecessary as perf from Linux 7.1
should run on Linux 6.1 and with more and better features.

Thanks,
Ian

> Ian Rogers (3):
>   perf build: Conditionally define NDEBUG
>   perf parse-events: Make YYDEBUG dependent on doing a debug build
>   perf build: Disable fewer bison warnings
>
>  tools/perf/Makefile.config     |  1 +
>  tools/perf/util/Build          | 12 ++++++++----
>  tools/perf/util/expr.y         |  4 +++-
>  tools/perf/util/parse-events.y |  3 +++
>  tools/perf/util/pmu.y          |  3 +++
>  5 files changed, 18 insertions(+), 5 deletions(-)
>
> --
> 2.34.1
>
Re: [PATCH stable 6.1 0/3] perf build fixes
Posted by Florian Fainelli 5 days, 4 hours ago
On 5/19/26 11:55, Ian Rogers wrote:
> On Tue, May 19, 2026 at 11:51 AM Florian Fainelli
> <florian.fainelli@broadcom.com> wrote:
>>
>> This patch series contains "perf" build fixes specific to 6.1. We have
>> seen occasional build failures in our CI looking like these:
>>
>> util/parse-events-bison.c: In function 'yy_symbol_print':
>> util/parse-events-bison.c:901: error: unterminated #if
>>    901 | #if YYDEBUG
>>        |
>> util/parse-events-bison.c:1020:62: error: '_p' undeclared (first use in this function)
>>   1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
>>        |                                                              ^~
>> util/parse-events-bison.c:1020:62: note: each undeclared identifier is reported only once for each function it appears in
>> util/parse-events-bison.c:1020:64: error: expected ')' at end of input
>>   1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
>>        |                         ~                                      ^
>>        |                                                                )
>>   1021 |   YYFPRINTF (yyo, ")");
>>        |
>> util/parse-events-bison.c:1020:3: error: too few arguments to function 'yy_symbol_value_print'
>>   1020 |   yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, _parse_state, scanner);
>>        |   ^~~~~~~~~~~~~~~~~~~~~
>> util/parse-events-bison.c:991:1: note: declared here
>>    991 | yy_symbol_value_print (FILE *yyo,
>>        | ^~~~~~~~~~~~~~~~~~~~~
>>
>> which are resolved by these patches.
> 
> Lgtm, but the changes should be unnecessary as perf from Linux 7.1
> should run on Linux 6.1 and with more and better features.

That's a bit harder to ship logistically for us and likely for others as 
well where we expect a single source to build the kernel and its 
companion tools.
-- 
Florian