Messages in this thread | | | From | Vince Weaver <> | Date | Mon, 2 Mar 2015 14:31:40 -0500 (EST) | Subject | Re: [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
| |