[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Added back the printing of perfc arrays & histograms, under compile-time
ChangeSet 1.1423.1.49, 2005/05/10 13:41:09+01:00, mafetter@xxxxxxxxxxxxxxxx Added back the printing of perfc arrays & histograms, under compile-time control in xen/Rules.mk Rules.mk | 4 ++++ common/perfc.c | 8 ++++++++ include/xen/perfc.h | 4 ++++ 3 files changed, 16 insertions(+) diff -Nru a/xen/Rules.mk b/xen/Rules.mk --- a/xen/Rules.mk 2005-05-10 11:06:41 -04:00 +++ b/xen/Rules.mk 2005-05-10 11:06:41 -04:00 @@ -2,6 +2,7 @@ verbose ?= n debug ?= n perfc ?= n +perfc_arrays?= n trace ?= n optimize ?= y domu_debug ?= n @@ -54,6 +55,9 @@ ifeq ($(perfc),y) CFLAGS += -DPERF_COUNTERS +ifeq ($(perfc_arrays),y) +CFLAGS += -DPERF_ARRAYS +endif endif ifeq ($(trace),y) diff -Nru a/xen/common/perfc.c b/xen/common/perfc.c --- a/xen/common/perfc.c 2005-05-10 11:06:41 -04:00 +++ b/xen/common/perfc.c 2005-05-10 11:06:41 -04:00 @@ -67,6 +67,14 @@ for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ ) sum += atomic_read(&counters[j]); printk("TOTAL[%10d] ", sum); +#ifdef PERF_ARRAYS + for ( j = 0; j < perfc_info[i].nr_elements; j++ ) + { + if ( (j != 0) && ((j % 4) == 0) ) + printk("\n "); + printk("ARR%02d[%10d] ", j, atomic_read(&counters[j])); + } +#endif counters += j; break; } diff -Nru a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h --- a/xen/include/xen/perfc.h 2005-05-10 11:06:41 -04:00 +++ b/xen/include/xen/perfc.h 2005-05-10 11:06:41 -04:00 @@ -87,6 +87,7 @@ * Histogram: special treatment for 0 and 1 count. After that equally spaced * with last bucket taking the rest. */ +#ifdef PERFC_ARRAYS #define perfc_incr_histo(_x,_v,_n) \ do { \ if ( (_v) == 0 ) \ @@ -99,6 +100,9 @@ else \ perfc_incra(_x, PERFC_MAX_ ## _n - 1); \ } while ( 0 ) +#else +#define perfc_incr_histo(_x,_v,_n) ((void)0) +#endif #else /* PERF_COUNTERS */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |