[ddbg] 'us' after stack overflow takes a Looooong time
Jascha Wetzel
firstname at mainia.de
Tue Dec 4 02:09:40 PST 2007
Bill Baxter wrote:
> 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.
More information about the Digitalmars-d-debugger
mailing list