[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenoprof: force use of architectural perfmon instead of the CPU



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.