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().


> Philip
> www.samaratechnologygroup.com
>
>
> On Apr 27, 2010, at 2:02 PM, Dan Upton wrote:
>
>> Hi all-
>>
>> I'm trying to get an interrupt every 1m instructions so that I can
>> read some other information in the system (such as the temperature
>> sensor on a Core 2).  I tried building off of pebs_smpl from the
>> libpfm4 git tree, but I can't figure out what I would need to do to
>> get notified every sample: if I'm understanding it correctly,
>> process_smpl_buffer is only called once some buffer in memory
>> overflows.  Is there a reasonable way using libpfm4 (or anything
>> from perf) to get notified at every interrupt?
>>
>> Thanks,
>> -dan
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> perfmon2-devel mailing list
>> perfmon2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>

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

Reply via email to