Skip to content

RFC ftrace: ftrace location lookup speedup, and clean ups

Steven Rostedt lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ftrace: Sort all function addresses, not just per pageinclude/asm-generic/vmlinux.lds.h kernel/trace/ftrace.c+23 -130 replies
2/9ftrace: Remove extra helper functionskernel/trace/ftrace.c+24 -370 replies
3/9ftrace: Speed up search by skipping pages by addresskernel/trace/ftrace.c+16 -60 replies
4/9ftrace: Consolidate ftrace_location() and ftrace_text_reserved()kernel/trace/ftrace.c+40 -400 replies
5/9ftrace: Return record ip addr for ftrace_location()include/linux/ftrace.h kernel/trace/ftrace.c+11 -70 replies
6/9kprobes: Allow probe on ftrace reserved text (but move it)include/linux/ftrace.h include/linux/kprobes.h kernel/kprobes.c+15 -115 replies
7/9ftrace: Make ftrace_modify_all_code() global for archs to useinclude/linux/ftrace.h kernel/trace/ftrace.c+15 -80 replies
8/9ftrace/x86: Have x86 ftrace use the ftrace_modify_all_code()arch/x86/kernel/ftrace.c include/linux/ftrace.h kernel/trace/ftrace.c+5 -150 replies
9/9ftrace: Remove selecting FRAME_POINTER with FUNCTION_TRACERkernel/trace/Kconfig+0 -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/9][RFC] ftrace: ftrace location lookup speedup, and clean ups

These patches are based on a previous pull request:

http://comments.gmane.org/gmane.linux.kernel/1289098

(Hmm, LKML.org is missing April 27th and 28th, as that pull request
was on the 27th)

This code makes the search for an ftrace location done by kprobes much faster as it now does a binary search instead of a linear one. It also consolidates two functions ftrace_location() and ftrace_text_resevered() as on is for one addr, the other is for a range. The two functions still exist, but use the same search.

Some more clean ups are also made to the ftrace code.

These haven't been through all my tests yet, but if they survive this will be the patches I use for my next git pull request.

I would like these to make it into 3.5. Please comment if you have concerns.

Thanks!

-- Steve

Steven Rostedt (9):
ftrace: Sort all function addresses, not just per page
ftrace: Remove extra helper functions
ftrace: Speed up search by skipping pages by address
ftrace: Consolidate ftrace_location() and ftrace_text_reserved()
ftrace: Return record ip addr for ftrace_location()
kprobes: Allow probe on ftrace reserved text (but move it)
ftrace: Make ftrace_modify_all_code() global for archs to use ftrace/x86: Have x86 ftrace use the ftrace_modify_all_code()
ftrace: Remove selecting FRAME_POINTER with FUNCTION_TRACER

----

 arch/x86/kernel/ftrace.c          |   15 +--
 include/asm-generic/vmlinux.lds.h |    2 +-
 include/linux/ftrace.h            |    7 +-
 include/linux/kprobes.h           |    1 +
 kernel/kprobes.c                  |   13 ++-
 kernel/trace/Kconfig              |    1 -
 kernel/trace/ftrace.c             |  198 ++++++++++++++++++++-----------------
 7 files changed, 129 insertions(+), 108 deletions(-)