Files
Masami Hiramatsu (Google) 49b0a3f605 tracing/probes: Add this_cpu_read() and this_cpu_ptr() dereference method to fetcharg
When tracing the kernel local variables, sometimes we need to get the
CPU local variables. To access it, current simple dereference is not
enough.

Thus, introduce a special this_cpu_read() dereference to access per-cpu
variable for the current CPU (accessing other CPU variable may race with
updates on other CPUs). Also this_cpu_ptr() is for accessing per-cpu
pointer.

Those are working as same as the kernel percpu macro.

Link: https://lore.kernel.org/all/178271367680.1176915.4711734074448973989.stgit@devnote2/

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
2026-07-14 22:43:16 +09:00
..