Stefane, Is there a way to adapt this code to tell me how many resulting PMD's I have left? PAPI trys to tell the user what is going on...I can see the support messages now. "Hey I have 4 counters, but I can only add 3, what's going on?"
Phil On Tue, 2006-10-31 at 11:48 -0800, Stephane Eranian wrote: > Your are trying to write pmc0. If on AMd64 or P6, pmc0 normally exist > UNLESS you have the NMI watchdog turned > on. Take a look in /sys/kernel/perfmon/pmu_desc, if you do not have a > pmc0 subdir, then that is probably the > issue. > > I do not know how PAPI uses libpfm, but if you take a look at the > examples, you will see that they > pass a bitmask pfp_unavail_pmcs to pfm_dispatch_events(). This is the > list of PMC that are not > available. Using this information libpfm, work around the PMC > limitations. You need to populate > the bitmask, in the example subdir, take a look a detect_pmcs.c. I > suspect PAPI is nott doing this, thus > libpfm returns an invalid assignment. Tools cannot assume they own the > entire PMU, they need to query > what's available. > > Hope this helps. _______________________________________________ perfmon mailing list perfmon@linux.hpl.hp.com http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/