Skip to content

tracing: Fix ftrace_boot_snapshot command line

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instancekernel/trace/trace.c+7 -70 replies
2/2tracing: Fix ftrace_boot_snapshot command line logickernel/trace/trace.c+7 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/2 v2] tracing: Fix ftrace_boot_snapshot command line

While debugging some boot up code, I found that the snapshots were constantly triggering at boot up, even though there was no boot snapshot specified. Looking into it, I found there were too bugs.

1) It would trigger a snapshot on any instance if one was created from the kernel command line.

2) The error handling would only affect the top level instance. So the fact that a snapshot was done on a instance that didn't allocate a buffer triggered a warning written into the top level buffer, and worse yet, disabled the top level buffer.

Changes since v1: https://lore.kernel.org/linux-trace-kernel/[email protected]/

- My tests failed due to tr->allocated_snapshot only being a field when CONFIG_TRACE_MAX_TRACE is defined. And it doesn't make sense doing any of that logic if it is not, as snapshots depend on that config.

This addresses both of the above bugs.

Steven Rostedt (Google) (2):
tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance
tracing: Fix ftrace_boot_snapshot command line logic

----

 kernel/trace/trace.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)