lkml.org 
[lkml]   [2012]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 00/15] perf: Add backtrace post dwarf unwind
From
Date
On Thu, 2012-03-29 at 10:04 -0700, Stephane Eranian wrote:
> I think the mechanism should allow the user to select which registers
> (you have that) but also where they are captured. You have
> the user level state, but you also want the interrupted state or the
> precise state, i.e., extracting the register at retirement of an
> instruction
> that caused the sampling PMU event (PEBS on Intel). Personally, I
> am interested in the last two. I had a prototype patch for those.
> It is based on the same approach in terms of register naming. You
> need to be able to name individual registers. That's obviously arch
> specific and you have that. Now there needs to be a way to indicate
> where the registers must to be captured. Note that you may want
> to combine user + interrupt states. So I think we may need multiple
> register bitmasks.

This all comes very close to something I suggested to Masami once where
you could specify data to grab on [ku]probe hits.

That is, when creating a [ku]probe based tracepoint you can specify
several variable/argument names and the userspace perf-probe bits will
use the dwarf info to figure out how to obtain the value of said var/arg
at the probe point (if possible, if not bail).

The kernel would simply get something along the lines of %rax->foo->bar,
or (%esp+x)->blah along with a size of the data structure to be found
there and copy whatever it finds out to the raw field.

So what you're saying is you basically want this for any possible
sample, not just [ku]probes.





\
 
 \ /
  Last update: 2012-03-30 02:03    [W:0.474 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site