Skip to content

Commit 121aaee

Browse files
Steven Rostedt (Red Hat)rostedt
authored andcommitted
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 <[email protected]>
1 parent ce9bae5 commit 121aaee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

kernel/trace/trace.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5506,6 +5506,7 @@ static __init void create_trace_instances(struct dentry *d_tracer)
55065506
static void
55075507
init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
55085508
{
5509+
int cpu;
55095510

55105511
trace_create_file("trace_options", 0644, d_tracer,
55115512
tr, &tracing_iter_fops);
@@ -5538,12 +5539,15 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
55385539
trace_create_file("snapshot", 0644, d_tracer,
55395540
(void *)&tr->trace_cpu, &snapshot_fops);
55405541
#endif
5542+
5543+
for_each_tracing_cpu(cpu)
5544+
tracing_init_debugfs_percpu(tr, cpu);
5545+
55415546
}
55425547

55435548
static __init int tracer_init_debugfs(void)
55445549
{
55455550
struct dentry *d_tracer;
5546-
int cpu;
55475551

55485552
trace_access_lock_init();
55495553

@@ -5583,9 +5587,6 @@ static __init int tracer_init_debugfs(void)
55835587

55845588
create_trace_options_dir(&global_trace);
55855589

5586-
for_each_tracing_cpu(cpu)
5587-
tracing_init_debugfs_percpu(&global_trace, cpu);
5588-
55895590
return 0;
55905591
}
55915592

0 commit comments

Comments
 (0)