Skip to contentSkip to conversation

fix loop boundary of TYPE_ARRAY performance counters

PATCH New Jan Beulich 1 participant 1 message May 2, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix loop boundary of TYPE_ARRAY performance counters

Apparently a cut-and-paste like bug.

xen/common/perfc.c renamed from xen/common/perfc.c.0 +1 -1
@@ -116,7 +122,7 @@ void perfc_reset(unsigned char key)
             counters += NR_CPUS;
             break;
         case TYPE_ARRAY:
-            for ( j = 0; j < NR_CPUS; j++ )
+            for ( j = 0; j < perfc_info[i].nr_elements; j++ )
                 atomic_set(&counters[j],0);
         case TYPE_S_ARRAY:
             counters += perfc_info[i].nr_elements;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel