copile java 1.5 code
Mark Wielaard
mark@klomp.org
Thu Jan 27 20:55:00 GMT 2005
Hi,
On Thu, 2005年01月27日 at 09:49 -0700, Tom Tromey wrote:
> >>>>> "Hans" == Boehm, Hans <hans.boehm@hp.com> writes:
>> Hans> _Jv_MonitorEnter and _Jv_MonitorExit are high, with 3.27 seconds
> Hans> each. It looks like hash synchronization is enabled here? We know we
> Hans> don't do this as well as we should. The compiler could probably help
> Hans> by passing the hash table address from one to the other, and by
> Hans> avoiding checks in MonitorExit when it knows we hold the
> Hans> lock.
>> Interesting ideas. For the latter I think this could only be done
> when there are no intervening calls as there is no guarantee that a
> call preserve the count on a lock.
If you are compiling source -> native you know this to be true when you
encounter a synchronized method or synchronize(someObject) { } block.
(Yes, theoretically it could call a method that through byte code
manipulation or JNI does a MonitorExit on your lock, but that would by
such horribly nasty ugly code that I don't think we should worry about
it since it would also break your code in the normal case.)
Cheers,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java/attachments/20050127/4d61561f/attachment.sig>
More information about the Java
mailing list