On Tue, May 19, 2009 at 9:45 AM, Nicolas Geoffray <nicolas.geoffray at lip6.fr> wrote:> Talin wrote: >> I see. OK, I will try that. >> >> I was hoping to be able to test the exception type in the personality >> function - the language I am working on has its own type system, >> unrelated to C or C++, so I want to minimize reliance on C++ exception >> handling libraries. In this case, I guess I can do the exception type >> checking in the landing pad instead of the personality function. >> > > Yes, that's what VMKit used to do, until it realized dwarf exceptions > should never be used for something like Java :)Can you elaborate on that last point a bit? What problems did you run into? -- Talin
On May 19, 2009, at 2:48 PM, Talin wrote:> On Tue, May 19, 2009 at 9:45 AM, Nicolas Geoffray > <nicolas.geoffray at lip6.fr> wrote: >> Talin wrote: >> >> Yes, that's what VMKit used to do, until it realized dwarf exceptions >> should never be used for something like Java :) > > Can you elaborate on that last point a bit? What problems did you > run into?DWARF exceptions (aka zero-cost exceptions) are optimized to be efficient when no exceptions are thrown. They're not efficient at all when exceptions are thrown, so they tend to be a poor match for languages like Java where exceptions are relatively common. --Owen -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2620 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090519/7a8451d6/attachment.bin>
Owen Anderson wrote:> DWARF exceptions (aka zero-cost exceptions) are optimized to be > efficient when no exceptions are thrown. They're not efficient at all > when exceptions are thrown, so they tend to be a poor match for > languages like Java where exceptions are relatively common.Exactly. For instance, VMKit completes the exception-intensive jack benchmark (http://www.spec.org/jvm98/) in 60 seconds with Dwarf exceptions, and in 10 seconds with exception checks after each call. On applications with no exceptions, the exception check code does not cost that much (maybe 1 or 2%). Nicolas