aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <srostedt@redhat.com>2013-03-05 21:52:25 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 00:35:50 -0400
commit121aaee7b0a82605d33af200c7e9ebab6fd6e444 (patch)
treeaae2624780787bf1f2cf0c35a22b08fab0cf4f4a /kernel/trace/trace.c
parentce9bae55972b228cf7bac34350c4d2caf8ea0d0b (diff)
tracing: Add per_cpu directory into tracing instances
Add the per_cpu directory to the created tracing instances: cd /sys/kernel/debug/tracing/instances mkdir foo ls foo/per_cpu/cpu0 buffer_size_kb snapshot_raw trace trace_pipe_raw snapshot stats trace_pipe Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 17671bc9a4b1..c547ebbe36ff 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5506,6 +5506,7 @@ static __init void create_trace_instances(struct dentry *d_tracer)
5506static void 5506static void
5507init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer) 5507init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
5508{ 5508{
5509 int cpu;
5509 5510
5510 trace_create_file("trace_options", 0644, d_tracer, 5511 trace_create_file("trace_options", 0644, d_tracer,
5511 tr, &tracing_iter_fops); 5512 tr, &tracing_iter_fops);
@@ -5538,12 +5539,15 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
5538 trace_create_file("snapshot", 0644, d_tracer, 5539 trace_create_file("snapshot", 0644, d_tracer,
5539 (void *)&tr->trace_cpu, &snapshot_fops); 5540 (void *)&tr->trace_cpu, &snapshot_fops);
5540#endif 5541#endif
5542
5543 for_each_tracing_cpu(cpu)
5544 tracing_init_debugfs_percpu(tr, cpu);
5545
5541} 5546}
5542 5547
5543static __init int tracer_init_debugfs(void) 5548static __init int tracer_init_debugfs(void)
5544{ 5549{
5545 struct dentry *d_tracer; 5550 struct dentry *d_tracer;
5546 int cpu;
5547 5551
5548 trace_access_lock_init(); 5552 trace_access_lock_init();
5549 5553
@@ -5583,9 +5587,6 @@ static __init int tracer_init_debugfs(void)
5583 5587
5584 create_trace_options_dir(&global_trace); 5588 create_trace_options_dir(&global_trace);
5585 5589
5586 for_each_tracing_cpu(cpu)
5587 tracing_init_debugfs_percpu(&global_trace, cpu);
5588
5589 return 0; 5590 return 0;
5590} 5591}
5591 5592