lkml.org 
[lkml]   [2015]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support
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 REGS_INTR = REGS_USER. With precise_ip > 0,
> you will get the machine state on retirement of the sampled instruction.
> But if you have no sampling skid without precise_ip, then both states
> the REGS_INTR and REGS_INTR+precise_ip>0 could be identical.

If you enable both PERF_SAMPLE_REGS_USER and PERF_SAMPLE_REGS_INTR
then you will get in the PERF_RECORD_SAMPLE results for both user
and intr. However they will be identical, always, because
the kernel code just checks if PERF_SAMPLE_REGS_INTR was given and
then returns the PEBS state for both.

My test was expecting that if you specified PERF_SAMPLE_REGS_USER and
PERF_SAMPLE_REGS_INTR then for the PERF_SAMPLE_REGS_USER values you'd
get the same results as when PERF_SAMPLE_REGS_INTR were not specified, but
that's not the case.

This is an obscure corner case, but I found the results unexpected.

Vince


\
 
 \ /
  Last update: 2015-03-02 20:41    [W:0.084 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site