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] xenoprof: force use of architectural perf

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenoprof: force use of architectural perfmon instead of the CPU
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Sep 2009 02:15:11 -0700
Delivery-date: Tue, 15 Sep 2009 02:15:18 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1253005692 -3600
# Node ID 58ef1439ca982cdd2f7e4698ce9bdba1f4b38853
# Parent  15f5cff84adf32d1d24245207fc6e9a72a4cae13
xenoprof: force use of architectural perfmon instead of the CPU
specific event set, which may be not supported by oprofile user space
tool yet.

Signed-off-by: Yang Zhang <yang.zhang@xxxxxxxxx>
Signed-off-by: Yang Xiaowei <xiaowei.yang@xxxxxxxxx>
---
 xen/arch/x86/oprofile/nmi_int.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -r 15f5cff84adf -r 58ef1439ca98 xen/arch/x86/oprofile/nmi_int.c
--- a/xen/arch/x86/oprofile/nmi_int.c   Tue Sep 15 10:03:16 2009 +0100
+++ b/xen/arch/x86/oprofile/nmi_int.c   Tue Sep 15 10:08:12 2009 +0100
@@ -344,10 +344,25 @@ static int __init p4_init(char ** cpu_ty
 }
 
 
+static int force_arch_perfmon;
+static int force_cpu_type(const char *str)
+{
+       if (!strcmp(str, "arch_perfmon")) {
+               force_arch_perfmon = 1;
+               printk(KERN_INFO "oprofile: forcing architectural perfmon\n");
+       }
+
+       return 0;
+}
+custom_param("cpu_type", force_cpu_type);
+
 extern int ppro_has_global_ctrl;
 static int __init ppro_init(char ** cpu_type)
 {
        __u8 cpu_model = current_cpu_data.x86_model;
+
+       if (force_arch_perfmon && cpu_has_arch_perfmon)
+               return 0;
 
        switch (cpu_model) {
        case 0 ... 2:

_______________________________________________
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] xenoprof: force use of architectural perfmon instead of the CPU, Xen patchbot-unstable <=