]> xenbits.xensource.com Git - xen.git/commitdiff
xen/perfc: Cleanup
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 29 Dec 2024 19:36:34 +0000 (19:36 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Jan 2025 11:50:25 +0000 (11:50 +0000)
 * Strip trailing whitspace.
 * Remove PRIperfc.  It has never been used and isn't useful.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/perfc.c
xen/include/xen/perfc.h

index b748c8af855b96c4860e882b1d315b688bfabc46..8302b7cf6db1cf7bb724f299f684052f9d3f4361 100644 (file)
@@ -46,7 +46,7 @@ void cf_check perfc_printall(unsigned char key)
         case TYPE_S_SINGLE:
             for_each_online_cpu ( cpu )
                 sum += per_cpu(perfcounters, cpu)[j];
-            if ( perfc_info[i].type == TYPE_S_SINGLE ) 
+            if ( perfc_info[i].type == TYPE_S_SINGLE )
                 sum = (perfc_t) sum;
             printk("TOTAL[%12Lu]", sum);
             if ( sum )
@@ -56,7 +56,7 @@ void cf_check perfc_printall(unsigned char key)
                 {
                     if ( k > 0 && (k % 4) == 0 )
                         printk("\n%53s", "");
-                    printk("  CPU%02u[%10"PRIperfc"u]", cpu, per_cpu(perfcounters, cpu)[j]);
+                    printk("  CPU%02u[%10u]", cpu, per_cpu(perfcounters, cpu)[j]);
                     ++k;
                 }
             }
@@ -71,7 +71,7 @@ void cf_check perfc_printall(unsigned char key)
                 for ( k = 0; k < perfc_info[i].nr_elements; k++ )
                     sum += counters[k];
             }
-            if ( perfc_info[i].type == TYPE_S_ARRAY ) 
+            if ( perfc_info[i].type == TYPE_S_ARRAY )
                 sum = (perfc_t) sum;
             printk("TOTAL[%12Lu]", sum);
             if (sum)
@@ -82,7 +82,7 @@ void cf_check perfc_printall(unsigned char key)
                     sum = 0;
                     for_each_online_cpu ( cpu )
                         sum += per_cpu(perfcounters, cpu)[j + k];
-                    if ( perfc_info[i].type == TYPE_S_ARRAY ) 
+                    if ( perfc_info[i].type == TYPE_S_ARRAY )
                         sum = (perfc_t) sum;
                     if ( (k % 4) == 0 )
                         printk("\n%16s", "");
@@ -98,7 +98,7 @@ void cf_check perfc_printall(unsigned char key)
                     sum = 0;
                     for ( n = 0; n < perfc_info[i].nr_elements; n++ )
                         sum += counters[n];
-                    if ( perfc_info[i].type == TYPE_S_ARRAY ) 
+                    if ( perfc_info[i].type == TYPE_S_ARRAY )
                         sum = (perfc_t) sum;
                     if ( k > 0 && (k % 4) == 0 )
                         printk("\n%53s", "");
index 324b47665573e8162affb00b0d7a9a8b1d8eb0cb..bf0eb032f7a9ab5fe86d1108f4afffbf651c398f 100644 (file)
@@ -8,24 +8,24 @@
 
 /*
  * NOTE: new counters must be defined in perfc_defn.h
- * 
+ *
  * Counter declarations:
  * PERFCOUNTER (counter, string)              define a new performance counter
  * PERFCOUNTER_ARRAY (counter, string, size)  define an array of counters
- * 
+ *
  * Unlike counters, status variables do not reset:
  * PERFSTATUS (counter, string)               define a new performance stauts
  * PERFSTATUS_ARRAY (counter, string, size)   define an array of status vars
- * 
- * unsigned long perfc_value  (counter)        get value of a counter  
+ *
+ * unsigned long perfc_value  (counter)        get value of a counter
  * unsigned long perfc_valuea (counter, index) get value of an array counter
- * unsigned long perfc_set  (counter, val)     set value of a counter  
+ * unsigned long perfc_set  (counter, val)     set value of a counter
  * unsigned long perfc_seta (counter, index, val) set value of an array counter
- * void perfc_incr  (counter)                  increment a counter          
+ * void perfc_incr  (counter)                  increment a counter
  * void perfc_decr  (counter)                  decrement a status
- * void perfc_incra (counter, index)           increment an array counter   
- * void perfc_add   (counter, value)           add a value to a counter     
- * void perfc_adda  (counter, index, value)    add a value to array counter 
+ * void perfc_incra (counter, index)           increment an array counter
+ * void perfc_add   (counter, value)           add a value to a counter
+ * void perfc_adda  (counter, index, value)    add a value to array counter
  * void perfc_print (counter)                  print out the counter
  */
 
@@ -49,7 +49,6 @@ enum {
 #undef PERFSTATUS_ARRAY
 
 typedef unsigned int perfc_t;
-#define PRIperfc ""
 
 DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters);
 
@@ -72,7 +71,7 @@ DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters);
         this_cpu(perfcounters)[PERFC_ ## x + (y)] = (v) : (v) )
 
 /*
- * Histogram: special treatment for 0 and 1 count. After that equally spaced 
+ * Histogram: special treatment for 0 and 1 count. After that equally spaced
  * with last bucket taking the rest.
  */
 #ifdef CONFIG_PERF_ARRAYS
@@ -98,7 +97,7 @@ int perfc_control(struct xen_sysctl_perfc_op *pc);
 extern void cf_check perfc_printall(unsigned char key);
 extern void cf_check perfc_reset(unsigned char key);
 
-    
+
 #else /* CONFIG_PERF_COUNTERS */
 
 #define perfc_value(x)    (0)