< prev index next >

src/hotspot/share/cds/heapShared.hpp

Print this page

  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_CDS_HEAPSHARED_HPP
 26 #define SHARE_CDS_HEAPSHARED_HPP
 27 
 28 #include "cds/aotMetaspace.hpp"

 29 #include "cds/dumpTimeClassInfo.hpp"
 30 #include "classfile/compactHashtable.hpp"
 31 #include "classfile/javaClasses.hpp"
 32 #include "gc/shared/gc_globals.hpp"
 33 #include "memory/allocation.hpp"
 34 #include "memory/allStatic.hpp"
 35 #include "oops/compressedOops.hpp"
 36 #include "oops/oop.hpp"
 37 #include "oops/oopHandle.hpp"
 38 #include "oops/oopsHierarchy.hpp"
 39 #include "utilities/growableArray.hpp"
 40 #include "utilities/hashTable.hpp"
 41 
 42 #if INCLUDE_CDS_JAVA_HEAP
 43 class DumpedInternedStrings;
 44 class FileMapInfo;
 45 class KlassSubGraphInfo;
 46 class MetaspaceObjToOopHandleTable;
 47 class ResourceBitMap;
 48 

257 
258   static KlassSubGraphInfo* init_subgraph_info(Klass *k, bool is_full_module_graph);
259   static KlassSubGraphInfo* get_subgraph_info(Klass *k);
260 
261   static void init_subgraph_entry_fields(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
262   static void init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[], TRAPS);
263 
264   // UseCompressedOops only: Used by decode_from_archive
265   static address _narrow_oop_base;
266   static int     _narrow_oop_shift;
267 
268   // !UseCompressedOops only: used to relocate pointers to the archived objects
269   static ptrdiff_t _runtime_delta;
270 
271   typedef ResizeableHashTable<oop, bool,
272       AnyObj::C_HEAP,
273       mtClassShared,
274       HeapShared::oop_hash> SeenObjectsTable;
275 
276   static SeenObjectsTable *_seen_objects_table;
277 
278   // The "special subgraph" contains all the archived objects that are reachable
279   // from the following roots:
280   //    - interned strings
281   //    - Klass::java_mirror() -- including aot-initialized mirrors such as those of Enum klasses.
282   //    - ConstantPool::resolved_references()
283   //    - Universe::<xxx>_exception_instance()
284   static KlassSubGraphInfo* _dump_time_special_subgraph;              // for collecting info during dump time
285   static ArchivedKlassSubGraphInfoRecord* _run_time_special_subgraph; // for initializing classes during run time.
286 
287   static GrowableArrayCHeap<oop, mtClassShared>* _pending_roots;
288   static GrowableArrayCHeap<OopHandle, mtClassShared>* _root_segments;

289   static int _root_segment_max_size_elems;
290   static OopHandle _scratch_basic_type_mirrors[T_VOID+1];
291   static MetaspaceObjToOopHandleTable* _scratch_objects_table;
292 
293   static void init_seen_objects_table() {
294     assert(_seen_objects_table == nullptr, "must be");
295     _seen_objects_table = new (mtClass)SeenObjectsTable(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
296   }
297   static void delete_seen_objects_table() {
298     assert(_seen_objects_table != nullptr, "must be");
299     delete _seen_objects_table;
300     _seen_objects_table = nullptr;
301   }
302 


303   // Statistics (for one round of start_recording_subgraph ... done_recording_subgraph)
304   static int _num_new_walked_objs;
305   static int _num_new_archived_objs;
306   static int _num_old_recorded_klasses;
307 
308   // Statistics (for all archived subgraphs)
309   static int _num_total_subgraph_recordings;
310   static int _num_total_walked_objs;
311   static int _num_total_archived_objs;
312   static int _num_total_recorded_klasses;
313   static int _num_total_verifications;
314 
315   static void start_recording_subgraph(InstanceKlass *k, const char* klass_name,
316                                        bool is_full_module_graph);
317   static void done_recording_subgraph(InstanceKlass *k, const char* klass_name);
318 
319   static bool has_been_seen_during_subgraph_recording(oop obj);
320   static void set_has_been_seen_during_subgraph_recording(oop obj);
321   static bool archive_object(oop obj, oop referrer, KlassSubGraphInfo* subgraph_info);
322 

353     oop _referrer;
354     int _level;
355 
356   public:
357     PendingOop() : _obj(nullptr), _referrer(nullptr), _level(-1) {}
358     PendingOop(oop obj, oop referrer, int level) : _obj(obj), _referrer(referrer), _level(level) {}
359 
360     oop obj()      const { return _obj; }
361     oop referrer() const { return _referrer; }
362     int level()    const { return _level; }
363   };
364 
365   class OopFieldPusher;
366   using PendingOopStack = GrowableArrayCHeap<PendingOop, mtClassShared>;
367 
368   static PendingOop _object_being_archived;
369   static bool walk_one_object(PendingOopStack* stack, int level, KlassSubGraphInfo* subgraph_info,
370                               oop orig_obj, oop referrer);
371 
372  public:

