Discussion:
[ddbg] 'us' after stack overflow takes a Looooong time
Bill Baxter
2007-12-04 00:06:52 UTC
Permalink
It seems like maybe it's building the full string describing the stack
in memory and then printing it out.

--bb
Jascha Wetzel
2007-12-04 10:09:40 UTC
Permalink
Post by Bill Baxter
It seems like maybe it's building the full string describing the stack
in memory and then printing it out.
--bb
hm, in naive tests the printing starts instantly and the speed is
limited by the console output.
what changed in 0.11 is that ddbg goes through the stack twice in order
to find the "last known source location" for stack frames that don't
have source line info. unfortunately, i don't see a way to do it in one
pass, since the stack frames can only be unwound in one direction.

there still is potential for optimization, though, since for every stack
frame i do a tree search for the source location of the return address.
assuming that in a stack overflow situation there are only few locations
repeated many times, hashing the lookup results could speed it up.

if you can send me a testcase, i'll do some profiling.

Loading...