aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-03 04:39:53 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-08 09:47:15 -0500
commit241771ef016b5c0c83cd7a4372a74321c973c1e6 (patch)
tree5893d72f1721af34daee82f27449bd35c9f65363 /arch/x86/kernel/signal.c
parente7bc62b6b3aeaa8849f8383e0cfb7ca6c003adc6 (diff)
performance counters: x86 support
Implement performance counters for x86 Intel CPUs. It's simplified right now: the PERFMON CPU feature is assumed, which is available in Core2 and later Intel CPUs. The design is flexible to be extended to more CPU types as well. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/signal.c')
-rw-r--r--arch/x86/kernel/signal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index b1cc6da64208..dee553c503d3 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -6,7 +6,7 @@
6 * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes 6 * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes
7 * 2000-2002 x86-64 support by Andi Kleen 7 * 2000-2002 x86-64 support by Andi Kleen
8 */ 8 */
9 9#include <linux/perf_counter.h>
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
@@ -891,6 +891,11 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
891 tracehook_notify_resume(regs); 891 tracehook_notify_resume(regs);
892 } 892 }
893 893
894 if (thread_info_flags & _TIF_PERF_COUNTERS) {
895 clear_thread_flag(TIF_PERF_COUNTERS);
896 perf_counter_notify(regs);
897 }
898
894#ifdef CONFIG_X86_32 899#ifdef CONFIG_X86_32
895 clear_thread_flag(TIF_IRET); 900 clear_thread_flag(TIF_IRET);
896#endif /* CONFIG_X86_32 */ 901#endif /* CONFIG_X86_32 */