Skip to content

tracing: Have tracepoint reg functions allowed to fail

Steven Rostedt lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tracing: Have the reg function allow to failarch/powerpc/include/asm/trace.h arch/powerpc/platforms/powernv/opal-tracepoints.c arch/powerpc/platforms/pseries/lpar.c +12 more+34 -200 replies
2/4tracing: Do not start benchmark on boot upkernel/trace/trace_benchmark.c+11 -10 replies
3/4tracing: Have system enable return error if one of the events failkernel/trace/trace_events.c+11 -20 replies
4/4tracing: Allow benchmark to be enabled at early_initcall()kernel/trace/trace_benchmark.c+12 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] tracing: Have tracepoint reg functions allowed to fail

I added a 'trace_event=*:*' to my command line and it crashed the system. The reason was because it enabled the tracepoint benchmark which has a reg function that creates a thread. But the kernel command line tracepoint enabling is done before the scheduler is set up, and thus the creation of a thread killed the kernel.

But then I noticed that there's no way for the reg to tell the calling function that it failed to set up. I changed that so that it can fail and notify the users that the tracepoint did not get enabled due to a failure.

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
ftrace/core

Head SHA1: 9d08cef4a375e171008ed3a041e930aae20cc940

Steven Rostedt (Red Hat) (4):
tracing: Have the reg function allow to fail
tracing: Do not start benchmark on boot up
tracing: Have system enable return error if one of the events fail
tracing: Allow benchmark to be enabled at early_initcall()

----

 arch/powerpc/include/asm/trace.h                  |  4 ++--
 arch/powerpc/platforms/powernv/opal-tracepoints.c |  6 ++++--
 arch/powerpc/platforms/pseries/lpar.c             |  6 ++++--
 arch/x86/include/asm/trace/exceptions.h           |  2 +-
 arch/x86/include/asm/trace/irq_vectors.h          |  2 +-
 arch/x86/kernel/tracepoint.c                      |  3 ++-
 drivers/i2c/i2c-core.c                            |  3 ++-
 include/linux/tracepoint-defs.h                   |  2 +-
 include/linux/tracepoint.h                        |  2 +-
 include/trace/events/i2c.h                        |  2 +-
 kernel/trace/trace_benchmark.c                    | 26 +++++++++++++++++++++--
 kernel/trace/trace_benchmark.h                    |  2 +-
 kernel/trace/trace_events.c                       | 13 ++++++++++--
 kernel/tracepoint.c                               | 12 ++++++++---
 samples/trace_events/trace-events-sample.c        |  3 ++-
 samples/trace_events/trace-events-sample.h        |  2 +-
 16 files changed, 67 insertions(+), 23 deletions(-)