tracing: trace_puts() and faster trace_printk()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | tracing: Add trace_puts() for even faster trace_printk() tracinginclude/ kernel/ kernel/ +3 more | +214 | 0 replies | |
| 2/4 | tracing: Optimize trace_printk() with one arg to use trace_puts()include/ | +22 | 0 replies | |
| 3/4 | tracing: Add internal ftrace trace_puts() for ftrace to usekernel/ kernel/ | +15 | 0 replies | |
| 4/4 | tracing: Let tracing_snapshot() be used by modules but not NMIkernel/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [for-next][PATCH 0/4] tracing: trace_puts() and faster trace_printk()
I thought I was done with my ftrace 3.10 patches, but oh well. There's a few more things that I want to do for 3.10.
I noticed that I used trace_printk() in my tracing_snapshot() in case it was used incorrectly, but then I realized that those caused the kernel to preallocate the trace_printk() context buffers all the time (1 page per context [4 of them], and per cpu). This was not what I wanted. Thus is started creating a special "internal to ftrace" use that would not need the context buffers. I added a trace_puts() for this and then realized that this would be nice for others to use as trace_printk(), even when doing a trace_bprintk(), still requires a scan of the fmt string when there are no arguments in use.
Then I thought it would be nice if the compiler just picked trace_puts() when trace_printk() had no args. Thus, I pulled out my old macro wizard robe, hat and wand and started playing again. And I came up with patch #2. :-)
These 4 patches are specific for using ftrace by developers, as the functions an not called anywhere and are only to be used when a developer is debugging their code.
Enjoy,
-- Steve
Steven Rostedt (Red Hat) (4):
tracing: Add trace_puts() for even faster trace_printk() tracing
tracing: Optimize trace_printk() with one arg to use trace_puts()
tracing: Add internal ftrace trace_puts() for ftrace to use
tracing: Let tracing_snapshot() be used by modules but not NMI
----
include/linux/kernel.h | 64 +++++++++++++++++++++++++++- kernel/trace/trace.c | 94 ++++++++++++++++++++++++++++++++++++++++-- kernel/trace/trace.h | 13 ++++++ kernel/trace/trace_entries.h | 23 +++++++++-- kernel/trace/trace_output.c | 75 +++++++++++++++++++++++++++++++++ kernel/trace/trace_output.h | 2 + 6 files changed, 261 insertions(+), 10 deletions(-)