This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: minutes 2009-03-19
- From: Mark Wielaard <mjw at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Fri, 20 Mar 2009 23:06:35 +0100
- Subject: Re: minutes 2009-03-19
- References: <20090319175731.GV12974@redhat.com> <mailman.15643.1237562572.2999.external-perftools-list@redhat.com> <y0miqm49mkk.fsf@ton.toronto.redhat.com>
On Fri, 2009-03-20 at 12:38 -0400, Frank Ch. Eigler wrote:
> Mark Wielaard <mjw@redhat.com> writes:
>
> > Frysk contained an fstep program based on ptrace. [...] And it was
> > indeed horribly slow :) [...]
>
> If you have or can easily make a copy, could you try benchmarking it
> against...?
>
> # stap -e 'probe process("foo").insn {}' -w -t -c foo
It is really no contest, even with just counting the number of steps
of /bin/true (yes -t already does that, but I thought it more fair to
write a real "counter", it doesn't really matter much, around 0.01s):
$ LD_LIBRARY_PATH=~/src/frysk/obj/frysk-imports/elfutils/backends time
-p ../install/bin/fstep -s 120000 /bin/true
Total steps [2119]: 117681
[2119] Exited: 0
real 12.96
user 7.55
sys 5.45
$ time -p /usr/local/systemtap/bin/stap -e 'global steps; probe process("/bin/true").insn {steps++} probe end {printf("steps: %d\n", steps);}' -w -t -c /bin/true
steps: 137793
probe process("/bin/true").insn (<input>:1:15), hits: 137793, cycles: 286min/300avg/56518max
probe end (<input>:1:57), hits: 1, cycles: 6193min/6193avg/6193max
real 0.93
user 0.39
sys 0.52