Hello,

This patch contains a change to use an event that is available for counting in the user-only domain for instructions retired.

PAPI has been using this event for PAPI_TOT_INS for quite some time, and so there has been a difference between what libpfm would give for instructions retired and what PAPI would use for PAPI_TOT_INS. Because the event that libpfm chose was available only on a fixed counter which was not gateable by the privilege level, attempting to count this event in priviledge level other than PLM3|PLM1|PLM0 resulted in the libpfm dispatch function rejecting the event combination.

The replacement event that I've chosen to switch to is not available in every group, but does have the advantage that it can be counted in specific domains (such as PLM3). Because of this, you can now run the libpfm examples without modification on Power5+ and Power6.

Please note that some of the examples, in particular self_smpl_multi, still exhibit problems that we are looking into.

Thanks for your consideration.


- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjash...@us.ibm.com
Index: lib/pfmlib_gen_powerpc.c
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/lib/pfmlib_gen_powerpc.c,v
retrieving revision 1.9
diff -u -p -3 -r1.9 pfmlib_gen_powerpc.c
--- lib/pfmlib_gen_powerpc.c    2 Dec 2008 02:10:40 -0000       1.9
+++ lib/pfmlib_gen_powerpc.c    6 Jan 2009 21:43:15 -0000
@@ -873,10 +873,10 @@ pfm_gen_powerpc_get_inst_retired(pfmlib_
                e->event = POWER5_PME_PM_INST_CMPL;
                break;
        case PFMLIB_POWER5p_PMU:
-               e->event = POWER5p_PME_PM_RUN_INST_CMPL;
+               e->event = POWER5p_PME_PM_INST_CMPL;
                break;
        case PFMLIB_POWER6_PMU:
-               e->event = POWER6_PME_PM_RUN_INST_CMPL;
+               e->event = POWER6_PME_PM_INST_CMPL;
                break;
        default:
                /* perhaps gen_powerpc_suport.pmu_type wasn't initialized? */
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to