runtime libraries application on schedule()

William Cohen wcohen@redhat.com
Wed Mar 9 20:55:00 GMT 2005


Hi Martin,

I noticed that you checked in a bunch of runtime stuff today. I was 
thinking about possible applications/instrumentations using the runtime 
library. One of the things I was thinking was instrumentin the 
schedule() function. It is called each time the processor yields. I 
assume that many of the device drivers are written to yield the 
processor when they are waiting for IO with a schedule.

Use a jprobe to instrument the entry to schedule().
Record the pid and the return address.

The information could be analyzed in a sevral different ways:

1) sum based on return address to find out which schedule points are 
getting hit all the time
2) sum the counts by pid to figure out which pids are getting 
rescheduled a lot
3) find out pid hitting which schedule() points
4) find out schedule() point being encountered by which process

Comments on implementing this instrumentation?

-Will



More information about the Systemtap mailing list