[LLVMdev] One way to support unwind on x86
Luke Dalessandro
luked at cs.rochester.edu
Tue Mar 3 06:23:56 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.
Plus, for those of us who care, the linear search is protected by a
single mutex because there appears to be the potential that dynamically
registered frames can be removed from the list (in addition to being
inserted) and a mutex is the easiest way to protect against inconsistency.
Unfortunately, this means that threads that throw a lot will end up
serializing here, plus there's a decent amount of cache-line pinging for
read-only use of the list.
There are other ways to deal with the potential concurrent removal from
the list that force the remover to do much more overhead (rcu, node
pools rather than deallocation, etc), but I've never gotten around to
actually doing it.
Luke
>
> Nicolas
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list