aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-09-15 10:08:12 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-09-15 10:08:12 +0100
commitac61c93e1563712865b6837a56045ab7e4d95399 (patch)
treecb2f59460ee0b0b0f11d284ec4f7b182496c424d
parent3aa88456d12d6180300b923880c68234b95ec82c (diff)
downloadxen-ac61c93e1563712865b6837a56045ab7e4d95399.tar.gz
xen-ac61c93e1563712865b6837a56045ab7e4d95399.tar.bz2
xen-ac61c93e1563712865b6837a56045ab7e4d95399.zip
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@intel.com> Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
-rw-r--r--xen/arch/x86/oprofile/nmi_int.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c
index d05d7a360c..07050457f3 100644
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -344,11 +344,26 @@ static int __init p4_init(char ** cpu_type)
}
+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:
*cpu_type = "i386/ppro";