New sub-profiler Branch
Michael Schroeder
mls at suse.de
Fri Sep 2 19:17:45 UTC 2011
Hi Parrot-Dev,
cotto asked me to write a bit about the sub-profiler branch.
Some background: I wrote it to profile Rakudo's setting compilation.
I first tried parrot's current profiling support, but found
out that it slowes down parrot too much, as it writes a line
for every op and every context change instead of incrementing
internal counters.
So I hacked together my own little profiling runcore. It directly
writes kcachegrind ready data to stderr. Instead of doing it
right I patched the "slow" runcore, so "-R slow" will turn on
profiling.
It curently both counts ops and ticks, for ticks it uses
the hardware-dependant Intel/Amd Time Stamp Counter.
I spent a bit of time to get the callcontext changes right, so
it should handle exceptions/continuations/tailcalls.
The code wasn't meant to be seen by the public in the current
state, so please be kind. I got pressurized to release it so
early ;-)
Enjoy,
Michael.
--
Michael Schroeder mls at suse.de
SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
More information about the parrot-dev
mailing list