Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/universe.cpp @ 20375:6e0cb14ce59b
8046070: Class Data Sharing clean up and refactoring
Summary: Cleaned up CDS to be more configurable, maintainable and extensible
Reviewed-by: dholmes, coleenp, acorn, mchung
author | iklam |
---|---|
date | Thu, 21 Aug 2014 13:57:51 -0700 |
parents | 78bbf4d43a14 |
children | fa6c442c59ee |
comparison
equal
deleted
inserted
replaced
20374:999824269b71 | 20375:6e0cb14ce59b |
---|---|
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "classfile/classLoader.hpp" | 26 #include "classfile/classLoader.hpp" |
27 #include "classfile/classLoaderData.hpp" | 27 #include "classfile/classLoaderData.hpp" |
28 #include "classfile/javaClasses.hpp" | 28 #include "classfile/javaClasses.hpp" |
29 #if INCLUDE_CDS | |
30 #include "classfile/sharedClassUtil.hpp" | |
31 #endif | |
29 #include "classfile/symbolTable.hpp" | 32 #include "classfile/symbolTable.hpp" |
30 #include "classfile/systemDictionary.hpp" | 33 #include "classfile/systemDictionary.hpp" |
31 #include "classfile/vmSymbols.hpp" | 34 #include "classfile/vmSymbols.hpp" |
32 #include "code/codeCache.hpp" | 35 #include "code/codeCache.hpp" |
33 #include "code/dependencies.hpp" | 36 #include "code/dependencies.hpp" |
34 #include "gc_interface/collectedHeap.inline.hpp" | 37 #include "gc_interface/collectedHeap.inline.hpp" |
35 #include "interpreter/interpreter.hpp" | 38 #include "interpreter/interpreter.hpp" |
36 #include "memory/cardTableModRefBS.hpp" | 39 #include "memory/cardTableModRefBS.hpp" |
40 #include "memory/filemap.hpp" | |
37 #include "memory/gcLocker.inline.hpp" | 41 #include "memory/gcLocker.inline.hpp" |
38 #include "memory/genCollectedHeap.hpp" | 42 #include "memory/genCollectedHeap.hpp" |
39 #include "memory/genRemSet.hpp" | 43 #include "memory/genRemSet.hpp" |
40 #include "memory/generation.hpp" | 44 #include "memory/generation.hpp" |
41 #include "memory/metadataFactory.hpp" | 45 #include "memory/metadataFactory.hpp" |
236 } | 240 } |
237 | 241 |
238 void initialize_basic_type_klass(Klass* k, TRAPS) { | 242 void initialize_basic_type_klass(Klass* k, TRAPS) { |
239 Klass* ok = SystemDictionary::Object_klass(); | 243 Klass* ok = SystemDictionary::Object_klass(); |
240 if (UseSharedSpaces) { | 244 if (UseSharedSpaces) { |
245 ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data(); | |
241 assert(k->super() == ok, "u3"); | 246 assert(k->super() == ok, "u3"); |
242 k->restore_unshareable_info(CHECK); | 247 k->restore_unshareable_info(loader_data, Handle(), CHECK); |
243 } else { | 248 } else { |
244 k->initialize_supers(ok, CHECK); | 249 k->initialize_supers(ok, CHECK); |
245 } | 250 } |
246 k->append_to_sibling_list(); | 251 k->append_to_sibling_list(); |
247 } | 252 } |
663 StringTable::create_table(); | 668 StringTable::create_table(); |
664 } else { | 669 } else { |
665 SymbolTable::create_table(); | 670 SymbolTable::create_table(); |
666 StringTable::create_table(); | 671 StringTable::create_table(); |
667 ClassLoader::create_package_info_table(); | 672 ClassLoader::create_package_info_table(); |
673 | |
674 if (DumpSharedSpaces) { | |
675 MetaspaceShared::prepare_for_dumping(); | |
676 } | |
668 } | 677 } |
669 | 678 |
670 return JNI_OK; | 679 return JNI_OK; |
671 } | 680 } |
672 | 681 |
1164 CompressedClassSpaceCounters::initialize_performance_counters(); | 1173 CompressedClassSpaceCounters::initialize_performance_counters(); |
1165 | 1174 |
1166 MemoryService::add_metaspace_memory_pools(); | 1175 MemoryService::add_metaspace_memory_pools(); |
1167 | 1176 |
1168 MemoryService::set_universe_heap(Universe::_collectedHeap); | 1177 MemoryService::set_universe_heap(Universe::_collectedHeap); |
1178 #if INCLUDE_CDS | |
1179 if (UseSharedSpaces) { | |
1180 SharedClassUtil::initialize(CHECK_false); | |
1181 } | |
1182 #endif | |
1169 return true; | 1183 return true; |
1170 } | 1184 } |
1171 | 1185 |
1172 | 1186 |
1173 void Universe::compute_base_vtable_size() { | 1187 void Universe::compute_base_vtable_size() { |