< prev index next >
src/hotspot/share/classfile/classLoaderDataGraph.cpp
Print this page
*** 57,73 ****
// reader thread. This is accomplished by acquire/release of the _head,
// and is sufficient.
//
// Any ClassLoaderData added after or during walking the list are prepended to
// _head. Their claim mark need not be handled here.
! for (ClassLoaderData* cld = OrderAccess::load_acquire(&_head); cld != NULL; cld = cld->next()) {
cld->clear_claim();
}
}
void ClassLoaderDataGraph::clear_claimed_marks(int claim) {
! for (ClassLoaderData* cld = OrderAccess::load_acquire(&_head); cld != NULL; cld = cld->next()) {
cld->clear_claim(claim);
}
}
// Class iterator used by the compiler. It gets some number of classes at
// a safepoint to decay invocation counters on the methods.
--- 57,73 ----
// reader thread. This is accomplished by acquire/release of the _head,
// and is sufficient.
//
// Any ClassLoaderData added after or during walking the list are prepended to
// _head. Their claim mark need not be handled here.
! for (ClassLoaderData* cld = Atomic::load_acquire(&_head); cld != NULL; cld = cld->next()) {
cld->clear_claim();
}
}
void ClassLoaderDataGraph::clear_claimed_marks(int claim) {
! for (ClassLoaderData* cld = Atomic::load_acquire(&_head); cld != NULL; cld = cld->next()) {
cld->clear_claim(claim);
}
}
// Class iterator used by the compiler. It gets some number of classes at
// a safepoint to decay invocation counters on the methods.
*** 218,228 ****
cld = new ClassLoaderData(loader, is_unsafe_anonymous);
// First install the new CLD to the Graph.
cld->set_next(_head);
! OrderAccess::release_store(&_head, cld);
// Next associate with the class_loader.
if (!is_unsafe_anonymous) {
// Use OrderAccess, since readers need to get the loader_data only after
// it's added to the Graph
--- 218,228 ----
cld = new ClassLoaderData(loader, is_unsafe_anonymous);
// First install the new CLD to the Graph.
cld->set_next(_head);
! Atomic::release_store(&_head, cld);
// Next associate with the class_loader.
if (!is_unsafe_anonymous) {
// Use OrderAccess, since readers need to get the loader_data only after
// it's added to the Graph
< prev index next >