lkml.org 
[lkml]   [2012]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/17] perf: Add ability to attach user level registers dump to sample
On Thu, Jul 26, 2012 at 07:42:55PM +0200, Stephane Eranian wrote:
> On Wed, Jul 25, 2012 at 8:27 PM, Jiri Olsa <jolsa@redhat.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@redhat.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.

I'll send new version shortly

thanks,
jirka


\
 
 \ /
  Last update: 2012-07-26 21:01    [W:0.077 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site