This is the mail archive of the systemtap@sources.redhat.com 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: Exit probe


Hien Nguyen wrote:
Hi,

Here's the prototype for the exit probe. It did not address the two issues that Will raised in the meeting yesterday (locking, and multiple probe for the same entry).

The attached files are

1. kernel-2.6.10-rprobe.patch - The exit probe patch.

2. testrprobe.c - This is the test module, when load it will insert a rprobe for any function entry address given by the entryaddr parameter when loading (ie "insmod testrprobe.ko entryaddr=0xc0abd3456).

3. loadtestrprobe.sh - use this script to load testrprobe module above, it will grep out the entry address for the test_erprobe2 function and use it as entryaddr parameter.

4. calltest2.c - This module symply invoke test_erprobe2 function when it is removed.


Thanks, Hien.


With a minor tweak I was able to patch the 2.6.11-1.1176_FC4 kernel with the patch. I compiled the example modules and was able to get them to work. I did a couple quick experiments with the testrprobe.ko.

I instrumented the handle_mm_fault(). It returns a value to indicate what kind of page fault is encountered.

I also instrumented __kmalloc() to see where the chunks of memory are being allocated.

I expanded my timing routines to measure the time for the exit probes. On the 1.7GH AMD athlon the average cost was 2755 cycles per rprobe. This is pretty close to the cost of two jprobes, 1310.

-Will


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