8171809: Remove unused CDS code from JDK 9
Reviewed-by: jiangli, ccheung, mseledtsov
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Fri Dec 23 20:44:48 2016 +0300
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Thu Dec 15 19:26:41 2016 -0800
@@ -94,7 +94,7 @@
_metaspace(NULL), _unloading(false), _klasses(NULL),
_modules(NULL), _packages(NULL),
_claimed(0), _jmethod_ids(NULL), _handles(NULL), _deallocate_list(NULL),
- _next(NULL), _dependencies(dependencies), _shared_class_loader_id(-1),
+ _next(NULL), _dependencies(dependencies),
_metaspace_lock(new Mutex(Monitor::leaf+1, "Metaspace allocation lock", true,
Monitor::_safepoint_check_never)) {
TRACE_INIT_ID(this);
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp Fri Dec 23 20:44:48 2016 +0300
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp Thu Dec 15 19:26:41 2016 -0800
@@ -204,9 +204,6 @@
// Support for walking class loader data objects
ClassLoaderData* _next; /// Next loader_datas created
- // CDS
- int _shared_class_loader_id;
-
// ReadOnly and ReadWrite metaspaces (static because only on the null
// class loader for now).
static Metaspace* _ro_metaspace;
@@ -338,15 +335,6 @@
Metaspace* rw_metaspace();
void initialize_shared_metaspaces();
- int shared_class_loader_id() const {
- return _shared_class_loader_id;
- }
- void set_shared_class_loader_id(int id) {
- assert(id >= 0, "sanity");
- assert(_shared_class_loader_id <0, "cannot be assigned more than once");
- _shared_class_loader_id = id;
- }
-
TRACE_DEFINE_TRACE_ID_METHODS;
};
--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp Fri Dec 23 20:44:48 2016 +0300
+++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp Thu Dec 15 19:26:41 2016 -0800
@@ -29,7 +29,6 @@
#include "classfile/dictionary.hpp"
class ClassFileStream;
-class SerializeClosure;
class SystemDictionaryShared: public SystemDictionary {
public:
@@ -79,8 +78,6 @@
return NULL;
}
- static void serialize(SerializeClosure* soc) {}
-
// The (non-application) CDS implementation supports only classes in the boot
// class loader, which ensures that the verification constraints are the same
// during archive creation time and runtime. Thus we can do the constraint checks
--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp Fri Dec 23 20:44:48 2016 +0300
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp Thu Dec 15 19:26:41 2016 -0800
@@ -145,10 +145,6 @@
StringTable::serialize(soc, string_space, space_size);
soc->do_tag(--tag);
- // Dump/restore the misc information for system dictionary
- SystemDictionaryShared::serialize(soc);
- soc->do_tag(--tag);
-
soc->do_tag(666);
}