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] Don't print unwieldy array/histogram perfcounters by def

To: xen-changelog@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Don't print unwieldy array/histogram perfcounters by default.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 18 Mar 2005 11:16:56 +0000
Delivery-date: Fri, 18 Mar 2005 16:06:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-changelog>
List-help: <mailto:xen-changelog-request@lists.sourceforge.net?subject=help>
List-id: <xen-changelog.lists.sourceforge.net>
List-post: <mailto:xen-changelog@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.sourceforge.net?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-admin@xxxxxxxxxxxxxxxxxxxxx
ChangeSet 1.1320, 2005/03/18 11:16:56+00:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Don't print unwieldy array/histogram perfcounters by default.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 tools/misc/xenperf.c |   29 ++++++++++++++++++++++-------
 xen/common/perfc.c   |    6 ------
 2 files changed, 22 insertions(+), 13 deletions(-)


diff -Nru a/tools/misc/xenperf.c b/tools/misc/xenperf.c
--- a/tools/misc/xenperf.c      2005-03-18 11:03:44 -05:00
+++ b/tools/misc/xenperf.c      2005-03-18 11:03:44 -05:00
@@ -22,18 +22,32 @@
 {
     int              i, j, xc_handle;
     xc_perfc_desc_t *pcd;
-    unsigned int     num, sum, reset = 0;
+    unsigned int     num, sum, reset = 0, full = 0;
 
     if ( argc > 1 )
     {
         char *p = argv[1];
-        if ( (*p++ == '-')  && (*p == 'r') )
-            reset = 1;
+        if ( p[0] == '-' )
+        {
+            switch ( p[1] )
+            {
+            case 'f':
+                full = 1;
+                break;
+            case 'r':
+                reset = 1;
+                break;
+            default:
+                goto error;
+            }
+        }
         else
         {
+        error:
             printf("%s: [-r]\n", argv[0]);
-            printf("no args: print xen performance counters\n");
-            printf("    -r : reset xen performance counters\n");
+            printf("no args: print digested counters\n");
+            printf("    -f : print full arrays/histograms\n");
+            printf("    -r : reset counters\n");
             return 0;
         }
     }   
@@ -94,8 +108,9 @@
             sum += pcd[i].vals[j];
         printf ("T=%10u ", (unsigned int)sum);
 
-        for ( j = 0; j < pcd[i].nr_vals; j++ )
-            printf(" %10u", (unsigned int)pcd[i].vals[j]);
+        if ( full || (pcd[i].nr_vals <= 4) )
+            for ( j = 0; j < pcd[i].nr_vals; j++ )
+                printf(" %10u", (unsigned int)pcd[i].vals[j]);
 
         printf("\n");
     }
diff -Nru a/xen/common/perfc.c b/xen/common/perfc.c
--- a/xen/common/perfc.c        2005-03-18 11:03:44 -05:00
+++ b/xen/common/perfc.c        2005-03-18 11:03:44 -05:00
@@ -66,12 +66,6 @@
             for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ )
                 sum += atomic_read(&counters[j]);
             printk("TOTAL[%10d]  ", sum);
-            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]));
-            }
             counters += j;
             break;
         }


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Don't print unwieldy array/histogram perfcounters by default., BitKeeper Bot <=