Re: [RFC PATCH 2/9] perf: Add ability to dump user regs

From: Stephane Eranian
Date: Mon Oct 18 2010 - 06:01:31 EST


On Sun, Oct 17, 2010 at 12:07 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Sat, 2010-10-16 at 00:58 +0200, Frederic Weisbecker wrote:
>> > Yes, PEBS does not capture the entire state.
>> >
>> > Here is what you get on Intel Core:
>> > Â Â Â Â u64 flags, ip;
>> > Â Â Â Â u64 ax, bx, cx, dx;
>> > Â Â Â Â u64 si, di, bp, sp;
>> > Â Â Â Â u64 r8, Âr9, Âr10, r11;
>> > Â Â Â Â u64 r12, r13, r14, r15;
>
>> Ok, that seems to cover most of the state. I guess few people care
>> about cs, ds, es, fs, gs, most of the time.
>
> Yeah, except if you want to profile wine or something like that ;-)
>
That means that if you want the segment registers, then you cannot
use PEBS. I think you could catch that when the event is created.

The other problem here is how to name registers at the API level.
You would be introducing architecture-specific register names
in perf_event.h. There is no such a thing today.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/