On Tue, Apr 27, 2010 at 7:34 PM, stephane eranian <eran...@googlemail.com>wrote:
> On Tue, Apr 27, 2010 at 11:31 PM, Philip Mucci <mu...@eecs.utk.edu> wrote: > > Hi Dan, > > > > See the 'overflow' examples in the libpfm directory. (I'm assuming > > they exist in libpfm4) You don't really want buffered sampling here, > > because you are taking the interrupt directly as a signal rather than > > buffering the information. > > > For perf_events, there is an example that does just that. It is called > notify_self. You get notified for each sample. Note that with perf_events > you need a kernel sampling buffer, even if you want to get notified for > each sample. > > > Also, you don't need PEBS for this, since you are not looking for the > > precise IP upon sample time... > > > No PEBS needed, I agree. > > > Conversely, you could simply use the process_smpl_buffer example, but > > make sure your sample buffer only has enough room for one sample. That > > will likely cause more overhead... > > > > Hope this helps. > > > > I am still wondering why you need to use the PMU to get a signal every 1ms. > You may as well use a regular timer via setiitmer(). > Thanks for the pointers! I'd missed notify_self. I'd assumed PEBS was the way to go, since precise sampling sounded like the right thing :) To answer your question though, I can't use a timer because I'm not interested in, say, 1msec intervals (for this specific work, anyway)--I want to know every 1 million (or more generally, every n) instructions. I could always try to approximate it by calculating the IPC for the application and input and then set a timer based on cycle time and the number of cycles to complete n instructions, but that wouldn't account for phases or other change in IPC, etc.
------------------------------------------------------------------------------
_______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel