Skip to contentSkip to conversation

Oprofilefs cant handle > 99 cpus

PATCH In review Anton Blanchard 3 participants 3 messages Apr 18, 2004 – Apr 19, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Oprofilefs cant handle > 99 cpus

Hi,

Oprofilefs cant handle > 99 cpus. This should fix it.

Anton

===== oprofile_stats.c 1.6 vs edited =====

oprofile_stats.c renamed from drivers/oprofile/oprofile_stats.c +1 -1
@@ -55,7 +55,7 @@
 			continue;
 
 		cpu_buf = &cpu_buffer[i]; 
-		snprintf(buf, 6, "cpu%d", i);
+		snprintf(buf, 10, "cpu%d", i);
 		cpudir = oprofilefs_mkdir(sb, dir, buf);
  
 		/* Strictly speaking access to these ulongs is racy,
#1 lore raw
Quoted 4 lines · Anton Blanchard

Hi,

Oprofilefs cant handle > 99 cpus. This should fix it.

right.

oprofile_stats.c line 61

Quoted 12 lines

===== oprofile_stats.c 1.6 vs edited =====

oprofile_stats.c renamed from drivers/oprofile/oprofile_stats.c +1 -1
@@ -55,7 +55,7 @@
 			continue;
 
 		cpu_buf = &cpu_buffer[i]; 
-		snprintf(buf, 6, "cpu%d", i);
+		snprintf(buf, 10, "cpu%d", i);
 		cpudir = oprofilefs_mkdir(sb, dir, buf);
 
 		/* Strictly speaking access to these ulongs is racy,

Andrew, can you apply this patch ?

regards,
Phil

#2 lore raw
In reply to Anton Blanchard

On Sun, 2004-04-18 21:06:58 +1000, Anton Blanchard <[email protected]> wrote in message <20040418110658.GC26086@krispykreme>:

Quoted 1 line

Oprofilefs cant handle > 99 cpus. This should fix it.

Erm, on what hardware are you testing? Some large POWER5 machine?

MfG, JBG

Signature · 4 lines
   Jan-Benedict Glaw       [email protected]    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));