Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140804
b: refs/heads/master
c: 8656e7a
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Feb 26, 2009
1 parent 2e8fa54 commit 493762f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4abfb8d0da70e436013e5799338357e1e6a0832
refs/heads/master: 8656e7a2fa6afcd8682990f804a2a9674568738f
25 changes: 14 additions & 11 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3061,28 +3061,31 @@ struct dentry *tracing_dentry_percpu(void)
static void tracing_init_debugfs_percpu(long cpu)
{
struct dentry *d_percpu = tracing_dentry_percpu();
struct dentry *entry;
/* strlen(trace_pipe) + MAX(log10(cpu)) + '\0' */
char filename[17];
struct dentry *entry, *d_cpu;
/* strlen(cpu) + MAX(log10(cpu)) + '\0' */
char cpu_dir[7];

if (cpu > 999 || cpu < 0)
return;

/* per cpu trace_pipe */
sprintf(filename, "trace_pipe%ld", cpu);
sprintf(cpu_dir, "cpu%ld", cpu);
d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) {
pr_warning("Could not create debugfs '%s' entry\n", cpu_dir);
return;
}

entry = debugfs_create_file(filename, 0444, d_percpu,
/* per cpu trace_pipe */
entry = debugfs_create_file("trace_pipe", 0444, d_cpu,
(void *) cpu, &tracing_pipe_fops);
if (!entry)
pr_warning("Could not create debugfs '%s' entry\n", filename);
pr_warning("Could not create debugfs 'trace_pipe' entry\n");

/* per cpu trace */
sprintf(filename, "trace%ld", cpu);

entry = debugfs_create_file(filename, 0444, d_percpu,
entry = debugfs_create_file("trace", 0444, d_cpu,
(void *) cpu, &tracing_fops);
if (!entry)
pr_warning("Could not create debugfs '%s' entry\n", filename);
pr_warning("Could not create debugfs 'trace' entry\n");
}

#ifdef CONFIG_FTRACE_SELFTEST
Expand Down

0 comments on commit 493762f

Please sign in to comment.