Hi Ying,

I think you can take a look at the example code in libpfm3. There are many 
examples to show how to program the counter to enable the sampling (EBS).

Xu
On Jul 6, 2011, at 10:29 PM, Ying Zhang wrote:

> Hi,
> 
>     I've briefly looked through perfmon's document. It seems that perfmon 
> provides both time-based sampling and event-based sampling. In the 
> event-based sampling mode, a sampling is made when a preset event reaches a 
> specific threshold. I think this is exactly what I want. That is, collect the 
> counter values after every million instructions are retired. Also, perfmon 
> provides two options: --long-smpl-periods and --short-smpl-periods. I believe 
> these two options are related to the sampling period setting. Can anyone 
> generally explain how to do a sampling in event-based mode?
> 
>    Maybe this question is sort of silly, but please, I really have no idea...
> 
>   Thanks very much,
> Ying
> 
> On Wed, Jul 6, 2011 at 4:45 PM, Ying Zhang <yzha...@tigers.lsu.edu> wrote:
> Thanks Corey, I think I'll take a look at the "perf" tool first.
> 
> 
> On Wed, Jul 6, 2011 at 4:36 PM, Corey Ashford <cjash...@linux.vnet.ibm.com> 
> wrote:
> On 07/06/2011 12:45 PM, Ying Zhang wrote:
> > Thanks for your reply, Pradeep. I am conducting my experiment on an
> > Intel Xeon E5530 (Nahalem architecture) processor, and the operating
> > system is Fedora 13 X86_64. Can I use perfmon on this platform?
> 
> No, because Fedora 13 is based upon the 2.6.33 kernel.  The perfmon2
> patch set only works on 2.6.30 kernels and earlier.
> 
> You're better off using the newer kernel API called perf_events.
> There's a user space tool that's available with Fedora 13 and later,
> called "perf"  (do a "yum install perf" and you should get it).
> 
> If you want to do exactly what you are talking about instead of using
> either "perf record" (for profiling) or "perf stat" (for counting
> events), you will need to write the code yourself.
> 
> To write the code yourself, you could use either the raw kernel API, or
> use PAPI which should make your job a little easier.
> 
> PAPI should also be available via yum in Fedora 13, I think (try "yum
> install papi").
> 
> You can find the programming details of PAPI here:
> 
> http://icl.cs.utk.edu/projects/papi/wiki/PAPIC:PAPI.3
> 
> If you have specific questions about how to use PAPI, PAPI has its own
> mailing list.
> 
> - Corey
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
> 
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and makes 
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2_______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Best regards,

Xu Liu
PhD student, Rice University





------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to