< prev index next >

src/hotspot/share/oops/weakHandle.hpp

Print this page
rev 50373 : 8195097: Make it possible to process StringTable outside safepoint
Reviewed-by:

*** 37,52 **** // the GC cycle. The runtime structures that reference the oop must test // if the value is NULL. If it is NULL, it has been cleaned out by GC. // This is the vm version of jweak but has different GC lifetimes and policies, // depending on the type. ! enum WeakHandleType { vm_class_loader_data, vm_string }; template <WeakHandleType T> class WeakHandle { public: - private: oop* _obj; WeakHandle(oop* w) : _obj(w) {} static OopStorage* get_storage(); --- 37,51 ---- // the GC cycle. The runtime structures that reference the oop must test // if the value is NULL. If it is NULL, it has been cleaned out by GC. // This is the vm version of jweak but has different GC lifetimes and policies, // depending on the type. ! enum WeakHandleType { vm_class_loader_data, vm_string, vm_string_table_data }; template <WeakHandleType T> class WeakHandle { public: private: oop* _obj; WeakHandle(oop* w) : _obj(w) {} static OopStorage* get_storage();
*** 57,66 **** --- 56,67 ---- inline oop resolve() const; inline oop peek() const; void release() const; bool is_null() const { return _obj == NULL; } + void replace(oop with_obj); + void print() const; void print_on(outputStream* st) const; }; typedef WeakHandle<vm_class_loader_data> ClassLoaderWeakHandle;
< prev index next >