diff options
author | Andi Kleen <andi@firstfloor.org> | 2009-04-27 11:44:11 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-05-08 05:06:33 -0400 |
commit | 1dcdb5a9e7c235e6e80f1f4d5b8247b3e5347e48 (patch) | |
tree | 197b80f4941f535fd3b251755b74b557cb8d9ca8 | |
parent | 54f2c841fa0007e5fee3b7d01a911c774f0a6cda (diff) |
oprofile: re-add force_arch_perfmon option
This re-adds the force_arch_perfmon option that was in the original
arch perfmon patchkit. Originally this was rejected in favour
of a generalized perfmon=name option, but it turned out implementing
the later in a reliable way is hard (and it would have been easy
to crash the kernel if a user gets it wrong)
But now Atom and Core i7 support being readded a user would
need to update their oprofile userland to beyond 0.9.4 to use oprofile again
on Atom or Core i7.
To avoid this problem readd the force_arch_perfmon option.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
-rw-r--r-- | Documentation/kernel-parameters.txt | 6 | ||||
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 90b3924071b..9b9566bf330 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1650,6 +1650,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1650 | oprofile.timer= [HW] | 1650 | oprofile.timer= [HW] |
1651 | Use timer interrupt instead of performance counters | 1651 | Use timer interrupt instead of performance counters |
1652 | 1652 | ||
1653 | oprofile.force_arch_perfmon=1 [X86] | ||
1654 | Force use of architectural perfmon instead of | ||
1655 | the CPU specific event set. | ||
1656 | This might be useful if you have older oprofile | ||
1657 | userland or if you want common events over Intel CPUs. | ||
1658 | |||
1653 | osst= [HW,SCSI] SCSI Tape Driver | 1659 | osst= [HW,SCSI] SCSI Tape Driver |
1654 | Format: <buffer_size>,<write_threshold> | 1660 | Format: <buffer_size>,<write_threshold> |
1655 | See also Documentation/scsi/st.txt. | 1661 | See also Documentation/scsi/st.txt. |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 202864ad49a..e5171c99e15 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -389,10 +389,16 @@ static int __init p4_init(char **cpu_type) | |||
389 | return 0; | 389 | return 0; |
390 | } | 390 | } |
391 | 391 | ||
392 | int force_arch_perfmon; | ||
393 | module_param(force_arch_perfmon, int, 0); | ||
394 | |||
392 | static int __init ppro_init(char **cpu_type) | 395 | static int __init ppro_init(char **cpu_type) |
393 | { | 396 | { |
394 | __u8 cpu_model = boot_cpu_data.x86_model; | 397 | __u8 cpu_model = boot_cpu_data.x86_model; |
395 | 398 | ||
399 | if (force_arch_perfmon && cpu_has_arch_perfmon) | ||
400 | return 0; | ||
401 | |||
396 | switch (cpu_model) { | 402 | switch (cpu_model) { |
397 | case 0 ... 2: | 403 | case 0 ... 2: |
398 | *cpu_type = "i386/ppro"; | 404 | *cpu_type = "i386/ppro"; |