diff options
author | Seiji Aguchi <seiji.aguchi@hds.com> | 2013-10-30 16:37:00 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-11-08 14:15:45 -0800 |
commit | 25c74b10bacead867478480170083f69cfc0db48 (patch) | |
tree | 750066787398c55825485341988e19af9776b562 /arch/x86/kernel/entry_64.S | |
parent | 959c071f0974cda7702d7574647de7ad9259eb57 (diff) | |
download | op-kernel-dev-25c74b10bacead867478480170083f69cfc0db48.zip op-kernel-dev-25c74b10bacead867478480170083f69cfc0db48.tar.gz |
x86, trace: Register exception handler to trace IDT
This patch registers exception handlers for tracing to a trace IDT.
To implemented it in set_intr_gate(), this patch does followings.
- Register the exception handlers to
the trace IDT by prepending "trace_" to the handler's names.
- Also, newly introduce trace_page_fault() to add tracepoints
in a subsequent patch.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Link: http://lkml.kernel.org/r/52716DEC.5050204@hds.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index b077f4c..8b7b169 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -1280,6 +1280,17 @@ ENTRY(\sym) END(\sym) .endm +#ifdef CONFIG_TRACING +.macro trace_errorentry sym do_sym +errorentry trace(\sym) trace(\do_sym) +errorentry \sym \do_sym +.endm +#else +.macro trace_errorentry sym do_sym +errorentry \sym \do_sym +.endm +#endif + /* error code is on the stack already */ .macro paranoiderrorentry sym do_sym ENTRY(\sym) @@ -1482,7 +1493,7 @@ zeroentry xen_int3 do_int3 errorentry xen_stack_segment do_stack_segment #endif errorentry general_protection do_general_protection -errorentry page_fault do_page_fault +trace_errorentry page_fault do_page_fault #ifdef CONFIG_KVM_GUEST errorentry async_page_fault do_async_page_fault #endif |