[LLVMdev] One way to support unwind on x86

Andrew Haley aph at redhat.com
Tue Mar 3 03:30:45 PST 2009


Nicolas Geoffray wrote:

> It's *hardly* noticeable. If your language/runtime throws a lot of 
> exceptions, that's the way to go currently (there are other 
> sophisticated techniques, but much more complex). Dwarf is great if your 
> language/runtime basically never throws exceptions. I can't give you an 
> accurate measure of the real cost of Dwarf on Java applications because, 
> unfortunately, libgcc did not optimize its dwarf info lookup on 
> dynamically registered frames. It's doing a linear search of the info, 
> and that takes *a lot* of time.

gcj uses DWARF unwinder data, and the overhead is quite significant;
The unwinder code is fairly high in the list when profiling, mostly
because of the very unfortunate way that ClassLoader.loadClass throws
exceptions when a class could not be found.

It should be easy enough to fix libgcc to do something more efficient
with dynamically registered frames.

Andrew.



More information about the llvm-dev mailing list