public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	mingo@elte.hu, Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 0/2] perf: Use LBR for machine/oops debugging
Date: Mon, 29 Mar 2010 22:09:34 +0200	[thread overview]
Message-ID: <20100329200934.GF20695@one.firstfloor.org> (raw)
In-Reply-To: <1269872059.12097.338.camel@laptop>

On Mon, Mar 29, 2010 at 04:14:19PM +0200, Peter Zijlstra wrote:
> On Mon, 2010-03-29 at 15:08 +0200, Andi Kleen wrote:
> > Peter Zijlstra <a.p.zijlstra@chello.nl> writes:
> > 
> > > The LBRs are relatively cheap to keep enabled and provide some history
> > > to OOPSen, also some CPUs are reported to keep them over soft-reset,
> > > which allows us to use them to debug things like tripple faults.
> > >
> > > Therefore introduce a boot option: lbr_debug=on, which always enable
> > > the LBRs and will print the LBRs on CPU init and die().
> > 
> > 
> > die is too late. they will only contain the oops code then.
> 
> We do an lbr_off() in oops_begin(), or is there a better/earlier place
> we can do that?

I had an old patch in the P4 era (slightly different but larger LBRs) which
saved them all early in the exception handlers and then dumped
them from the buffer. That's early enough that you only miss one or two.

The problem is that it's somewhat more expensive, the MSR reads
are not cheap and they will slow down all your page faults.

I checked, but I can't find the old patch anymore. Could be probably
redone. 

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

      reply	other threads:[~2010-03-29 20:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 12:20 [PATCH 0/2] perf: Use LBR for machine/oops debugging Peter Zijlstra
2010-03-29 12:20 ` [PATCH 1/2] perf, x86: fix __initconst vs const Peter Zijlstra
2010-03-29 12:20 ` [RFC,PATCH 2/2] perf, x86: Utilize the LBRs for machine/oops debugging Peter Zijlstra
2010-03-29 12:47   ` Stephane Eranian
2010-03-29 14:13     ` Peter Zijlstra
2010-03-29 14:20       ` Stephane Eranian
2010-03-29 17:02   ` Ingo Molnar
2010-03-29 17:12     ` Peter Zijlstra
2010-04-02 20:44       ` Ingo Molnar
2010-03-29 13:08 ` [PATCH 0/2] perf: Use LBR " Andi Kleen
2010-03-29 13:16   ` Stephane Eranian
2010-03-29 14:14   ` Peter Zijlstra
2010-03-29 20:09     ` Andi Kleen [this message]

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=20100329200934.GF20695@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=torvalds@osdl.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