< prev index next >
src/hotspot/share/classfile/classLoaderDataGraph.cpp
Print this page
*** 240,250 ****
}
}
// These are functions called by the GC, which require all of the CLDs, including the
// unloading ones.
! void ClassLoaderDataGraph::cld_oops_do(CLDClosure* cl) {
assert_locked_or_safepoint_weak(ClassLoaderDataGraph_lock);
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->_next) {
cl->do_cld(cld);
}
}
--- 240,250 ----
}
}
// These are functions called by the GC, which require all of the CLDs, including the
// unloading ones.
! void ClassLoaderDataGraph::cld_do(CLDClosure* cl) {
assert_locked_or_safepoint_weak(ClassLoaderDataGraph_lock);
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->_next) {
cl->do_cld(cld);
}
}
*** 257,272 ****
closure->do_cld(cld);
}
}
}
! void ClassLoaderDataGraph::always_strong_cld_oops_do(CLDClosure* cl) {
assert_locked_or_safepoint_weak(ClassLoaderDataGraph_lock);
if (ClassUnloading) {
roots_cld_do(cl, NULL);
} else {
! cld_oops_do(cl);
}
}
// Closure for locking and iterating through classes.
LockedClassesDo::LockedClassesDo(classes_do_func_t f) : _function(f) {
--- 257,272 ----
closure->do_cld(cld);
}
}
}
! void ClassLoaderDataGraph::always_strong_cld_do(CLDClosure* cl) {
assert_locked_or_safepoint_weak(ClassLoaderDataGraph_lock);
if (ClassUnloading) {
roots_cld_do(cl, NULL);
} else {
! cld_do(cl);
}
}
// Closure for locking and iterating through classes.
LockedClassesDo::LockedClassesDo(classes_do_func_t f) : _function(f) {
*** 313,340 ****
}
return cld;
}
};
! void ClassLoaderDataGraph::cld_do(CLDClosure* cl) {
ClassLoaderDataGraphIterator iter;
while (ClassLoaderData* cld = iter.get_next()) {
cl->do_cld(cld);
}
}
- void ClassLoaderDataGraph::always_strong_cld_do(CLDClosure* cl) {
- assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
- if (ClassUnloading) {
- // The keep_alive bits are only so GC doesn't unload the classes prematurely,
- // not for tools to find.
- cl->do_cld(ClassLoaderData::the_null_class_loader_data());
- } else {
- cld_do(cl);
- }
- }
-
// These functions assume that the caller has locked the ClassLoaderDataGraph_lock
// if they are not calling the function from a safepoint.
void ClassLoaderDataGraph::classes_do(KlassClosure* klass_closure) {
ClassLoaderDataGraphIterator iter;
while (ClassLoaderData* cld = iter.get_next()) {
--- 313,329 ----
}
return cld;
}
};
! void ClassLoaderDataGraph::loaded_cld_do(CLDClosure* cl) {
ClassLoaderDataGraphIterator iter;
while (ClassLoaderData* cld = iter.get_next()) {
cl->do_cld(cld);
}
}
// These functions assume that the caller has locked the ClassLoaderDataGraph_lock
// if they are not calling the function from a safepoint.
void ClassLoaderDataGraph::classes_do(KlassClosure* klass_closure) {
ClassLoaderDataGraphIterator iter;
while (ClassLoaderData* cld = iter.get_next()) {
< prev index next >