Skip to content

tracing: Addition of tracing instances via kernel command line

Steven Rostedt linux-trace-kernel lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v14 patches 8 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tracing: Add creation of instances at boot command lineDocumentation/admin-guide/kernel-parameters.txt kernel/trace/trace.c+56 -00 replies
2/4tracing: Add enabling of events to boot instancesDocumentation/admin-guide/kernel-parameters.txt kernel/trace/trace.c kernel/trace/trace.h +1 more+24 -50 replies
3/4tracing: Add trace_array_puts() to write into instanceinclude/linux/trace.h kernel/trace/trace.c+29 -100 replies
4/4tracing: Allow boot instances to have snapshot buffersDocumentation/admin-guide/kernel-parameters.txt kernel/trace/trace.c+81 -70 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchRoss Zwisler
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] tracing: Addition of tracing instances via kernel command line

Instance creation can happen with the bootconfig but there's currently no way to create and enable instances via the normal command line.

This series fixes that.

trace_instance=foo,sched_switch,sched_waking ftrace_boot_snapshot=foo

The above creates a "foo" instance at early start up and enables the sched_switch and sched_waking events. Then at the end of boot up a snapshot is taken so that user space does not overwrite the boot up data.

Changes since v1: https://lore.kernel.org/linux-trace-kernel/[email protected]/
- Fixed document grammar (Randy Dunlap)
- Removed extra workqueue.h include (Ross Zwisler)
- Use sizeof(boot_instance_info) than using COMMAND_LINE_SIZE)
- Remove unneeded @ip in kernel-doc (Ross Zwisler)
- Make stub function for do_allocate_snapshot() for !CONFIG_TRACER_MAX_TRACE (kernel test robot)
- Compare strstr() to NULL and not zero (kernel test robot)
- Use sizeof(boot_snapshot_info) instead of COMMAND_LINE_SIZE (Ross Zwisler)

Steven Rostedt (Google) (4):
tracing: Add creation of instances at boot command line
tracing: Add enabling of events to boot instances
tracing: Add trace_array_puts() to write into instance
tracing: Allow boot instances to have snapshot buffers

----

 Documentation/admin-guide/bootconfig.rst        |   6 +-
 Documentation/admin-guide/kernel-parameters.txt |  29 +++++
 include/linux/bootconfig.h                      |   2 +-
 include/linux/trace.h                           |  12 ++
 init/Kconfig                                    |  13 --
 init/main.c                                     |   2 +-
 kernel/trace/trace.c                            | 160 +++++++++++++++++++++---
 kernel/trace/trace.h                            |   2 +
 kernel/trace/trace_events.c                     |   9 +-
 9 files changed, 193 insertions(+), 42 deletions(-)