Hi Manoje, So thanks for running those experiments for me. What I seem to have found is that there is some instability in the counts that is very infrequent. It doesn't seem to matter if I use one counter or two or whether the system is loaded or not. Another modification I made to self was that I removed the '3 passes' and just did '1 pass' but I moved the load context up before the write_pmc/write_pmd pair. That also caused intermittent failures...and they were VERY intermittent...sometimes 1 out of 50 runs. If I put a loop around the writepmd/start/loop/stop/read/print section, I could never get the failures to appear. I am putting more debugging into the kernel and will be testing it after I get back from Sri Lanka here in a few weeks. I was thinking about maybe why you didn't see the error on your system...I think it could be because of the clock rate...We're on a malta which is a 24K system running at 640Mhz with no L2 cache.
Another problem I had spotted was with self notification, but that didn't show up in the libpfm test suite, In PAPI I use the sigpoll.si_fd value from the signal handler to find out which FD I should read() the data from. If you look in notify_self, you'll see that Stefane cheats and stores it in a global variable. ;-) (BTW, Stefane this should be changed to read it from the context...it's more useful to users that way and tests more of the system) Now, I'm using a 64 bit 2.6.15 kernel with 64 bit user land and the si_fd was zero according to the sig handler. Inspecting the signal context indicated that there was an wrong offset somewhere...because the correct FD was in the structure, just at an offset I didn't expect. I would recommend that on your system, you try digging out the si_fd from the signal context and see if that value is 0 or if it is a valid context. That would be a linux bug (maybe in the libc headers) and needs to be fixed. Well, that's the latest. Regards, Phil _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
