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]

Re: cost of kprobe, jprobe, kretprobe operations


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]