Skip to content

ftrace: clean ups and fixes

Steven Rostedt lkml 3 versions – Applied

Status from this message: i've merged them to tip/tracing/urgent, thanks Steve. There were a

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest12 patches 1 replyApplied
  2. v213 patches 9 repliesSuperseded
  3. v111 patches 22 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/12ftrace: handle generic arch callsscripts/Makefile.build scripts/recordmcount.pl+18 -30 replies
2/12ftrace: dynamic ftrace process only text sectionscripts/recordmcount.pl+14 -30 replies
3/12ftrace: return error on failed modified text.arch/x86/kernel/ftrace.c include/linux/ftrace.h kernel/trace/ftrace.c+44 -130 replies
4/12ftrace: comment arch ftrace codearch/x86/kernel/ftrace.c+6 -10 replies
5/12ftrace: use probe_kernelarch/x86/kernel/ftrace.c+3 -50 replies
6/12ftrace: only have ftrace_kill atomicinclude/linux/ftrace.h kernel/trace/ftrace.c kernel/trace/trace.c+4 -430 replies
7/12ftrace: add ftrace warn on to disable ftracekernel/trace/ftrace.c+19 -100 replies
8/12ftrace: disable dynamic ftrace for all archs that use daemonarch/arm/Kconfig arch/powerpc/Kconfig arch/sparc64/Kconfig+0 -30 replies
9/12ftrace: remove daemonkernel/trace/ftrace.c kernel/trace/trace_selftest.c+28 -2660 replies
10/12ftrace: remove mcount setarch/arm/kernel/ftrace.c arch/powerpc/kernel/ftrace.c arch/sparc64/kernel/ftrace.c +3 more+0 -650 replies
11/12ftrace: remove ftrace hashinclude/linux/ftrace.h kernel/trace/ftrace.c kernel/trace/trace.c+40 -2180 replies
12/12ftrace: remove notrace from arch ftrace filearch/powerpc/kernel/ftrace.c arch/sparc64/kernel/Makefile arch/sparc64/kernel/ftrace.c +2 more+17 -140 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH 00/12 v3] ftrace: clean ups and fixes

[
Changes since v2:

Typo corrections suggested by Wenji Huang.

Removed adding notrace to init sections. Right now it should not be an issue. If we deem that it is, we can add the patch later. It's a performance patch, but I have yet to measure if the improvement is even measurable.
]

This is a series of patches to make ftrace more robust and clean ups.

The first couple of patches fix the recordmount.pl script and changes it to only record the .text section functions. This means that the init sections will not be processed.

A FTRACE_WARN_ON is added to change all WARN_ONS to not only print a warning, but also to disable ftrace as well.

The later patches are a bit more drastic. Since the daemon is error prone, I stripped it out. In doing so, I have to disable dynamic ftrace from all archs that use it. The archs can get dynamic ftrace reenabled when they are ported to the recordmcount.pl method. (Arch maintainers, please contact me if you want help. I can do it with some information about your arch).

Since the hash was created to work with the daemon, that too was stripped out, making the remaining code smaller and cleaner. The kprobe hooks in ftrace may need to be reworked.

Thanks goes to Andrew Morton for his comments on the code as well as the spelling corrections made by Wenji Huang.

-- Steve