This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |