[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190319141316.GH6521@hirez.programming.kicks-ass.net>
Date: Tue, 19 Mar 2019 15:13:16 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: kan.liang@...ux.intel.com
Cc: acme@...nel.org, mingo@...hat.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, jolsa@...nel.org, eranian@...gle.com,
alexander.shishkin@...ux.intel.com, ak@...ux.intel.com
Subject: Re: [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@...ux.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.
Powered by blists - more mailing lists