Robert, On Wed, Sep 26, 2007 at 02:59:04PM +0200, Robert Richter wrote: > On 26.09.07 05:32:23, Stephane Eranian wrote: > > > > However, with commit id d9899320399f8055ed79863d037dc3d9d37bbe66, this > > > is no longer possible for read only PMDs. Is there a another way of > > > marking a RO PMD? > > > > > Are you talking about IBS support? > > Right, IBS PMDs are read only. Until now I marked the PMDs to use with > a write. Since it is readonly, the write newer affected the PMU. After > I receceived an overflow message, I was able to read the PMD. I did > not use the sampling methods for data collection.
Ok, I think I understand the issue. The current codebase only works when you are using kernel-level sampling buffers. For sampling from the user-level, this does not quite work, unless you pick another PMD, let's say PMD4, and write it with its reg_smpl_pmd[] = IBSDATA registers. Then the IBS PMD will be marked as used and you will be able to read them. Another solution, as you mentioned, is to have writes to read-only PMD registers be ignored rather than returning an error. I can modify the code to make this happen (again). Thanks. > > In general if you want to sample a read-only PMD, you need to include it > > into the reg_smpl_pmds[] bitmask of another PMD registers used as a counter. > > I did only a quick look at the sources, maybe I have to dig deeper. I > found only __pfm_write_pmds() where smpl_pmds can be set. So this will > fail for read only PMDs. My intention is to read back only one PMD > what is read only, no other writeable counter register. Doing so, I > see no chance to either set smpl_pmds or mark the register as used. > > -Robert > > -- > Advanced Micro Devices, Inc. > Operating System Research Center > email: [EMAIL PROTECTED] > -- -Stephane _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
