[PATCH dwarves] pahole: only warn about multithreading in verbose mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux