Hello, I got tired of having to maintain different revisions for libpfm, one each time the perfmon syscalls change. Sometimes back ward compatibility is not possible because the perfmon API/ABI changed. But nowadays, changes are happening inside the kernel not so much at the user level.
There have been several new system calls in recent kernels. Those push the perfmon syscalls up on every architectures. Libpfm provides the syscall stubs to call the kernel perfmon API. Those stubs will eventually migrate into libc. The syscall numbers were kept in include/perfmon/perfmon.h and had to be updated for each new kernel version. The problem is that backward compatibility (whenever possible) was not provided. I have created the attached patch to address this problem. The same libpfm can now be used between kernel revisions as long as the perfmon API does not change. This is, for instance, the case between 2.6.24 and 2.6.25 for instance. The trick is to have the code autodetect the kernel version and adjust the syscall accordingly. Another solution would have been to have the kernel export the base syscall number via, let's say, /sys/kernel/perfmon/syscall. I am still hoping we will be in mainline soon, or at least that we will get a fixed block of syscalls soon, at which point, all of this will not be needed anymore, except for special platforms such as Cray. I have tested the attached patch on 2.6.25 on X86-64, i386. Please test it on your platforms and report any problem. Thanks.
libpfm-syscall.diff
Description: Binary data
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel