< prev index next >
src/share/vm/classfile/classLoaderData.cpp
Print this page
*** 240,250 ****
Thread* THREAD) {
// Have to lock and put the new dependency on the end of the dependency
// array so the card mark for CMS sees that this dependency is new.
// Can probably do this lock free with some effort.
! ObjectLocker ol(Handle(THREAD, _list_head), THREAD);
oop loader_or_mirror = new_dependency->obj_at(0);
// Since the dependencies are only added, add to the end.
objArrayOop end = last_handle();
--- 240,250 ----
Thread* THREAD) {
// Have to lock and put the new dependency on the end of the dependency
// array so the card mark for CMS sees that this dependency is new.
// Can probably do this lock free with some effort.
! ObjectLocker ol(Handle(THREAD, oopDesc::bs()->write_barrier(_list_head)), THREAD);
oop loader_or_mirror = new_dependency->obj_at(0);
// Since the dependencies are only added, add to the end.
objArrayOop end = last_handle();
*** 576,586 ****
ClassLoaderData* cld = new ClassLoaderData(loader, is_anonymous, dependencies);
if (!is_anonymous) {
! ClassLoaderData** cld_addr = java_lang_ClassLoader::loader_data_addr(loader());
// First, Atomically set it
ClassLoaderData* old = (ClassLoaderData*) Atomic::cmpxchg_ptr(cld, cld_addr, NULL);
if (old != NULL) {
delete cld;
// Returns the data.
--- 576,586 ----
ClassLoaderData* cld = new ClassLoaderData(loader, is_anonymous, dependencies);
if (!is_anonymous) {
! ClassLoaderData** cld_addr = java_lang_ClassLoader::loader_data_addr(oopDesc::bs()->write_barrier(loader()));
// First, Atomically set it
ClassLoaderData* old = (ClassLoaderData*) Atomic::cmpxchg_ptr(cld, cld_addr, NULL);
if (old != NULL) {
delete cld;
// Returns the data.
< prev index next >