]> Git Repo - linux.git/commitdiff
tracing: Do not limit the size of the number of CPU buffers
authorSteven Rostedt <[email protected]>
Thu, 21 Oct 2010 01:51:26 +0000 (21:51 -0400)
committerSteven Rostedt <[email protected]>
Thu, 21 Oct 2010 12:55:06 +0000 (08:55 -0400)
The tracing per_cpu buffers were limited to 999 CPUs for a mear
savings in stack space of a char array. Up the array to 30 characters
which is more than enough to hold a 64 bit number.

Reported-by: Robin Holt <[email protected]>
Suggested-by: Ingo Molnar <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
kernel/trace/trace.c

index 001bcd2ccf4afb5170cb06d500bcff90844bf90e..82d9b8106cd078970ea0c7343e12ad2b6a6eed36 100644 (file)
@@ -3996,13 +3996,9 @@ static void tracing_init_debugfs_percpu(long cpu)
 {
        struct dentry *d_percpu = tracing_dentry_percpu();
        struct dentry *d_cpu;
-       /* strlen(cpu) + MAX(log10(cpu)) + '\0' */
-       char cpu_dir[7];
+       char cpu_dir[30]; /* 30 characters should be more than enough */
 
-       if (cpu > 999 || cpu < 0)
-               return;
-
-       sprintf(cpu_dir, "cpu%ld", cpu);
+       snprintf(cpu_dir, 30, "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);
This page took 0.064853 seconds and 4 git commands to generate.