On Tue, Oct 23, 2012 at 2:31 PM, Peter Zijlstra <a.p.zijls...@chello.nl> wrote:
> On Thu, 2012-10-18 at 16:19 -0700, Andi Kleen wrote:
>> +       if (event->attr.sample_type & PERF_SAMPLE_RAW) {
>> +               raw.size = x86_pmu.pebs_record_size;
>> +               raw.data = __pebs;
>> +               data.raw = &raw;
>> +       }
>
> The Changelog babbles about registers, yet you export the entire record.
>
> There's the PERF_SAMPLE_REGS thing which has been pointed out to you,
> but you fail to include this in your arguments.
>
I believe we can use a similar approach to PERF_SAMPLE_REGS to expose
the PEBS machine state. We need to add PERF_SAMPLE_IREGS and then
return interrupt machine registers with regular sampling and the PEBS machine
registers in precise mode. A while back I wrote a patch to do just this. Once my
PEBS-LL patch is out, I will get back to it.

> Also, there's an alignment issue there, the raw.data is 32bit offset,
> the record is u64 aligned, leaving the output stream offset, wrecking
> things.
>
> And as with any ABI extension, it should come with useful userspace to
> make use of it.
>
> I'll hold off on this one for now.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to