]> Git Repo - linux.git/commit
tracing: Support to dump instance traces by ftrace_dump_on_oops
authorHuang Yiwei <[email protected]>
Fri, 23 Feb 2024 08:31:26 +0000 (16:31 +0800)
committerSteven Rostedt (Google) <[email protected]>
Mon, 18 Mar 2024 14:33:06 +0000 (10:33 -0400)
commit19f0423fd55c301c8edaea286e568ec657f42750
tree128ac4691ca60f9df0af61997c310ee138640919
parent0bdfb68c845edd7e2dbe815266bb09641576e22f
tracing: Support to dump instance traces by ftrace_dump_on_oops

Currently ftrace only dumps the global trace buffer on an OOPs. For
debugging a production usecase, instance trace will be helpful to
check specific problems since global trace buffer may be used for
other purposes.

This patch extend the ftrace_dump_on_oops parameter to dump a specific
or multiple trace instances:

  - ftrace_dump_on_oops=0: as before -- don't dump
  - ftrace_dump_on_oops[=1]: as before -- dump the global trace buffer
  on all CPUs
  - ftrace_dump_on_oops=2 or =orig_cpu: as before -- dump the global
  trace buffer on CPU that triggered the oops
  - ftrace_dump_on_oops=<instance_name>: new behavior -- dump the
  tracing instance matching <instance_name>
  - ftrace_dump_on_oops[=2/orig_cpu],<instance1_name>[=2/orig_cpu],
  <instrance2_name>[=2/orig_cpu]: new behavior -- dump the global trace
  buffer and multiple instance buffer on all CPUs, or only dump on CPU
  that triggered the oops if =2 or =orig_cpu is given

Also, the sysctl node can handle the input accordingly.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Ross Zwisler <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Huang Yiwei <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Documentation/admin-guide/kernel-parameters.txt
Documentation/admin-guide/sysctl/kernel.rst
include/linux/ftrace.h
include/linux/kernel.h
kernel/sysctl.c
kernel/trace/trace.c
kernel/trace/trace_selftest.c
This page took 0.062628 seconds and 4 git commands to generate.