RE: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-22 Thread Metzger, Markus T
>Your patch seems to be still word wrapped. I hope this is better with the next version I'm going to send out in a few minutes. Sorry about that. >The noflags variant should be probably data driven too. I rewrote the entire code to use an offset/size configuration instead of declaring structs f

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-21 Thread Andi Kleen
On Wednesday 21 November 2007 12:02:38 Metzger, Markus T wrote: Your patch seems to be still word wrapped. > > It seems we're avoiding to declare a structured data type and instead > prefer to describe the type indirectly. > We gain the flexibility to work with different data layouts. > We loo

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-21 Thread Stephane Eranian
Hi, > >and it seems like this patch and perfmon2 are going to have to > >live with > >each other... since they both require the use of the DS save area... > > Hmmm, this might require some synchronization between those two. > > Do you know how (accesses to) MSR's are managed by the kernel? Th

RE: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-21 Thread Metzger, Markus T
>> - the internal buffer interpretation as well as the corresponding >> operations are selected at run-time by hardware detection >> - different processors use different branch record formats > >I still think it would be far better if you would switch this >over to be table >driven. e.g. defin

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread Andi Kleen
> >and it seems like this patch and perfmon2 are going to have to > >live with > >each other... since they both require the use of the DS save area... > > Hmmm, this might require some synchronization between those two. > > Do you know how (accesses to) MSR's are managed by the kernel? There

RE: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread Metzger, Markus T
t;B; [EMAIL PROTECTED] >Subject: Re: [patch][v2] x86, ptrace: support for branch trace >store(BTS) > >On Tue, 20 Nov 2007, dean gaudet wrote: > >> On Tue, 20 Nov 2007, Metzger, Markus T wrote: >> >> > +__cpuinit void ptrace_bts_init_intel(struct cpuinfo_x

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread Andi Kleen
> We might want to add support for Netburst in 64bit mode some day. > For today, I simply exclude Netburst for x86_64. If you switched to table driven then adding another format like this would be likely very easy. It's just that with the "own code for everything" method it becomes difficult.

RE: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread Metzger, Markus T
t;B; [EMAIL PROTECTED] >Subject: Re: [patch][v2] x86, ptrace: support for branch trace >store(BTS) > >On Tue, 20 Nov 2007, Metzger, Markus T wrote: > >> +__cpuinit void ptrace_bts_init_intel(struct cpuinfo_x86 *c) >> +{ >> +switch (c->x86) { >> +case 0

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread dean gaudet
On Tue, 20 Nov 2007, dean gaudet wrote: > On Tue, 20 Nov 2007, Metzger, Markus T wrote: > > > +__cpuinit void ptrace_bts_init_intel(struct cpuinfo_x86 *c) > > +{ > > + switch (c->x86) { > > + case 0x6: > > + switch (c->x86_model) { > > +#ifdef __i386__ > > + case 0xD: > >

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread dean gaudet
On Tue, 20 Nov 2007, Metzger, Markus T wrote: > +__cpuinit void ptrace_bts_init_intel(struct cpuinfo_x86 *c) > +{ > + switch (c->x86) { > + case 0x6: > + switch (c->x86_model) { > +#ifdef __i386__ > + case 0xD: > + case 0xE: /* Pentium M */ > +

Re: [patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread Andi Kleen
> - the internal buffer interpretation as well as the corresponding > operations are selected at run-time by hardware detection > - different processors use different branch record formats I still think it would be far better if you would switch this over to be table driven. e.g. define a rec

[patch][v2] x86, ptrace: support for branch trace store(BTS)

2007-11-20 Thread Metzger, Markus T
Changes to previous version: - moved task arrives/departs notifications to __switch_to_xtra() - added _TIF_BTS_TRACE and _TIF_BTS_TRACE_TS to _TIF_WORK_CTXSW_* - split _TIF_WORK_CTXSW into ~_PREV and ~_NEXT for x86_64 - ptrace_bts_init_intel() function called from init_intel() - removed PTRACE_BTS_