373   static void reset_archived_object_states(TRAPS);
374   static void create_archived_object_cache() {
375     _archived_object_cache =
376       new (mtClass)ArchivedObjectCache(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
377   }
378   static void destroy_archived_object_cache() {
379     delete _archived_object_cache;
380     _archived_object_cache = nullptr;
381   }
382   static ArchivedObjectCache* archived_object_cache() {
383     return _archived_object_cache;
384   }
385 
386   static CachedOopInfo* get_cached_oop_info(oop orig_obj) {
387     OopHandle oh(&orig_obj);
388     return _archived_object_cache->get(oh);
389   }
390 
391   static int archive_exception_instance(oop exception);
392 
393   static bool archive_reachable_objects_from(int level,
394                                              KlassSubGraphInfo* subgraph_info,
395                                              oop orig_obj);
396 
397   static void add_to_dumped_interned_strings(oop string);
398   static bool is_dumped_interned_string(oop o);
399 


400   // Scratch objects for archiving Klass::java_mirror()
401   static void set_scratch_java_mirror(Klass* k, oop mirror);
402   static void remove_scratch_objects(Klass* k);
403   static void get_pointer_info(oop src_obj, bool& has_oop_pointers, bool& has_native_pointers);
404   static void set_has_native_pointers(oop src_obj);
405 
406   // We use the HeapShared::roots() array to make sure that objects stored in the
407   // archived heap region are not prematurely collected. These roots include:
408   //
409   //    - mirrors of classes that have not yet been loaded.
410   //    - ConstantPool::resolved_references() of classes that have not yet been loaded.
411   //    - ArchivedKlassSubGraphInfoRecords that have not been initialized
412   //    - java.lang.Module objects that have not yet been added to the module graph
413   //
414   // When a mirror M becomes referenced by a newly loaded class K, M will be removed
415   // from HeapShared::roots() via clear_root(), and K will be responsible for
416   // keeping M alive.
417   //
418   // Other types of roots are also cleared similarly when they become referenced.
419 
420   // Dump-time only. Returns the index of the root, which can be used at run time to read
421   // the root using get_root(index, ...).
422   static int append_root(oop obj);
423   static GrowableArrayCHeap<oop, mtClassShared>* pending_roots() { return _pending_roots; }
424 
425   // Dump-time and runtime
426   static objArrayOop root_segment(int segment_idx);
427   static oop get_root(int index, bool clear=false);
428 
429   // Run-time only
430   static void clear_root(int index);
431 
432   static void get_segment_indexes(int index, int& segment_index, int& internal_index);
433 
434   static void setup_test_class(const char* test_class_name) PRODUCT_RETURN;
435 #endif // INCLUDE_CDS_JAVA_HEAP
436 
437  public:

438   static void write_heap(ArchiveHeapInfo* heap_info) NOT_CDS_JAVA_HEAP_RETURN;
439   static objArrayOop scratch_resolved_references(ConstantPool* src);
440   static void add_scratch_resolved_references(ConstantPool* src, objArrayOop dest) NOT_CDS_JAVA_HEAP_RETURN;
441   static void init_dumping() NOT_CDS_JAVA_HEAP_RETURN;
442   static void init_scratch_objects_for_basic_type_mirrors(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
443   static void init_box_classes(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
444   static bool is_heap_region(int idx) {
445     CDS_JAVA_HEAP_ONLY(return (idx == AOTMetaspace::hp);)
446     NOT_CDS_JAVA_HEAP_RETURN_(false);
447   }
448   static void delete_tables_with_raw_oops() NOT_CDS_JAVA_HEAP_RETURN;
449 
450   static void resolve_classes(JavaThread* current) NOT_CDS_JAVA_HEAP_RETURN;
451   static void initialize_from_archived_subgraph(JavaThread* current, Klass* k) NOT_CDS_JAVA_HEAP_RETURN;
452 
453   static void init_for_dumping(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
454   static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN;
455   static void add_root_segment(objArrayOop segment_oop) NOT_CDS_JAVA_HEAP_RETURN;
456   static void init_root_segment_sizes(int max_size_elems) NOT_CDS_JAVA_HEAP_RETURN;
457   static void serialize_tables(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
458 
459 #ifndef PRODUCT
460   static bool is_a_test_class_in_unnamed_module(Klass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
461   static void initialize_test_class_from_archive(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
462 #endif
463 









464   static void initialize_java_lang_invoke(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
465   static void init_classes_for_special_subgraph(Handle loader, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
466 
467   static bool is_lambda_form_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
468   static bool is_lambda_proxy_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
469   static bool is_string_concat_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
470   static bool is_archivable_hidden_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
471 
472   // Used by AOTArtifactFinder
473   static void start_scanning_for_oops();
474   static void end_scanning_for_oops();
475   static void scan_java_class(Klass* k);
476   static void scan_java_mirror(oop orig_mirror);
477   static void copy_and_rescan_aot_inited_mirror(InstanceKlass* ik);
478 };
479 








480 #if INCLUDE_CDS_JAVA_HEAP
481 class DumpedInternedStrings :
482   public ResizeableHashTable<oop, bool,
483                            AnyObj::C_HEAP,
484                            mtClassShared,
485                            HeapShared::string_oop_hash>
486 {
487 public:
488   DumpedInternedStrings(unsigned size, unsigned max_size) :
489     ResizeableHashTable<oop, bool,
490                                 AnyObj::C_HEAP,
491                                 mtClassShared,
492                                 HeapShared::string_oop_hash>(size, max_size) {}
493 };
494 #endif
495 
496 #endif // SHARE_CDS_HEAPSHARED_HPP

  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_CDS_HEAPSHARED_HPP
 26 #define SHARE_CDS_HEAPSHARED_HPP
 27 
 28 #include "cds/aotMetaspace.hpp"
 29 #include "cds/cds_globals.hpp"
 30 #include "cds/dumpTimeClassInfo.hpp"
 31 #include "classfile/compactHashtable.hpp"
 32 #include "classfile/javaClasses.hpp"
 33 #include "gc/shared/gc_globals.hpp"
 34 #include "memory/allocation.hpp"
 35 #include "memory/allStatic.hpp"
 36 #include "oops/compressedOops.hpp"
 37 #include "oops/oop.hpp"
 38 #include "oops/oopHandle.hpp"
 39 #include "oops/oopsHierarchy.hpp"
 40 #include "utilities/growableArray.hpp"
 41 #include "utilities/hashTable.hpp"
 42 
 43 #if INCLUDE_CDS_JAVA_HEAP
 44 class DumpedInternedStrings;
 45 class FileMapInfo;
 46 class KlassSubGraphInfo;
 47 class MetaspaceObjToOopHandleTable;
 48 class ResourceBitMap;
 49 

258 
259   static KlassSubGraphInfo* init_subgraph_info(Klass *k, bool is_full_module_graph);
260   static KlassSubGraphInfo* get_subgraph_info(Klass *k);
261 
262   static void init_subgraph_entry_fields(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
263   static void init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[], TRAPS);
264 
265   // UseCompressedOops only: Used by decode_from_archive
266   static address _narrow_oop_base;
267   static int     _narrow_oop_shift;
268 
269   // !UseCompressedOops only: used to relocate pointers to the archived objects
270   static ptrdiff_t _runtime_delta;
271 
272   typedef ResizeableHashTable<oop, bool,
273       AnyObj::C_HEAP,
274       mtClassShared,
275       HeapShared::oop_hash> SeenObjectsTable;
276 
277   static SeenObjectsTable *_seen_objects_table;

278   // The "special subgraph" contains all the archived objects that are reachable
279   // from the following roots:
280   //    - interned strings
281   //    - Klass::java_mirror() -- including aot-initialized mirrors such as those of Enum klasses.
282   //    - ConstantPool::resolved_references()
283   //    - Universe::<xxx>_exception_instance()
284   static KlassSubGraphInfo* _dump_time_special_subgraph;              // for collecting info during dump time
285   static ArchivedKlassSubGraphInfoRecord* _run_time_special_subgraph; // for initializing classes during run time.
286 
287   static GrowableArrayCHeap<OopHandle, mtClassShared>* _pending_roots;
288   static GrowableArrayCHeap<OopHandle, mtClassShared>* _root_segments;
289   static GrowableArrayCHeap<const char*, mtClassShared>* _context; // for debugging unarchivable objects
290   static int _root_segment_max_size_elems;
291   static OopHandle _scratch_basic_type_mirrors[T_VOID+1];
292   static MetaspaceObjToOopHandleTable* _scratch_objects_table;
293 
294   static void init_seen_objects_table() {
295     assert(_seen_objects_table == nullptr, "must be");
296     _seen_objects_table = new (mtClass)SeenObjectsTable(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
297   }
298   static void delete_seen_objects_table() {
299     assert(_seen_objects_table != nullptr, "must be");
300     delete _seen_objects_table;
301     _seen_objects_table = nullptr;
302   }
303 
304   class ContextMark;
305 
306   // Statistics (for one round of start_recording_subgraph ... done_recording_subgraph)
307   static int _num_new_walked_objs;
308   static int _num_new_archived_objs;
309   static int _num_old_recorded_klasses;
310 
311   // Statistics (for all archived subgraphs)
312   static int _num_total_subgraph_recordings;
313   static int _num_total_walked_objs;
314   static int _num_total_archived_objs;
315   static int _num_total_recorded_klasses;
316   static int _num_total_verifications;
317 
318   static void start_recording_subgraph(InstanceKlass *k, const char* klass_name,
319                                        bool is_full_module_graph);
320   static void done_recording_subgraph(InstanceKlass *k, const char* klass_name);
321 
322   static bool has_been_seen_during_subgraph_recording(oop obj);
323   static void set_has_been_seen_during_subgraph_recording(oop obj);
324   static bool archive_object(oop obj, oop referrer, KlassSubGraphInfo* subgraph_info);
325 

356     oop _referrer;
357     int _level;
358 
359   public:
360     PendingOop() : _obj(nullptr), _referrer(nullptr), _level(-1) {}
361     PendingOop(oop obj, oop referrer, int level) : _obj(obj), _referrer(referrer), _level(level) {}
362 
363     oop obj()      const { return _obj; }
364     oop referrer() const { return _referrer; }
365     int level()    const { return _level; }
366   };
367 
368   class OopFieldPusher;
369   using PendingOopStack = GrowableArrayCHeap<PendingOop, mtClassShared>;
370 
371   static PendingOop _object_being_archived;
372   static bool walk_one_object(PendingOopStack* stack, int level, KlassSubGraphInfo* subgraph_info,
373                               oop orig_obj, oop referrer);
374 
375  public:
376   static void exit_on_error();
377   static void reset_archived_object_states(TRAPS);
378   static void create_archived_object_cache() {
379     _archived_object_cache =
380       new (mtClass)ArchivedObjectCache(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
381   }
382   static void destroy_archived_object_cache() {
383     delete _archived_object_cache;
384     _archived_object_cache = nullptr;
385   }
386   static ArchivedObjectCache* archived_object_cache() {
387     return _archived_object_cache;
388   }
389 
390   static CachedOopInfo* get_cached_oop_info(oop orig_obj) {
391     OopHandle oh(&orig_obj);
392     return _archived_object_cache->get(oh);
393   }
394 
395   static int archive_exception_instance(oop exception);
396 
397   static bool archive_reachable_objects_from(int level,
398                                              KlassSubGraphInfo* subgraph_info,
399                                              oop orig_obj);
400 
401   static void add_to_dumped_interned_strings(oop string);
402   static bool is_dumped_interned_string(oop o);
403 
404   static void track_scratch_object(oop orig_obj, oop scratch_obj);
405 
406   // Scratch objects for archiving Klass::java_mirror()
407   static void set_scratch_java_mirror(Klass* k, oop mirror);
408   static void remove_scratch_objects(Klass* k);
409   static void get_pointer_info(oop src_obj, bool& has_oop_pointers, bool& has_native_pointers);
410   static void set_has_native_pointers(oop src_obj);
411 
412   // We use the HeapShared::roots() array to make sure that objects stored in the
413   // archived heap region are not prematurely collected. These roots include:
414   //
415   //    - mirrors of classes that have not yet been loaded.
416   //    - ConstantPool::resolved_references() of classes that have not yet been loaded.
417   //    - ArchivedKlassSubGraphInfoRecords that have not been initialized
418   //    - java.lang.Module objects that have not yet been added to the module graph
419   //
420   // When a mirror M becomes referenced by a newly loaded class K, M will be removed
421   // from HeapShared::roots() via clear_root(), and K will be responsible for
422   // keeping M alive.
423   //
424   // Other types of roots are also cleared similarly when they become referenced.
425 
426   // Dump-time only. Returns the index of the root, which can be used at run time to read
427   // the root using get_root(index, ...).
428   static int append_root(oop obj);
429   static GrowableArrayCHeap<OopHandle, mtClassShared>* pending_roots() { return _pending_roots; }
430 
431   // Dump-time and runtime
432   static objArrayOop root_segment(int segment_idx);
433   static oop get_root(int index, bool clear=false);
434 
435   // Run-time only
436   static void clear_root(int index);

437   static void get_segment_indexes(int index, int& segment_index, int& internal_index);

438   static void setup_test_class(const char* test_class_name) PRODUCT_RETURN;
439 #endif // INCLUDE_CDS_JAVA_HEAP
440 
441  public:
442   static oop orig_to_scratch_object(oop orig_obj);
443   static void write_heap(ArchiveHeapInfo* heap_info) NOT_CDS_JAVA_HEAP_RETURN;
444   static objArrayOop scratch_resolved_references(ConstantPool* src);
445   static void add_scratch_resolved_references(ConstantPool* src, objArrayOop dest) NOT_CDS_JAVA_HEAP_RETURN;
446   static void init_dumping() NOT_CDS_JAVA_HEAP_RETURN;
447   static void init_scratch_objects_for_basic_type_mirrors(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
448   static void init_box_classes(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
449   static bool is_heap_region(int idx) {
450     CDS_JAVA_HEAP_ONLY(return (idx == AOTMetaspace::hp);)
451     NOT_CDS_JAVA_HEAP_RETURN_(false);
452   }
453   static void delete_tables_with_raw_oops() NOT_CDS_JAVA_HEAP_RETURN;
454 
455   static void resolve_classes(JavaThread* current) NOT_CDS_JAVA_HEAP_RETURN;
456   static void initialize_from_archived_subgraph(JavaThread* current, Klass* k) NOT_CDS_JAVA_HEAP_RETURN;
457 
458   static void init_for_dumping(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
459   static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN;
460   static void add_root_segment(objArrayOop segment_oop) NOT_CDS_JAVA_HEAP_RETURN;
461   static void init_root_segment_sizes(int max_size_elems) NOT_CDS_JAVA_HEAP_RETURN;
462   static void serialize_tables(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
463 
464 #ifndef PRODUCT
465   static bool is_a_test_class_in_unnamed_module(Klass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
466   static void initialize_test_class_from_archive(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
467 #endif
468 
469   static void add_to_permanent_oop_table(oop obj, int offset);
470 
471   // AOT-compile time only: get a stable index for an archived object.
472   // Returns 0 if obj is not archived.
473   static int get_archived_object_permanent_index(oop obj) NOT_CDS_JAVA_HEAP_RETURN_(-1);
474   // Runtime only: get back the same object for an index returned by
475   // get_archived_object_permanent_index().
476   static oop get_archived_object(int permanent_index) NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
477 
478   static void initialize_java_lang_invoke(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
479   static void init_classes_for_special_subgraph(Handle loader, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
480 
481   static bool is_lambda_form_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
482   static bool is_lambda_proxy_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
483   static bool is_string_concat_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
484   static bool is_archivable_hidden_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
485 
486   // Used by AOTArtifactFinder
487   static void start_scanning_for_oops();
488   static void end_scanning_for_oops();
489   static void scan_java_class(Klass* k);
490   static void scan_java_mirror(oop orig_mirror);
491   static void copy_and_rescan_aot_inited_mirror(InstanceKlass* ik);
492 };
493 
494 class CachedCodeDirectoryInternal {
495   int _permanent_oop_count;
496   int* _permanent_oop_offsets; // offset of each permanent object from the bottom of the archived heap
497 public:
498   void dumptime_init_internal() NOT_CDS_JAVA_HEAP_RETURN;
499   void runtime_init_internal() NOT_CDS_JAVA_HEAP_RETURN;
500 };
501 
502 #if INCLUDE_CDS_JAVA_HEAP
503 class DumpedInternedStrings :
504   public ResizeableHashTable<oop, bool,
505                            AnyObj::C_HEAP,
506                            mtClassShared,
507                            HeapShared::string_oop_hash>
508 {
509 public:
510   DumpedInternedStrings(unsigned size, unsigned max_size) :
511     ResizeableHashTable<oop, bool,
512                                 AnyObj::C_HEAP,
513                                 mtClassShared,
514                                 HeapShared::string_oop_hash>(size, max_size) {}
515 };
516 #endif
517 
518 #endif // SHARE_CDS_HEAPSHARED_HPP
< prev index next >