Will, On Wed, Jan 03, 2007 at 01:00:10PM -0500, William Cohen wrote: > One of the concerns about the measurement being produced by perfmon2 > is that they are correct (or close enough for government work:). Given > the variety of events that the performance monitoring hardware > measures just getting events that provide verifiable counts for > user-space only can be a challenge. The testing framework has events > for various processors that can be counted in some repeatable manner. > > I looking at testing the privilege level mask filtering for user- and > kernel-space. The test code doesn't know what code is running in the > kernel. Thus, trying to do repeatable counts is not going to be > possible. Thinking through what possible failure modes there could be > for the user/kernel space event filtering: > > -Count perfmon event when not suppose to > -Not count perfmon event when suppose to > The one key thing to keep in mind with priv level mask (plm) is that perfmon does not do anything specific with them. It does not even know where they are located in the configuration registers. All perfmon sees is a 64-bit config register with some reserved bitfields and a default value. If something is wrong with the reserved mask, then this could alter the normal plm behavior but besides that, the only other place would be if perfmon forgets to save/restore the config register, but then you have bigger problems.
> The number of events is not known and could vary because of the kernel > code. One thought is to compare multiple measurement on a run to see > that the values are consistent and sane: > The one event I am been using for a long time on IA-64 is unaligned loads. Those do not normally occur. They are easy to trigger on demand, and should not occur in the kernel. The problem is that not all PMU (especially on X86) have an event to count those. > * user-space only count <= user+kernel+space count > * kernel-space only count <= user+kernel+space count > * no-space count == 0 > Another thing to keep in mind is that depending on the event, it could be that it is attributed to the wrong plm if it occurs at the boundary of user vs. kernel. > Any thoughts or comments about testing this area of perfmon? > I think you should start by comparing the list of events between AMD Opteron and Intel Core 2 Duo, identify the common events and then pick the ones for which you can build an artificial example that would trigger the event on demand. -- -Stephane _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
