]> sourceware.org Git - systemtap.git/commit
Cache the last result of dwarf_getscopes
authorJosh Stone <jistone@redhat.com>
Tue, 2 Jun 2009 07:43:49 +0000 (00:43 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 2 Jun 2009 07:43:49 +0000 (00:43 -0700)
commitc8ad068755e7424e767660f2c27cb3b1e2d5343d
tree8d927da0ab13dac41b24560b5e472d2fa9e13e8e
parent276465828851648edc5b56f762a0d100051c9e32
Cache the last result of dwarf_getscopes

This one function accounted for ~30% of my callgrind profile of
"stap -l 'syscall.*'", even though it was only called ~1200 times.  We
call dwarf_getscopes for each $target variable, with the same parameters
within a given probe.  Since they're no nicely grouped, it's easy to
just cache the most recent call, and the next few calls will be a hit.

Overall this cuts the number of calls down to about 300, for an easy
speed gain.
dwflpp.cxx
dwflpp.h
This page took 0.024764 seconds and 5 git commands to generate.