The cost of stack traces

Bryce McKinlay mckinlay@redhat.com
Fri May 12 20:26:00 GMT 2006


Andrew Haley wrote:
>  > I agree that changing the default to not show line numbers is a bad
>  > idea. Java developers _expect_ them to be there
>
> Always?  I vaguely remember JITs that didn't provide much of this when
> optimizaing.  I might be wrong about that.
>   

I can recall JITs sometimes lost the debug info years ago, but AFAIK all 
the modern ones always provide full stack traces, including line 
numbers, regardless of optimization. Certainly Sun's VMs do.
>  > and not providing them would be an awkward deviation from other
>  > implementations. IMO, improving the performance of line number
>  > lookup is the best fix for the general case.
>
> There is some sense in simply blacklisting libraries that don't have
> debuginfo, for sure.  This will make most of the problem go away for
> Fedora Core, but it might be mystifying for people to discover their
> application slows down when they rebuild from source!  Still, that
> isn't a strong objection: it solves the problem for many of our
> end-users.
>   
Yes, I think so - and ultimately, I think, the problem will be fixed 
entirely by improving the line number lookup.

Bryce



More information about the Java mailing list