Restrictions for lock coarsening?
Thomas.Rodriguez at Sun.COM
Tue Jan 6 10:30:52 PST 2009
> This already came up once and I wanted to ask the following question
> back then (but forgot):
> Why is it an absolute time value and not some definite point in the VM
> startup sequence?
The delay in enabling biased locking is basically just a workaround
for startup issues that were encountered with enabling biased locking
by default. 4 seconds was an empirically derived number that gave us
the startup behaviour we wanted and it's well after the JVM has
finished starting up so it couldn't be part of our startup since it's
>> 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
> - Christian
More information about the hotspot-runtime-dev