Skip to content

Commit

Permalink
x86, ptrace: support for branch trace store(BTS)
Browse files Browse the repository at this point in the history
Resend using different mail client

Changes to the last version:
- split implementation into two layers: ds/bts and ptrace
- renamed TIF's
- save/restore ds save area msr in __switch_to_xtra()
- make block-stepping only look at BTF bit

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Markus Metzger authored and Ingo Molnar committed Jan 30, 2008
1 parent 7796931 commit eee3af4
Show file tree
Hide file tree
Showing 16 changed files with 859 additions and 12 deletions.
1 change: 1 addition & 0 deletions arch/x86/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \
quirks.o i8237.o topology.o alternative.o i8253.o tsc_32.o io_delay.o rtc.o

obj-y += ptrace.o
obj-y += ds.o
obj-y += tls.o
obj-y += step.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
i8253.o io_delay.o rtc.o

obj-y += ptrace.o
obj-y += ds.o
obj-y += step.o

obj-$(CONFIG_IA32_EMULATION) += tls.o
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/kernel/cpu/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <asm/pgtable.h>
#include <asm/msr.h>
#include <asm/uaccess.h>
#include <asm/ptrace.h>
#include <asm/ds.h>

#include "cpu.h"

Expand Down Expand Up @@ -219,6 +221,9 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if (!(l1 & (1<<12)))
set_bit(X86_FEATURE_PEBS, c->x86_capability);
}

if (cpu_has_bts)
ds_init_intel(c);
}

static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 * c, unsigned int size)
Expand Down
Loading

0 comments on commit eee3af4

Please sign in to comment.