This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pfaults.stp fix (for 2.6.13 and beyond)


Badari Pulavarty <pbadari@us.ibm.com> writes:

> Yes. I noticed that too. Is there a sane of handling these between
> two kernel versions ? (like function name changes, #define changes,
> disappearing functions).

There isn't an easy way for end-user scripts.  Scripts installed under
tapset/ can use the kernel-version-sensitive search paths.  I
envisioned hiding such version drift in these tapset variants exactly
so that end-user scripts would not need to be aware.  But perhaps this
is not sufficient.

> I tried doing,
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
> probe kernel.function("handle_mm_fault") {
> #else
> probe kernel.function("__handle_mm_fault") {
> #endif
> But doesn't work.

That is because stp sources are not processed through cpp, and even if
they were, it'd have to be told to locate kernel headers that define
such macros, and yet avoid pulling in all the C code.

Several people have suggested a version-sensitive ifdef construct for
the scripting language, and I'm finally coming around on that.  I'll
open a bugzilla entry to track its implementation.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]