Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-06 Thread Andi Kleen
> so if the sample_type has *both* PERF_SAMPLE_REGS_INTR and > PERF_SAMPLE_REGS_USER set, then the PERF_SAMPLE_REGS_USER values > will have the same register values as the PERF_SAMPLE_REGS_INTR values. > It ultimatively calls this code: static void perf_sample_regs_user(struct perf_regs *regs_us

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-06 Thread Stephane Eranian
On Fri, Mar 6, 2015 at 1:37 PM, Vince Weaver wrote: > On Mon, 2 Mar 2015, Andi Kleen wrote: > >> > do not enable REGS_USER and REG_INTR at the same time >> > as REGS_USER will have REG_INTR values and >> > cannot be used for user stack unwinding >> >> If that's true it

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-06 Thread Vince Weaver
On Mon, 2 Mar 2015, Andi Kleen wrote: > > do not enable REGS_USER and REG_INTR at the same time > > as REGS_USER will have REG_INTR values and > > cannot be used for user stack unwinding > > If that's true it would be a bug. But I doubt it. > > The PEBS handler sets u

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Andi Kleen
> do not enable REGS_USER and REG_INTR at the same time > as REGS_USER will have REG_INTR values and > cannot be used for user stack unwinding If that's true it would be a bug. But I doubt it. The PEBS handler sets up its own pt_regs, so they should be independen

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Stephane Eranian
Vince, On Mon, Mar 2, 2015 at 5:23 PM, Vince Weaver wrote: > On Mon, 2 Mar 2015, Stephane Eranian wrote: > > >> Vince, REGS_USER is user ONLY. It does not capture machine state if PMU >> interrupt occurred inside the kernel. REGS_USER is useful in support of dwarf >> based user level call stack u

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Vince Weaver
On Mon, 2 Mar 2015, Stephane Eranian wrote: > Vince, REGS_USER is user ONLY. It does not capture machine state if PMU > interrupt occurred inside the kernel. REGS_USER is useful in support of dwarf > based user level call stack unwinding. Otherwise REGS_INTR is what most > analysis tools need. s

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Stephane Eranian
On Mon, Mar 2, 2015 at 4:19 PM, Vince Weaver wrote: > On Mon, 2 Mar 2015, Stephane Eranian wrote: > >> vince, > >> PEBS machine state. Problem is that there is only one set of pt_regs passed >> to >> __intel_pmu_pebs_event(). And if REGS_INTR is set, then the pt_regs >> registers are >> indeed ov

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Vince Weaver
On Mon, 2 Mar 2015, Stephane Eranian wrote: > vince, > PEBS machine state. Problem is that there is only one set of pt_regs passed to > __intel_pmu_pebs_event(). And if REGS_INTR is set, then the pt_regs > registers are > indeed overwritten with PEBS captured state. To avoid the issue, we > would

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Stephane Eranian
vince, On Mon, Mar 2, 2015 at 2:31 PM, Vince Weaver wrote: > > On Sun, 1 Mar 2015, Stephane Eranian wrote: > > > You need to describe your test better. Are you saying that the register > > values > > you were seeing with REGS_USER, REGS_INTR, precise_ip > 0 are all > > the same? That is certainl

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-02 Thread Vince Weaver
On Sun, 1 Mar 2015, Stephane Eranian wrote: > You need to describe your test better. Are you saying that the register values > you were seeing with REGS_USER, REGS_INTR, precise_ip > 0 are all > the same? That is certainly not impossible. If your PMU interrupts are all > at the user level, then RE

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-03-01 Thread Stephane Eranian
Hi, On Sat, Feb 28, 2015 at 5:26 PM, Jiri Olsa wrote: > On Thu, Feb 12, 2015 at 12:33:09AM -0500, Vince Weaver wrote: >> >> This manpage patch relates to the addition of PERF_SAMPLE_REGS_INTR >> support added in the following commit: > > hi, > sorry for late response.. > >> >> perf_sample_reg

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-02-28 Thread Jiri Olsa
On Thu, Feb 12, 2015 at 12:33:09AM -0500, Vince Weaver wrote: > > This manpage patch relates to the addition of PERF_SAMPLE_REGS_INTR > support added in the following commit: hi, sorry for late response.. > > perf_sample_regs_intr; Linux 3.19 > commit 60e2364e60e86e81bc6377f49779779e6

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-02-25 Thread Michael Kerrisk (man-pages)
Hi Stephane (and Jiri), Ping! Cheers, Michael On 02/17/2015 06:33 AM, Michael Kerrisk (man-pages) wrote: > Hi Stephane (and Jiri), > > Would you be willing to review/comment on Vince's patch, please. > > Cheers, > > Michael > > > On 02/12/2015 06:33 AM, Vince Weaver wrote: >> >> This manpa

Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

2015-02-16 Thread Michael Kerrisk (man-pages)
Hi Stephane (and Jiri), Would you be willing to review/comment on Vince's patch, please. Cheers, Michael On 02/12/2015 06:33 AM, Vince Weaver wrote: > > This manpage patch relates to the addition of PERF_SAMPLE_REGS_INTR > support added in the following commit: > > perf_sample_regs_intr;