From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: dwarves@vger.kernel.org
Subject: Re: [PATCH dwarves] pahole: only warn about multithreading in verbose mode
Date: Fri, 2 Aug 2024 10:44:19 -0300 [thread overview]
Message-ID: <Zqziswx7ua4B3Djv@x1> (raw)
In-Reply-To: <20240801095058.1946790-1-alan.maguire@oracle.com>
On Thu, Aug 01, 2024 at 10:50:58AM +0100, Alan Maguire wrote:
> For kernel builds, pahole is called with -j to specify multithreading
> as long as it is >= 1.22. However, if elfutils are older than 0.178
> at compile time, multithreading is not supported and we emit a
> warning to stderr. The problem is this message will be emitted each
> time pahole is run, and this translates to thousands of times in a
> kernel build (once for vmlinux and once for each module). Often users
> who are not familiar with BTF generation or pahole reasonably assume
> this is an error, whereas it is actually fine; it just means that
> pahole is a bit slower to generate BTF.
>
> Move the message to verbose mode only, as in debugging cases it is
> important to know if pahole is running in parallel.
Thanks, applied to tmp.perf-tools-next,
- Arnaldo
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> pahole.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/pahole.c b/pahole.c
> index dd5002a..4db5107 100644
> --- a/pahole.c
> +++ b/pahole.c
> @@ -1889,7 +1889,8 @@ static error_t pahole__options_parser(int key, char *arg,
> conf_load.nr_jobs = arg ? atoi(arg) :
> sysconf(_SC_NPROCESSORS_ONLN) * 1.1;
> #else
> - fputs("pahole: Multithreading requires elfutils >= 0.178. Continuing with a single thread...\n", stderr);
> + if (global_verbose)
> + fputs("pahole: Multithreading requires elfutils >= 0.178. Continuing with a single thread...\n", stderr);
> #endif
> break;
> case ARGP_btf_encode_detached:
> --
> 2.43.5
prev parent reply other threads:[~2024-08-02 13:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 9:50 [PATCH dwarves] pahole: only warn about multithreading in verbose mode Alan Maguire
2024-08-02 13:44 ` Arnaldo Carvalho de Melo [this message]
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=Zqziswx7ua4B3Djv@x1 \
--to=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=dwarves@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox