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



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to