tracing: Ensure optimized hashing works
PATCH v2 1/1 tracing: Ensure optimized hashing works
If ever PID_MAX_DEFAULT changes, it must be compatible with tracing hashmaps assumptions.
Signed-off-by Michal Koutný <[email protected]>
--- kernel/trace/trace_sched_switch.c | 2 ++ 1 file changed, 2 insertions(+)
v1 in https://lore.kernel.org/r/[email protected]/
- cohere with code (Steven)
kernel/trace/trace_sched_switch.c +2 -0
@@ -248,6 +248,8 @@ int trace_save_cmdline(struct task_struct *tsk)if (!tsk->pid)return 1 ; +BUILD_BUG_ON (!is_power_of_2 (PID_MAX_DEFAULT )); + tpid = tsk->pid & (PID_MAX_DEFAULT -1 );/*
Signature · 1 line
2.51.0