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] [xen-unstable] Provides hooks for perfc print/reset/gath

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Provides hooks for perfc print/reset/gather.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 07 Aug 2006 17:40:16 +0000
Delivery-date: Mon, 07 Aug 2006 10:43:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 6289234304f12912c8ab08aa262c8958538eb8cf
# Parent  7924b6bd728a3192ed5ff1792499273862a183e5
Provides hooks for perfc print/reset/gather.

These arch-neutral hooks allow architectures to report hardware counters.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/common/perfc.c              |   12 ++++++------
 xen/include/asm-ia64/perfc.h    |   16 ++++++++++++++++
 xen/include/asm-powerpc/perfc.h |   16 ++++++++++++++++
 xen/include/asm-x86/perfc.h     |   23 +++++++++++++++++++++++
 4 files changed, 61 insertions(+), 6 deletions(-)

diff -r 7924b6bd728a -r 6289234304f1 xen/common/perfc.c
--- a/xen/common/perfc.c        Mon Aug 07 15:53:06 2006 +0100
+++ b/xen/common/perfc.c        Mon Aug 07 15:55:39 2006 +0100
@@ -8,6 +8,7 @@
 #include <xen/mm.h>
 #include <xen/guest_access.h>
 #include <public/dom0_ops.h>
+#include <asm/perfc.h>
 
 #undef  PERFCOUNTER
 #undef  PERFCOUNTER_CPU
@@ -89,9 +90,7 @@ void perfc_printall(unsigned char key)
         printk("\n");
     }
 
-#ifdef PERF_ARRAYS
-    ptwr_eip_stat_print();
-#endif
+    arch_perfc_printall();
 }
 
 void perfc_reset(unsigned char key)
@@ -130,9 +129,7 @@ void perfc_reset(unsigned char key)
         }
     }
 
-#ifdef PERF_ARRAYS
-    ptwr_eip_stat_reset();
-#endif
+    arch_perfc_reset ();
 }
 
 static dom0_perfc_desc_t perfc_d[NR_PERFCTRS];
@@ -180,6 +177,9 @@ static int perfc_copy_info(XEN_GUEST_HAN
     }
     if (perfc_vals == NULL)
         return -ENOMEM;
+
+    /* Architecture may fill counters from hardware.  */
+    arch_perfc_gather();
 
     /* We gather the counts together every time. */
     for ( i = 0; i < NR_PERFCTRS; i++ )
diff -r 7924b6bd728a -r 6289234304f1 xen/include/asm-ia64/perfc.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/perfc.h      Mon Aug 07 15:55:39 2006 +0100
@@ -0,0 +1,16 @@
+#ifndef __ASM_PERFC_H__
+#define __ASM_PERFC_H__
+
+static inline void arch_perfc_printall (void)
+{
+}
+
+static inline void arch_perfc_reset (void)
+{
+}
+
+static inline void arch_perfc_gather (void)
+{
+}
+
+#endif
diff -r 7924b6bd728a -r 6289234304f1 xen/include/asm-powerpc/perfc.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-powerpc/perfc.h   Mon Aug 07 15:55:39 2006 +0100
@@ -0,0 +1,16 @@
+#ifndef __ASM_PERFC_H__
+#define __ASM_PERFC_H__
+
+static inline void arch_perfc_printall (void)
+{
+}
+
+static inline void arch_perfc_reset (void)
+{
+}
+
+static inline void arch_perfc_gather (void)
+{
+}
+
+#endif
diff -r 7924b6bd728a -r 6289234304f1 xen/include/asm-x86/perfc.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-x86/perfc.h       Mon Aug 07 15:55:39 2006 +0100
@@ -0,0 +1,23 @@
+#ifndef __ASM_PERFC_H__
+#define __ASM_PERFC_H__
+#include <asm/mm.h>
+
+static inline void arch_perfc_printall (void)
+{
+#ifdef PERF_ARRAYS
+    ptwr_eip_stat_print();
+#endif
+}
+
+static inline void arch_perfc_reset (void)
+{
+#ifdef PERF_ARRAYS
+    ptwr_eip_stat_reset();
+#endif
+}
+
+static inline void arch_perfc_gather (void)
+{
+}
+
+#endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Provides hooks for perfc print/reset/gather., Xen patchbot-unstable <=