lkml.org 
[lkml]   [2019]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/22] perf/core: Support outputting registers from a separate array
On Tue, Mar 19, 2019 at 02:00:04PM +0100, Peter Zijlstra wrote:
> On Mon, Mar 18, 2019 at 02:41:23PM -0700, kan.liang@linux.intel.com wrote:

> > @@ -6274,6 +6275,7 @@ void perf_output_sample(struct perf_output_handle *handle,
> > u64 mask = event->attr.sample_regs_user;
> > perf_output_sample_regs(handle,
> > data->regs_user.regs,
> > + NULL,
> > mask);
> > }
> > }
> > @@ -6306,6 +6308,7 @@ void perf_output_sample(struct perf_output_handle *handle,
> >
> > perf_output_sample_regs(handle,
> > data->regs_intr.regs,
> > + data->extra_regs,
> > mask);
> > }
> > }
>
> See, I think most of this is completely unnessecary. Both sites pass:
> &perf_regs::regs to perf_output_sample_regs()<-perf_reg_value().
>
> So all you need to do is add the XMM crud to perf_regs, and use
> container_of() on the pt_regs pointer in perf_reg_value() to get back to
> perf_regs and voila, XMM registers.

Ah, that's not quite true, but I still think you can make something like
that work.

\
 
 \ /
  Last update: 2019-03-19 15:14    [W:0.069 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site