Hello Stephane,

Fairly recently, the following lines were added to pfm_initialize() in 
pfm_common.c in libpfm:

...
while(*p) {
+       /*
+        * check for forced_pmu
+        * pmu_type can never be zero
+        */
+       if ((*p)->pmu_type == forced_pmu) {
+               __pfm_vbprintf("PMU forced to %s\n", (*p)->pmu_name);
+               goto found;
+       }

        if (!forced_pmu && (*p)->pmu_detect() == PFMLIB_SUCCESS)
                goto found;
                p++;
        }
}
...


(note: above is not a real patch, it's just for illustration)

These new lines are causing libpfm on POWER to fail because at the point 
where (*p)->pmu_type is checked, it is zero.  It is set only by 
(*p)->pmu_detect().  Because the first if-statement's condition is true, 
pmu_detect() is never called.

I'm not sure what the right solution here, because I don't know what the 
intention of forced_pmu is, exactly.  Maybe the order of these two 
if-statements should be reversed?

To work around this for now, I'm going to comment out the first 
if-statement.

Thanks for your consideration.
- Corey

-- 
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
[EMAIL PROTECTED]


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to