pfaults.stp fix (for 2.6.13 and beyond)
William Cohen
wcohen@redhat.com
Wed Oct 5 16:14:00 GMT 2005
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.
-Will
>
>
>
>
>
> ------------------------------------------------------------------------
>
> --- tests/testsuite/systemtap.samples/pfaults.stp 2005-10-05 08:13:29.000000000 -0700
> +++ tests.new/testsuite/systemtap.samples/pfaults.stp 2005-10-05 08:11:27.000000000 -0700
> @@ -2,7 +2,7 @@
>
> global pidnames, faults, fault_types
>
> -probe kernel.function("handle_mm_fault") {
> +probe kernel.function("__handle_mm_fault") {
>
> # Maintain a pid-to-execname mapping. This logic should get transplanted
> # into a tapset script that is automatically included upon reference to
> @@ -15,7 +15,7 @@ probe kernel.function("handle_mm_fault")
> # (needed only until bug 1132 supports $retvalue)
> function get_retvalue:long () %{ THIS->__retvalue = fetch_register(0); %}
>
> -probe kernel.function("handle_mm_fault").return {
> +probe kernel.function("__handle_mm_fault").return {
> fault_types [pid(), get_retvalue()] ++
> }
>
More information about the Systemtap
mailing list