December 04, 2007 [ddbg] 'us' after stack overflow takes a Looooong time | ||||
---|---|---|---|---|
| ||||
It seems like maybe it's building the full string describing the stack in memory and then printing it out. --bb |
December 04, 2007 Re: [ddbg] 'us' after stack overflow takes a Looooong time | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | 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.
|
Copyright © 1999-2021 by the D Language Foundation