Re: [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer on PID_MAX_DEFAULT

From: Steven Rostedt
Date: Tue Apr 09 2024 - 10:58:59 EST


On Mon, 8 Apr 2024 16:58:17 +0200
Michal Koutný <mkoutny@xxxxxxxx> wrote:

> @@ -294,7 +295,7 @@ static void __trace_find_cmdline(int pid, char comm[])
> return;
> }
>
> - tpid = pid & (PID_MAX_DEFAULT - 1);
> + tpid = pid % PID_MAP_SIZE;

Does that compile to the same? This is a fast path.

-- Steve


> map = savedcmd->map_pid_to_cmdline[tpid];
> if (map != NO_CMDLINE_MAP) {
> tpid = savedcmd->map_cmdline_to_pid[map];