RFR: 8154750: Add missing OrderAccess operations to ClassLoaderData lock-free data structures

Kim Barrett kim.barrett at oracle.com
Fri May 27 20:59:22 UTC 2016


> On May 26, 2016, at 11:39 PM, David Holmes <david.holmes at oracle.com> wrote:
> 
> Hi Kim,
> 
> Updated webrev:
> 
> http://cr.openjdk.java.net/~dholmes/8154750/webrev.v2/

------------------------------------------------------------------------------ 
src/share/vm/classfile/classLoaderData.cpp
 363         // lock-free iteration will either see k or k->next_link, both
 364         // of which are stable

I think this new comment isn't needed, given Stefan's reply and your
plan to add an assert_locked_or_safepoint to this function.

------------------------------------------------------------------------------ 
src/share/vm/classfile/classLoaderData.cpp
 210 void ClassLoaderData::packages_do(void f(PackageEntry*)) {
 211   assert_locked_or_safepoint(Module_lock);

Lock mismatch.  CLD::packages() protects _packages using the
metaspace_lock().

------------------------------------------------------------------------------



More information about the hotspot-runtime-dev mailing list