diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2010-06-03 06:26:24 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-07-20 22:05:34 -0400 |
commit | bc289ae98b75d93228d24f521ef02a076e506e94 (patch) | |
tree | 50d151d0fbde1b106932c0f80a2639839d261ca3 /include/linux/ftrace_event.h | |
parent | 985023dee6e212493831431ba2e3ce8918f001b2 (diff) |
tracing: Reduce latency and remove percpu trace_seq
__print_flags() and __print_symbolic() use percpu trace_seq:
1) Its memory is allocated at compile time, it wastes memory if we don't use tracing.
2) It is percpu data and it wastes more memory for multi-cpus system.
3) It disables preemption when it executes its core routine
"trace_seq_printf(s, "%s: ", #call);" and introduces latency.
So we move this trace_seq to struct trace_iterator.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4C078350.7090106@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r-- | include/linux/ftrace_event.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 2b7b1395b4d5..02b8b24f8f51 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -11,8 +11,6 @@ struct trace_array; | |||
11 | struct tracer; | 11 | struct tracer; |
12 | struct dentry; | 12 | struct dentry; |
13 | 13 | ||
14 | DECLARE_PER_CPU(struct trace_seq, ftrace_event_seq); | ||
15 | |||
16 | struct trace_print_flags { | 14 | struct trace_print_flags { |
17 | unsigned long mask; | 15 | unsigned long mask; |
18 | const char *name; | 16 | const char *name; |
@@ -58,6 +56,9 @@ struct trace_iterator { | |||
58 | struct ring_buffer_iter *buffer_iter[NR_CPUS]; | 56 | struct ring_buffer_iter *buffer_iter[NR_CPUS]; |
59 | unsigned long iter_flags; | 57 | unsigned long iter_flags; |
60 | 58 | ||
59 | /* trace_seq for __print_flags() and __print_symbolic() etc. */ | ||
60 | struct trace_seq tmp_seq; | ||
61 | |||
61 | /* The below is zeroed out in pipe_read */ | 62 | /* The below is zeroed out in pipe_read */ |
62 | struct trace_seq seq; | 63 | struct trace_seq seq; |
63 | struct trace_entry *ent; | 64 | struct trace_entry *ent; |