< prev index next >

src/hotspot/share/classfile/classLoaderData.cpp

Print this page
rev 47972 : imported patch Access_classLoaderData

*** 61,70 **** --- 61,71 ---- #include "logging/logStream.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceShared.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" + #include "oops/access.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" #include "runtime/javaCalls.hpp" #include "runtime/jniHandles.hpp"
*** 73,85 **** #include "runtime/safepoint.hpp" #include "runtime/synchronizer.hpp" #include "utilities/growableArray.hpp" #include "utilities/macros.hpp" #include "utilities/ostream.hpp" - #if INCLUDE_ALL_GCS - #include "gc/g1/g1SATBCardTableModRefBS.hpp" - #endif // INCLUDE_ALL_GCS #if INCLUDE_TRACE #include "trace/tracing.hpp" #endif ClassLoaderData * ClassLoaderData::_the_null_class_loader_data = NULL; --- 74,83 ----
*** 756,777 **** void ClassLoaderData::remove_handle(OopHandle h) { oop* ptr = h.ptr_raw(); if (ptr != NULL) { assert(_handles.contains(ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr)); ! #if INCLUDE_ALL_GCS ! // This barrier is used by G1 to remember the old oop values, so ! // that we don't forget any objects that were live at the snapshot at ! // the beginning. ! if (UseG1GC) { ! oop obj = *ptr; ! if (obj != NULL) { ! G1SATBCardTableModRefBS::enqueue(obj); ! } ! } ! #endif ! *ptr = NULL; } } void ClassLoaderData::init_handle_locked(OopHandle& dest, Handle h) { MutexLockerEx ml(metaspace_lock(), Mutex::_no_safepoint_check_flag); --- 754,766 ---- void ClassLoaderData::remove_handle(OopHandle h) { oop* ptr = h.ptr_raw(); if (ptr != NULL) { assert(_handles.contains(ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr)); ! // This root is not walked in safepoints, and hence requires an appropriate ! // decorator that e.g. maintains the SATB invariant in SATB collectors. ! RootAccess<IN_CONCURRENT_ROOT>::oop_store(ptr, oop(NULL)); } } void ClassLoaderData::init_handle_locked(OopHandle& dest, Handle h) { MutexLockerEx ml(metaspace_lock(), Mutex::_no_safepoint_check_flag);
< prev index next >