Thread (13 messages) 13 messages, 4 authors, 2024-05-13

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

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-04-09 14:58:53
Also in: lkml

On Mon,  8 Apr 2024 16:58:17 +0200
Michal Koutný [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -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];
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help