From: Tim Wilkinson (tim@transvirtual.com)
Date: Wed Jan 13 1999 - 14:54:18 EST
Given this can anyone see how to optimize multiple entry of the same lock, or the
common case where a lock is never in contention?
Tim
> >
> > Godmar Back writes:
> > > This is possible because MONITOR_ENTER and MONITOR_EXIT always occur in pairs.
> > > However, it will require changes to the JIT to store the address of the
> > > lock returned from MONITOR_ENTER somewhere, presumably on the stack.
> >
> > I remember hearing about some talk (Sun? IBM?) that described
> > doing exactly this: they made the same observation, ie, that
> > monitor lock information naturally can be stored on the stack,
> > since Java locks are really 'stack based'. The implication was
> > that this was a clever thing to do and was a win.
> >
>
> Let's hope they don't hold a patent.
>
> I actually remembered that Sun said they would make "synchronization
> practically free" and "exploit the symmetry". So I discussed this
> yesterday with Pat and we oracled on what they might be doing, and
> this is what we come up with.
>
> - Godmar
-- Tim Wilkinson Tel: +1 510 704 1660 Transvirtual Technologies, Inc., Fax: +1 510 704 1893 Berkeley, CA, USA. Email: tim@transvirtual.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:41 EDT