Commit 121aaee7 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent ce9bae55
...@@ -5506,6 +5506,7 @@ static __init void create_trace_instances(struct dentry *d_tracer) ...@@ -5506,6 +5506,7 @@ static __init void create_trace_instances(struct dentry *d_tracer)
static void static void
init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer) init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
{ {
int cpu;
trace_create_file("trace_options", 0644, d_tracer, trace_create_file("trace_options", 0644, d_tracer,
tr, &tracing_iter_fops); tr, &tracing_iter_fops);
...@@ -5538,12 +5539,15 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer) ...@@ -5538,12 +5539,15 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
trace_create_file("snapshot", 0644, d_tracer, trace_create_file("snapshot", 0644, d_tracer,
(void *)&tr->trace_cpu, &snapshot_fops); (void *)&tr->trace_cpu, &snapshot_fops);
#endif #endif
for_each_tracing_cpu(cpu)
tracing_init_debugfs_percpu(tr, cpu);
} }
static __init int tracer_init_debugfs(void) static __init int tracer_init_debugfs(void)
{ {
struct dentry *d_tracer; struct dentry *d_tracer;
int cpu;
trace_access_lock_init(); trace_access_lock_init();
...@@ -5583,9 +5587,6 @@ static __init int tracer_init_debugfs(void) ...@@ -5583,9 +5587,6 @@ static __init int tracer_init_debugfs(void)
create_trace_options_dir(&global_trace); create_trace_options_dir(&global_trace);
for_each_tracing_cpu(cpu)
tracing_init_debugfs_percpu(&global_trace, cpu);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment