|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/perfc: Cleanup
commit 25492368ea429fe3357748660c72456b9ba16528
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Sun Dec 29 19:36:34 2024 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jan 7 11:50:25 2025 +0000
xen/perfc: Cleanup
* Strip trailing whitspace.
* Remove PRIperfc. It has never been used and isn't useful.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
xen/common/perfc.c | 10 +++++-----
xen/include/xen/perfc.h | 23 +++++++++++------------
2 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/xen/common/perfc.c b/xen/common/perfc.c
index b748c8af85..8302b7cf6d 100644
--- a/xen/common/perfc.c
+++ b/xen/common/perfc.c
@@ -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", "");
diff --git a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h
index 324b476655..bf0eb032f7 100644
--- a/xen/include/xen/perfc.h
+++ b/xen/include/xen/perfc.h
@@ -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)
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |