RFR (S) 8232788: Move biased locking initalization
david.holmes at oracle.com
Wed Oct 23 23:46:39 UTC 2019
On 23/10/2019 10:37 pm, coleen.phillimore at oracle.com wrote:
> On 10/22/19 10:29 PM, David Holmes wrote:
>> Hi Coleen,
>> On 23/10/2019 5:54 am, coleen.phillimore at oracle.com wrote:
>>> Summary: Move from before adding to the dictionary to during
>>> InstanceKlass construction, which occurs right before.
>> Right before? I had trouble seeing where the IK was created relative
>> to the call to SD::update_dictionary. But I don't think it really
>> matters as long as the biased locking state is set before the new IK
>> gets added to the SD.
> Right. The InstanceKlass is parsed or loaded from the shared archive,
> then added to the SD. Nothing else gets to see the InstanceKlass until
>> But I don't understand the change to restore_shareableinfo. Where
>> would the biased locking state get set on that code path today?
> Today, it's updated in update_dictionary in the case where the klass is
> loaded from the shared archive.
Okay. I can't track where update_dictionary gets called in relation to
the use of load_shared_class and the subsequent call to
> With this simple change, it's done in
> the constructor and removing this code from SystemDictionary that
> shouldn't know anything about it.
I agree SD shouldn't need to know about it.
>>> Tested with tier1 all Oracle platforms, tier 2-3, linux-x64-debug,
>>> tier1 with -XX:BiasedLockingDelay=100, and gtest with
>>> open webrev at
>>> bug link https://bugs.openjdk.java.net/browse/JDK-8232788
More information about the hotspot-runtime-dev