[lkml]   [2006]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] i386 add Intel PEBS and BTS cpufeature bits and detection
Andi Kleen (on Sat, 18 Nov 2006 09:24:01 +0100) wrote:
>On Friday 17 November 2006 23:57, Jeremy Fitzhardinge wrote:
>> Andi Kleen wrote:
>> > I have had private patches for that myself, using the MSRs on AMD
>> > and Intel.
>> >
>> Would they be something that could be cleaned up into something
>> mergeable?
>Hmm maybe.
>> It would be nice to have something that could be left
>> enabled all the time,
>That would add considerable latency to all exceptions.
>And unfortunately we take more than 16 jumps before
>we figure out an oops, so all the previous data would be gone
>if it was only done in the error path.
>If the CPU had a "disable LBR on exceptions" bit that would
>work. Unfortunately it hasn't.

LBR is mainly useful on wild branches to random addresses. As such,
you really only need to disable LBR in the page fault handler. For a
long time, KDB had LBR support with this replacement for the i386 page
fault handler.

#if defined(CONFIG_KDB)
pushl %ecx
pushl %edx
pushl %eax
movl $473,%ecx
andl $0xfffffffe,%eax /* Disable last branch recording */
popl %eax
popl %edx
popl %ecx
pushl $do_page_fault
jmp error_code

Nobody was using the LBR feature of KDB so I removed it in 2.6.17.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-11-23 07:07    [W:0.053 / U:2.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site