[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBQz88k4Srw+QLu-7OWC=xGtg1DDNFMiRfN10vRsZHVZ0w@mail.gmail.com>
Date: Thu, 26 Jul 2012 19:42:55 +0200
From: Stephane Eranian <eranian@...gle.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: acme@...hat.com, a.p.zijlstra@...llo.nl, mingo@...e.hu,
paulus@...ba.org, cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com,
gorcunov@...nvz.org, tzanussi@...il.com, mhiramat@...hat.com,
robert.richter@....com, fche@...hat.com,
linux-kernel@...r.kernel.org, masami.hiramatsu.pt@...achi.com,
drepper@...il.com, asharma@...com, benjamin.redelings@...cent.org
Subject: Re: [PATCH 02/17] perf: Add ability to attach user level registers
dump to sample
On Wed, Jul 25, 2012 at 8:27 PM, Jiri Olsa <jolsa@...hat.com> wrote:
> On Wed, Jul 25, 2012 at 07:39:18PM +0200, Stephane Eranian wrote:
>> On Sun, Jul 22, 2012 at 2:14 PM, Jiri Olsa <jolsa@...hat.com> wrote:
>
> SNIP
>
>> > + if (sample_type & PERF_SAMPLE_REGS_USER) {
>> > + u64 avail = (data->regs_user != NULL);
>> > +
>> > + /*
>> > + * If there are no regs to dump, notice it through
>> > + * first u64 being zero.
>> > + */
>> > + perf_output_put(handle, avail);
>> > +
>> The only role of avail is to report whether or not you've captured actual
>> registers. Could it be used to report the sampled process ABI (32 vs. 64)
>> instead? Something like:
>> PERF_SAMPLE_REGS_ABI_NONE -> no regs captured (emulate your
>> current behavior)
>> PERF_SAMPLE_REGS_ABI_32 -> 32 bit ABI regs captured
>> PERF_SAMPLE_REGS_ABI_64 -> 64 bit ABI regs captured
>>
>> That could help the tools interpret the register values.
>
> Yes, I think that could help once we start dealing with compat tasks.
>
You don't control whether or not you capture compat tasks. So
you have to deal with those right now.
> The current userspace code stays untouched, because it checks for
> 'avail != 0', which stays even with your change.
>
> I think this could be sent later with all other fixes I'm already
> working on. But I can work/send it preferentially before whole patchset
> is taken if you like.
>
Well, why not do it now. You'd have to rename the available field
into something more sensible. Also need to prepare it for future
extension if they ever become necessary.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists