public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: eranian@hpl.hp.com, linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] i386 add Intel PEBS and BTS cpufeature bits and detection
Date: Fri, 17 Nov 2006 05:29:02 +0100	[thread overview]
Message-ID: <200611170529.02460.ak@suse.de> (raw)
In-Reply-To: <455D11B9.4080302@goop.org>

On Friday 17 November 2006 02:34, Jeremy Fitzhardinge wrote:
> Stephane Eranian wrote:
> > Here is a small patch that adds two cpufeature bits to represent
> > Intel's Precise-Event-Based Sampling (PEBS) and Branch Trace Store
> > (BTS) features. Those features can be found on Intel P4 and Core 2 
> > processors among others and can be used by perfmon.
> >   
> 
> I've been thinking it would be useful for kernel debugging if kernel
> oops messages could use the branch history to show the last few jumps on
> processors which support it.  It would help a lot with the "oh, an oops
> with eip==esp==0" type crashes, which are otherwise pretty unhelpful.

I have had private patches for that myself, using the MSRs on AMD
and Intel.

The problem is that you have to insert hooks early into the exception
handlers to read the branch history MSRs, and that gets fairly ugly
and a little slow and we can't really enable it by default.

But using BTS with a long in memory buffer would be fine. It would
just be slower so it couldn't be enabled by default. But as a debugging
feature it would be nice.

-Andi

  reply	other threads:[~2006-11-17  4:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15 21:32 [PATCH] i386 add Intel PEBS and BTS cpufeature bits and detection Stephane Eranian
2006-11-15 21:34 ` [PATCH] x86-64 " Stephane Eranian
2006-11-16  0:18 ` [PATCH] i386 " Andrew Morton
2006-11-16 14:20 ` [PATCH] x86-64 add Intel BTS cpufeature bit and detection (take 2) Stephane Eranian
2006-11-16 14:22   ` [PATCH] i386 " Stephane Eranian
2006-11-16 14:23   ` [PATCH] x86-64 " Andi Kleen
2006-11-17  1:34 ` [PATCH] i386 add Intel PEBS and BTS cpufeature bits and detection Jeremy Fitzhardinge
2006-11-17  4:29   ` Andi Kleen [this message]
2006-11-17  7:57     ` Stephane Eranian
2006-11-17  9:22       ` Andi Kleen
2006-11-17 12:29         ` Stephane Eranian
2006-11-17 22:57     ` Jeremy Fitzhardinge
2006-11-18  8:24       ` Andi Kleen
2006-11-23  6:03         ` Keith Owens
2006-11-23  8:52           ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611170529.02460.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=eranian@hpl.hp.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox