Hi,
libpfm is just a helper library which you app can call to figure out the mapping from event name to (register, value) pairs. But it does not setup the registers for you. For that you have to call into the kernel via the perfmon interface. There are a bunch of syscall to create a session, program the registers, read the counts. Please take a look at the examples in libpfm/examples_v2.x. hopefully you will find an example that is close to what you want to do. On Thu, Aug 27, 2009 at 11:32 PM, Tanima Dey<dey_tr...@yahoo.com> wrote: > Hi, > > I need to read the values for the counter to count L2 cache misses. I have > tried pfm_find_full_event(). But this function only takes the string > specifying the name of the event and the event identifier but takes no > parameter for the unit mask. There are some other functions, such as, > pfm_get_event_mask_name or pfm_get_event_mask_description. But I cannot use > these to read the counters calues. Which interface should I use to specify > the unit mask to read the particular counter value? For example, for L2 > cache misses the event is L2_LINES_IN has four masks.The values of the unit > maska are: 0 for this core, 1 for both cores, 2 for all inclusive and 3 fr > hardware prefetch only. How can I specify which unit mask I need to > consider? > > Thanks, > Tanima > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > perfmon2-devel mailing list > perfmon2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel