Why is mark read as MO_RELAXED in read_stable_mark()?

Roman Kennke rkennke at redhat.com
Mon Jul 12 14:04:13 UTC 2021


Hi Hotspot runtime devs,

I am messing a little bit with read_stable_mark() in synchronizer.cpp in 
Lilliput project (because I want to load the Klass* from the header).

I notice that, in read_stable_mark(), we are loading the header with 
MO_RELAXED memory ordering, even though the INFLATING header is stored 
either via CAS or (re-)stored with MO_RELEASE. Wouldn't it be more 
consequential to load the header with MO_ACQUIRE instead?

Thanks,
Roman



More information about the hotspot-runtime-dev mailing list