This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: pfaults.stp fix (for 2.6.13 and beyond)
On Wed, 2005-10-05 at 12:15 -0400, William Cohen wrote:
> Badari Pulavarty wrote:
> > Hi,
> >
> > handle_mm_fault() became a inline function now (2.6.13 & beyond).
> > So pfaults.stp should use __handle_mm_fault() instead.
> >
> > Thanks,
> > Badari
> >
> > [root@elm3b23 systemtap.samples]# stap -g pfaults.stp
> > semantic error: no match for probe point
> > while: resolving probe point kernel.function("handle_mm_fault")
> > semantic error: no match for probe point
> > while: resolving probe point kernel.function
> > ("handle_mm_fault").return
> > Pass 2: analysis failed. Try again with '-v' (verbose) option.
>
> The number for the various types of faults will also need to be
> adjusted. Looking at 2.6.13-1.1526 kernel used in FC4.
>
> linux-2.6.13/include/linux/mm.h has:
>
> #define VM_FAULT_OOM 0x00
> #define VM_FAULT_SIGBUS 0x01
> #define VM_FAULT_MINOR 0x02
> #define VM_FAULT_MAJOR 0x03
>
> I noticed this because of the large number of major faults without any
> minor faults recorded. However, using the numbers above I see values
> that look more reasonable for minor faults, but I don't see any major
> faults counted when I was playing around with this.
>
Yes. I noticed that too. Is there a sane of handling these between
two kernel versions ? (like function name changes, #define changes,
disappearing functions).
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.
Thanks,
Badari