This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: cost of kprobe, jprobe, kretprobe operations
- From: Martin Hunt <hunt at redhat dot com>
- To: Jim Keniston <jkenisto at us dot ibm dot com>
- Cc: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Fri, 24 Jun 2005 17:04:14 -0700
- Subject: Re: cost of kprobe, jprobe, kretprobe operations
- Organization: Red Hat Inc.
- References: <1119634826.3223.36.camel@dyn9047018079.beaverton.ibm.com>
To stop Jim's benchmark from optimizing away probeme(), I had to do
this:
noinline static int probeme(int i)
{
return i + 1;
}
Then modify the test loop:
for (i = 1; i <= niter; i++) {
sum += probeme(i);
}
And print out sum.
The results agree very closely with my benchmark program.
> ./run_bench
STP BENCH for 2.6.9-11.14.EL.huntsmp
16:58:58 up 1:56, 3 users, load average: 0.21, 0.23, 0.27
processors: 4 x86_64
------------------------------------
Jprobes overhead = 2387 ns
Kprobes overhead = 1494 ns
------------------------------------
Return probe overhead = 2175 ns
Entry+Return probe overhead = 2194 ns
Martin