[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 4/5] xen/perfc: Cleanup
On Thu, 2 Jan 2025, Andrew Cooper wrote: > * 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> > --- > CC: Jan Beulich <JBeulich@xxxxxxxx> > CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> > CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> > CC: Julien Grall <julien@xxxxxxx> > CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx> > CC: Bertrand Marquis <bertrand.marquis@xxxxxxx> > CC: Michal Orzel <michal.orzel@xxxxxxx> > CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> > CC: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx> > --- > 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 b748c8af855b..8302b7cf6db1 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 324b47665573..bf0eb032f7a9 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) > -- > 2.39.5 >
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |