Re: [PATCH v3 1/5] tools/rtla: Consolidate nr_cpus usage across all tools
From: Tomas Glozar
Date: Wed Mar 04 2026 - 10:28:50 EST
pá 13. 2. 2026 v 12:53 odesílatel Costa Shulyupin
<costa.shul@xxxxxxxxxx> napsal:
> --- a/tools/tracing/rtla/src/common.c
> +++ b/tools/tracing/rtla/src/common.c
> @@ -5,12 +5,14 @@
> #include <signal.h>
> #include <stdlib.h>
> #include <string.h>
> -#include <unistd.h>
> #include <getopt.h>
> +#include <sys/sysinfo.h>
> +
> #include "common.h"
>
> struct trace_instance *trace_inst;
> volatile int stop_tracing;
> +int nr_cpus;
>
This should be updated on top of the unit tests patchset [1] to also
include and initialize this global variable in tests, right? Without
that, unit tests fail to compile with undefined reference.
[1] https://lore.kernel.org/linux-trace-kernel/20260119105857.797498-1-costa.shul@xxxxxxxxxx/
Tomas