From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Hector Martin <marcan@marcan.st>,
Mark Rutland <mark.rutland@arm.com>,
Marc Zyngier <maz@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
James Clark <james.clark@arm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1] perf parse-events: Make legacy events lower priority than sysfs/json
Date: Fri, 24 Nov 2023 10:49:17 -0300 [thread overview]
Message-ID: <ZWCp3beoYHR8Ka2V@kernel.org> (raw)
In-Reply-To: <ZV/A3YhtMHsZZRQd@kernel.org>
Em Thu, Nov 23, 2023 at 06:15:09PM -0300, Arnaldo Carvalho de Melo escreveu:
>
> I'll collect those, but only after addressing these:
>
> [perfbuilder@five ~]$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-6.6.0-rc1.tar.xz
> [perfbuilder@five ~]$ time dm
> 1 100.09 almalinux:8 : FAIL clang version 15.0.7 (Red Hat 15.0.7-1.module_el8.8.0+3466+dfcbc058)
> util/parse-events.c:1461:6: error: variable 'alias_rewrote_terms' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized]
> if (!parse_state->fake_pmu && perf_pmu__check_alias(pmu, &parsed_terms,
> ^~~~~~~~~~~~~~~~~~~~~~
> util/parse-events.c:1477:6: note: uninitialized use occurs here
> if (alias_rewrote_terms &&
> ^~~~~~~~~~~~~~~~~~~
> util/parse-events.c:1461:6: note: remove the '&&' if its condition is always true
> if (!parse_state->fake_pmu && perf_pmu__check_alias(pmu, &parsed_terms,
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> util/parse-events.c:1401:26: note: initialize the variable 'alias_rewrote_terms' to silence this warning
> bool alias_rewrote_terms;
> ^
> = false
> 1 error generated.
> make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2
It built well with gcc but clang didn't notice that
perf_pmu__check_alias() unconditionally initializes that variable to
false as one of its first steps.
So I just did what clang suggested.
- Arnaldo
next prev parent reply other threads:[~2023-11-24 13:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 4:29 [RFC PATCH v1] perf parse-events: Make legacy events lower priority than sysfs/json Ian Rogers
2023-11-23 8:45 ` Hector Martin
2023-11-23 14:18 ` Arnaldo Carvalho de Melo
2023-11-23 21:15 ` Arnaldo Carvalho de Melo
2023-11-24 13:49 ` Arnaldo Carvalho de Melo [this message]
2023-11-23 14:37 ` Mark Rutland
2023-11-23 15:18 ` Ian Rogers
2023-11-23 21:49 ` Arnaldo Carvalho de Melo
2023-11-23 21:32 ` Arnaldo Carvalho de Melo
2023-11-24 11:19 ` Mark Rutland
2023-11-23 15:16 ` Marc Zyngier
2023-11-23 15:27 ` Ian Rogers
2023-11-23 16:09 ` Marc Zyngier
2023-11-23 17:59 ` Ian Rogers
2023-11-24 13:51 ` 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=ZWCp3beoYHR8Ka2V@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--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