classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Query on stacktrace management logic


From: David Holmes
Subject: RE: Query on stacktrace management logic
Date: Sat, 28 Feb 2004 10:59:01 +1000

Andrew Haley wrote:
> Well consider what happens in a VM.  VMThrowable.fillInStackTrace() is
> very fast -- it's just a chain of addresses.
> VMThrowable.getStackTrace() is very slow, because it has to convert
> all those addresses into StackTraceElements.  I suspect that you can
> get the trace for the whole stack in less time than it takes to create
> a single StackTraceElement.  For this reason, the vmState is stored
> and lazily converted to a StackTraceElement[].

Thanks - I see now. Unfortunately in our system (at present) this is not the
case. But now I have an idea of how to change that.

I still need a hook to not get the stacktrace filled in for
OutOfMemoryError - though perhaps I can do something without requiring
allocation using a different approach.

Thanks again.

David Holmes





reply via email to

[Prev in Thread] Current Thread [Next in Thread]