Skip to contentSkip to conversation

xenalyze: increase MAX_CPUS

PATCH Applied Olaf Hering 2 participants 2 messages Jul 12, 2011 – Jul 14, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xenalyze: increase MAX_CPUS

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1310472861 -7200
# Node ID 1d7a842aecc538c794c78db93d141cdc5683882c # Parent 275dd17a6a36023ffa4e25f1b0d358c22af098b8
xenalyze: increase MAX_CPUS

On a large system xenalyze will refuse to process the trace file because it has an hardcoded limit of 32 cpus. The default of NR_CPUS in xen-unstable is
128. Increase the limit to match xen-unstable and also add an option to override the macro with a gcc cmdline option.

xenalyze.c +3 -1
diff -r 275dd17a6a36 -r 1d7a842aecc5 xenalyze.c
@@ -1618,7 +1618,9 @@ struct cr3_value_struct {
     } destroy;
 };
 
-#define MAX_CPUS 32
+#ifndef MAX_CPUS
+#define MAX_CPUS 128
+#endif
 typedef uint32_t cpu_mask_t;
 
 #define IDLE_DOMAIN 32767
#1 lore raw

Applied, thanks.
-George

Quoted 28 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1310472861 -7200
# Node ID 1d7a842aecc538c794c78db93d141cdc5683882c # Parent 275dd17a6a36023ffa4e25f1b0d358c22af098b8
xenalyze: increase MAX_CPUS

On a large system xenalyze will refuse to process the trace file because it has an hardcoded limit of 32 cpus. The default of NR_CPUS in xen-unstable is
128. Increase the limit to match xen-unstable and also add an option to override the macro with a gcc cmdline option.

diff -r 275dd17a6a36 -r 1d7a842aecc5 xenalyze.c

xenalyze.c +3 -1
@@ -1618,7 +1618,9 @@ struct cr3_value_struct {
     } destroy;
 };
 
-#define MAX_CPUS 32
+#ifndef MAX_CPUS
+#define MAX_CPUS 128
+#endif
 typedef uint32_t cpu_mask_t;
 
 #define IDLE_DOMAIN 32767