cost of kprobe, jprobe, kretprobe operations

Martin Hunt hunt@redhat.com
Sat Jun 25 00:04:00 GMT 2005


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




More information about the Systemtap mailing list