WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Added back the printing of perfc arrays & histograms, un

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added back the printing of perfc arrays & histograms, under compile-time
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 10 May 2005 12:41:09 +0000
Delivery-date: Tue, 10 May 2005 15:06:08 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added back the printing of perfc arrays & histograms, under compile-time, BitKeeper Bot <=