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] | |
Here's some mail I sent a couple of weeks ago. (I've been meaning to publish this to the systemtap list, but I've never gotten around to doing it up all pretty. So here it is, ugly.) Since then, I installed Rusty's patches from 6/16 and reran the timings. (This was on 2.6.12-rc6-mm1.) Here's what I saw: rtime.c (return probe only): 0.92 usec per hit (was 1.50 usec pre-Rusty) krtime.c (kprobe on entry + return probe): 0.99 usec (was 1.37 usec -- yes, less than the kretprobe alone) jrtime.c (jprobe + return probe): 1.40 usec (was 1.82 usec) ktime.c (kprobe only): 0.57 usec (same as before) jtime.c (jprobe only): 1.01 usec (same as before) So with Rusty's patches (which eliminated an unnecessary single-step), a return probe now costs less than a jprobe, at least on my system. Enclosed find the test programs I ran. To get the timings, I ended up just running "time insmod ..." and looked at system time. :-} Jim -----Forwarded Message----- From: Jim Keniston <jkenisto@us.ibm.com> To: Carl Love <carll@us.ibm.com> Cc: Brad Peters <bpeters@us.ibm.com> Subject: Re: Fw: cost of kprobe and jprobe operations Date: 10 Jun 2005 17:16:13 -0700 I did some timings on my T40 (1.496 MHz Pentium M -- 2957.31 bogomips). I tried with NULL handlers (except for jprobes, where this is not allowed), empty (no-op) handlers, and very simple (increment a counter) handlers. The timing differences among these options was maybe 1%. I also ran the same test with no probes enabled to get the overhead of just calling the probed function. This was less than 1% in all cases. Each kprobe hit cost about 0.57 usec. Each jprobe hit cost about 1.01 usec. Each kretprobe hit cost about 1.50 usec. With both a jprobe and a kretprobe set on the same function, each function call cost about 1.82 usec. (The jprobe and the kretprobe share a probepoint at the entry to the function. This would also be true of a kprobe and kretprobe on the same function.) Jim
Attachment:
kprobe_timings.tar.gz
Description: GNU Zip compressed data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |