Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-12 Thread Andy Lutomirski
Berthier, Emmanuel; Tejun Heo >> Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception >> >> On Sun, Dec 7, 2014 at 10:40 AM, Robert Jarzmik >> wrote: >> > Hi Andy, >> > >> > Andy Lutomirski writes: >> >> On Dec 6, 2014 2:31 AM, "R

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-12 Thread Berthier, Emmanuel
> From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Sunday, December 7, 2014 8:10 PM > To: Jarzmik, Robert > Cc: linux-kernel@vger.kernel.org; H. Peter Anvin; X86 ML; Thomas Gleixner; > Berthier, Emmanuel; Tejun Heo > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-07 Thread Andy Lutomirski
On Sun, Dec 7, 2014 at 10:40 AM, Robert Jarzmik wrote: > Hi Andy, > > Andy Lutomirski writes: >> On Dec 6, 2014 2:31 AM, "Robert Jarzmik" wrote: >>> We would have a "LBR resource" variable to track who owns the LBR : >>> - nobody : LBR_UNCLAIMED >>> - the exception handler : LBR_EXCEPTION_DEBUG_

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-07 Thread Robert Jarzmik
Hi Andy, Andy Lutomirski writes: > On Dec 6, 2014 2:31 AM, "Robert Jarzmik" wrote: >> We would have a "LBR resource" variable to track who owns the LBR : >> - nobody : LBR_UNCLAIMED >> - the exception handler : LBR_EXCEPTION_DEBUG_USAGE > > Which exception handler? There can be several on the st

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-06 Thread Robert Jarzmik
Andy Lutomirski writes: > I don't really care about the number of instructions. Right, a couple of test/jz/jnz is negligible in the exception path, that's what I also think. > But there are still all the nasty cases: > > - Context switch during exception processing (both in the C handler > and

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-05 Thread Berthier, Emmanuel
> From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Thursday, December 4, 2014 7:10 PM > To: Berthier, Emmanuel > Cc: Thomas Gleixner; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception > >> And the general problem

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-04 Thread Andy Lutomirski
On Thu, Dec 4, 2014 at 8:01 AM, Berthier, Emmanuel wrote: >> From: Andy Lutomirski [mailto:l...@amacapital.net] >> Sent: Wednesday, December 3, 2014 8:30 PM >> To: Berthier, Emmanuel >> Cc: Thomas Gleixner; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML >> Subject:

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-04 Thread Berthier, Emmanuel
> From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Wednesday, December 3, 2014 8:30 PM > To: Berthier, Emmanuel > Cc: Thomas Gleixner; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception > > The final patch will bypass

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-03 Thread Andy Lutomirski
On Wed, Dec 3, 2014 at 10:25 AM, Berthier, Emmanuel wrote: >> From: Andy Lutomirski [mailto:l...@amacapital.net] >> Sent: Tuesday, December 2, 2014 9:12 PM >> To: Thomas Gleixner >> Cc: Berthier, Emmanuel; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML >> Subject: Re:

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-03 Thread Berthier, Emmanuel
> From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Tuesday, December 2, 2014 9:12 PM > To: Thomas Gleixner > Cc: Berthier, Emmanuel; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception > > On Tue, Dec 2, 2014 at 11:5

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-02 Thread Andy Lutomirski
On Tue, Dec 2, 2014 at 11:56 AM, Thomas Gleixner wrote: > On Tue, 2 Dec 2014, Andy Lutomirski wrote: >> TBH, I'm wondering whether this is actually a good idea. It might be >> more valuable and less scary to try to make this work for BUG instead. >> To get the most impact, it might be worth alloc

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-02 Thread Thomas Gleixner
On Tue, 2 Dec 2014, Andy Lutomirski wrote: > TBH, I'm wondering whether this is actually a good idea. It might be > more valuable and less scary to try to make this work for BUG instead. > To get the most impact, it might be worth allocating a new exception > vector for BUG and using 'int 0xwhatev

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-02 Thread Berthier, Emmanuel
> From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Friday, November 28, 2014 4:15 PM > To: Berthier, Emmanuel > Cc: Thomas Gleixner; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception > > On Fri, Nov 28, 2014

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-12-02 Thread Andy Lutomirski
On Tue, Dec 2, 2014 at 11:09 AM, Berthier, Emmanuel wrote: >> From: Andy Lutomirski [mailto:l...@amacapital.net] >> Sent: Friday, November 28, 2014 4:15 PM >> To: Berthier, Emmanuel >> Cc: Thomas Gleixner; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML >> Subject: Re:

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-11-28 Thread Andy Lutomirski
rzmik, Robert; LKML >> Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception >> >> On Thu, Nov 27, 2014 at 1:22 PM, Thomas Gleixner >> wrote: >> >> /* >> >> * Exception entry points. >> >> */ >> >> @@ -1063,6 +110

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-11-28 Thread Berthier, Emmanuel
> From: Thomas Gleixner [mailto:t...@linutronix.de] > Sent: Thursday, November 27, 2014 10:23 PM > To: Berthier, Emmanuel > Cc: H. Peter Anvin; x...@kernel.org; Jarzmik, Robert; LKML; Andy Lutomirski > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception > > On Thu, 27 Nov 20

RE: [PATCH v2] [LBR] Dump LBRs on Exception

2014-11-28 Thread Berthier, Emmanuel
> -Original Message- > From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Thursday, November 27, 2014 10:56 PM > To: Thomas Gleixner > Cc: Berthier, Emmanuel; H. Peter Anvin; X86 ML; Jarzmik, Robert; LKML > Subject: Re: [PATCH v2] [LBR] Dump LBRs on Exception &

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-11-27 Thread Andy Lutomirski
On Thu, Nov 27, 2014 at 1:22 PM, Thomas Gleixner wrote: > On Thu, 27 Nov 2014, Emmanuel Berthier wrote: >> diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c >> b/arch/x86/kernel/cpu/perf_event_intel_lbr.c >> index 45fa730..0a69365 100644 >> --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c >

Re: [PATCH v2] [LBR] Dump LBRs on Exception

2014-11-27 Thread Thomas Gleixner
On Thu, 27 Nov 2014, Emmanuel Berthier wrote: > diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c > b/arch/x86/kernel/cpu/perf_event_intel_lbr.c > index 45fa730..0a69365 100644 > --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c > +++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c > @@ -4,7 +4,