The cost of stack traces
David Daney
ddaney@avtrex.com
Wed May 10 19:14:00 GMT 2006
Anthony Green wrote:
> On Wed, 2006年05月10日 at 11:32 -0700, David Daney wrote:
>>>This "familiar" stuff would necessarily contain an IP->source_line
>>mapping.
>>> No, not quite. It would contain a "stack region" to "stack trace"
> mapping. Once we hit something that looks familiar, and memcmp the rest
> of the stack, we know what the rest of the stack trace will look like.
My point was that the "rest of the stack" can be thought of as a
sequence of mappings from IP->source_line. If you were to keep a cache
of these things, the overhead would not be much different from that of
an IP->source_line map for all stack frames encountered. You would lose
the sequence information, but that does not matter as it is available
from the new trace.
David Daney,
More information about the Java
mailing list