Native wrapper compilation and LLVM 2.6
gbenson at redhat.com
Wed Oct 28 02:58:32 PDT 2009
This past week or so I've been working on making Shark support
compilation of native (JNI) method wrappers. The way HotSpot
does this has the wrappers being generated outside the compiler
thread, so you have LLVM calls being made from two different
LLVM < 2.6 doesn't support this, and it's not possible to work
around this with locking; the compiler thread in HotSpot runs
_thread_in_native, which means it cannot hold locks. (And if
you hack one in there, it deadlocks at the first safepoint ;))
I'm wondering... is anyone using Shark with LLVM < 2.6? I have
two options here:
- Write it such that JNI compilation is conditional on
LLVM >= 2.6. This requires lots of #ifdefs but is possible.
- Strip out LLVM < 2.6 support. This is easier (and neater,
IMO). But not really an option if someone depends on it.
What do people think?
More information about the zero-dev