gcj: disabling synchronization
Jeff Sturm
jsturm@sigma6.com
Sat Apr 1 00:00:00 GMT 2000
I'm thinking about adding a flag to gcj to disable synchronization for
single-threaded programs (i.e. when libgcj is built without
--enable-threads), something like -fno-synchronized perhaps.
I've found that synchronized blocks incur significant overhead in
single-threaded code, particularly when configured with SJLJ_EXCEPTIONS.
It's easy to defeat synchronized methods in decl.c. Synchronized
blocks are a little harder... I didn't completely understand the tree
structure created by patch_synchronized_statement. It may be obvious to
anyone who understands the compiler internals (which I certainly don't).
Does anyone think this would be worthwhile for gcj?
--
Jeff Sturm
jsturm@sigma6.com
More information about the Java
mailing list