On Tue, Jun 1, 2010 at 4:35 PM, stephane eranian <eran...@googlemail.com>wrote:

> Dan,
> > Thanks, I think that does answer it.  Follow-up question:  is there an
> easy
> > way to also collect the PC at each sample, using libpfm4?  Or would the
> best
> > way to do it be each time in print_counts to also open and read
> > /proc/$pid/stat?
> >
> For sampling, you want to take a look at task_smpl.c instead. Perf_events
> does use an in-kernel sampling buffer and it is available to the user via
> mmap(). For each sample you can ask it to record the IP. So look at the
> example, and send me question if you need more help.
>

Well, what I'm aiming for is a time-based sample that includes the
performance event counts and PC.  I've used task_smpl as a base before, but
I was under the impression that it used the counters as a sampling trigger,
and there wasn't really any way to maybe use one counter to trigger sampling
while using other counters in counting mode.
------------------------------------------------------------------------------

_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to