Restrictions for lock coarsening?
Christian Thalinger
christian.thalinger at gmail.com
Tue Jan 6 10:46:56 PST 2009
On Tue, 2009-01-06 at 10:30 -0800, Tom Rodriguez wrote:
> >> This means that objects created during that time period
> >> aren't allowed to use biased locking.
> >
> > Throughout the whole lifetime?
>
> Throughout the whole lifetime of that object. Biased locking
> maintains state in the header of an object which says whether it can
> be biased or not. The initial state is read from its the class
> object's Klass::_prototype_header field at allocation time and is
> written into the header word. The biased locking startup delay works
> by having every classes initial state be not biasable and then after
> the delay expires they are all marked as biasable. Every object
> allocated after that point will be biasable. It's definitely an
> unsatisfying solution.
It's already some time ago I looked at the biased-locking code... is it
possible at all to revoke contented locks (or CAS-based locks) to be
biasable? If yes, is the "not-biasable" state different to CAS-based
locks?
- Christian
More information about the hotspot-runtime-dev
mailing list