< prev index next > src/hotspot/share/oops/cpCache.cpp
Print this page
set_reference_map(NULL);
}
#if INCLUDE_CDS_JAVA_HEAP
oop ConstantPoolCache::archived_references() {
- if (CompressedOops::is_null(_archived_references)) {
+ if (_archived_references_index < 0) {
return NULL;
}
- return HeapShared::materialize_archived_object(_archived_references);
+ return HeapShared::get_root(_archived_references_index);
+ }
+
+ void ConstantPoolCache::clear_archived_references() {
+ if (_archived_references_index >= 0) {
+ HeapShared::clear_root(_archived_references_index);
+ _archived_references_index = -1;
+ }
}
void ConstantPoolCache::set_archived_references(oop o) {
assert(DumpSharedSpaces, "called only during runtime");
- _archived_references = CompressedOops::encode(o);
+ _archived_references_index = HeapShared::append_root(o);
}
#endif
#if INCLUDE_JVMTI
// RedefineClasses() API support:
< prev index next >