Application of instrument in the kernel

William Cohen wcohen@redhat.com
Wed Feb 23 04:00:00 GMT 2005


I am working on a paper that provides a couple examples on how to 
instrument kernel code with kprobes. I asked for some suggestions on 
things that would be interesting to instrument.

I ended up instrumenting the generic_make_request function that is used 
by the block io devices.

Some of the other suggestion I got:

-Measure the latency to handle do hardware-interrupt processing. This is 
the reason that I did measured the cost of  kprobe and jprobe to 
determine how much overhead this would add.

-Time to do a context switch in the kerne/sched.c:schedule(). In this 
case there are specific places in the function where things happen and 
having markers for those points might be useful.

-Instrument the mm/memory.c:handle_mm_fault() to find out which virtual 
addresses are causing the page faults. Could look at the return value of 
the function to determine whether it was a minor or major page fault.


One of the kernel engineers pointed me to this archived email:

http://marc.theaimsgroup.com/?l=linux-netdev&m=110902672620626&w=2

The referenced pdf document 
(http://developer.osdl.org/shemminger/bic-beta-patch.pdf) has a refernce 
to some probes kprobes written to track down the problem:

http://develop er.osdl.org/shemminger/tcpprobe.tar.gz

It uses jprobes to track down the problem.

-Will



More information about the Systemtap mailing list