diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2008-04-08 05:01:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:27:53 -0400 |
commit | 93fa7636dfdc059b25df148f230c0991096afdef (patch) | |
tree | cf277bd09091ac69abb5f7fdc21c705b8f186f88 /include/asm-x86/processor.h | |
parent | 492c2e476eac010962850006c49df326919b284c (diff) |
x86, ptrace: PEBS support
Polish the ds.h interface and add support for PEBS.
Ds.c is meant to be the resource allocator for per-thread and per-cpu
BTS and PEBS recording.
It is used by ptrace/utrace to provide execution tracing of debugged tasks.
It will be used by profilers (e.g. perfmon2).
It may be used by kernel debuggers to provide a kernel execution trace.
Changes in detail:
- guard DS and ptrace by CONFIG macros
- separate DS and BTS more clearly
- simplify field accesses
- add functions to manage PEBS buffers
- add simple protection/allocation mechanism
- added support for Atom
Opens:
- buffer overflow handling
Currently, only circular buffers are supported. This is all we need
for debugging. Profilers would want an overflow notification.
This is planned to be added when perfmon2 is made to use the ds.h
interface.
- utrace intermediate layer
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r-- | include/asm-x86/processor.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 559105220a47..beaccb71628f 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -20,6 +20,7 @@ struct mm_struct; | |||
20 | #include <asm/msr.h> | 20 | #include <asm/msr.h> |
21 | #include <asm/desc_defs.h> | 21 | #include <asm/desc_defs.h> |
22 | #include <asm/nops.h> | 22 | #include <asm/nops.h> |
23 | #include <asm/ds.h> | ||
23 | 24 | ||
24 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
25 | #include <linux/cpumask.h> | 26 | #include <linux/cpumask.h> |
@@ -415,9 +416,14 @@ struct thread_struct { | |||
415 | unsigned io_bitmap_max; | 416 | unsigned io_bitmap_max; |
416 | /* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */ | 417 | /* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */ |
417 | unsigned long debugctlmsr; | 418 | unsigned long debugctlmsr; |
418 | /* Debug Store - if not 0 points to a DS Save Area configuration; | 419 | #ifdef CONFIG_X86_DS |
419 | * goes into MSR_IA32_DS_AREA */ | 420 | /* Debug Store context; see include/asm-x86/ds.h; goes into MSR_IA32_DS_AREA */ |
420 | unsigned long ds_area_msr; | 421 | struct ds_context *ds_ctx; |
422 | #endif /* CONFIG_X86_DS */ | ||
423 | #ifdef CONFIG_X86_PTRACE_BTS | ||
424 | /* the signal to send on a bts buffer overflow */ | ||
425 | unsigned int bts_ovfl_signal; | ||
426 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
421 | }; | 427 | }; |
422 | 428 | ||
423 | static inline unsigned long native_get_debugreg(int regno) | 429 | static inline unsigned long native_get_debugreg(int regno) |