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
406
407 static KlassSubGraphInfo* init_subgraph_info(Klass *k, bool is_full_module_graph);
408 static KlassSubGraphInfo* get_subgraph_info(Klass *k);
409
410 static void init_subgraph_entry_fields(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
411 static void init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[], TRAPS);
412
413 // UseCompressedOops only: Used by decode_from_archive
414 static address _narrow_oop_base;
415 static int _narrow_oop_shift;
416
417 // !UseCompressedOops only: used to relocate pointers to the archived objects
418 static ptrdiff_t _runtime_delta;
419
420 typedef ResizeableHashTable<oop, bool,
421 AnyObj::C_HEAP,
422 mtClassShared,
423 HeapShared::oop_hash> SeenObjectsTable;
424
425 static SeenObjectsTable *_seen_objects_table;
426
427 // The "special subgraph" contains all the archived objects that are reachable
428 // from the following roots:
429 // - interned strings
430 // - Klass::java_mirror() -- including aot-initialized mirrors such as those of Enum klasses.
431 // - ConstantPool::resolved_references()
432 // - Universe::<xxx>_exception_instance()
433 static KlassSubGraphInfo* _dump_time_special_subgraph; // for collecting info during dump time
434 static ArchivedKlassSubGraphInfoRecord* _run_time_special_subgraph; // for initializing classes during run time.
435
436 static GrowableArrayCHeap<oop, mtClassShared>* _pending_roots;
437 static OopHandle _scratch_basic_type_mirrors[T_VOID+1];
438 static MetaspaceObjToOopHandleTable* _scratch_objects_table;
439
440 static void init_seen_objects_table() {
441 assert(_seen_objects_table == nullptr, "must be");
442 _seen_objects_table = new (mtClass)SeenObjectsTable(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
443 }
444 static void delete_seen_objects_table() {
445 assert(_seen_objects_table != nullptr, "must be");
446 delete _seen_objects_table;
447 _seen_objects_table = nullptr;
448 }
449
450 // Statistics (for one round of start_recording_subgraph ... done_recording_subgraph)
451 static size_t _num_new_walked_objs;
452 static size_t _num_new_archived_objs;
453 static size_t _num_old_recorded_klasses;
454
455 // Statistics (for all archived subgraphs)
456 static size_t _num_total_subgraph_recordings;
457 static size_t _num_total_walked_objs;
458 static size_t _num_total_archived_objs;
459 static size_t _num_total_recorded_klasses;
460 static size_t _num_total_verifications;
461
462 static void start_recording_subgraph(InstanceKlass *k, const char* klass_name,
463 bool is_full_module_graph);
464 static void done_recording_subgraph(InstanceKlass *k, const char* klass_name);
465
466 static bool has_been_seen_during_subgraph_recording(oop obj);
467 static void set_has_been_seen_during_subgraph_recording(oop obj);
468 static bool archive_object(oop obj, oop referrer, KlassSubGraphInfo* subgraph_info);
469
490 oop _referrer;
491 int _level;
492
493 public:
494 PendingOop() : _obj(nullptr), _referrer(nullptr), _level(-1) {}
495 PendingOop(oop obj, oop referrer, int level) : _obj(obj), _referrer(referrer), _level(level) {}
496
497 oop obj() const { return _obj; }
498 oop referrer() const { return _referrer; }
499 int level() const { return _level; }
500 };
501
502 class OopFieldPusher;
503 using PendingOopStack = GrowableArrayCHeap<PendingOop, mtClassShared>;
504
505 static PendingOop _object_being_archived;
506 static bool walk_one_object(PendingOopStack* stack, int level, KlassSubGraphInfo* subgraph_info,
507 oop orig_obj, oop referrer);
508
509 public:
510 static void reset_archived_object_states(TRAPS);
511 static void create_archived_object_cache() {
512 _archived_object_cache =
513 new (mtClass)ArchivedObjectCache(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
514 }
515 static void destroy_archived_object_cache() {
516 delete _archived_object_cache;
517 _archived_object_cache = nullptr;
518 }
519 static ArchivedObjectCache* archived_object_cache() {
520 return _archived_object_cache;
521 }
522
523 static CachedOopInfo* get_cached_oop_info(oop orig_obj);
524
525 static int archive_exception_instance(oop exception);
526
527 static bool archive_reachable_objects_from(int level,
528 KlassSubGraphInfo* subgraph_info,
529 oop orig_obj);
530
531 static bool is_dumped_interned_string(oop o);
532
533 // Scratch objects for archiving Klass::java_mirror()
534 static void set_scratch_java_mirror(Klass* k, oop mirror);
535 static void remove_scratch_objects(Klass* k);
536 static bool is_metadata_field(oop src_obj, int offset);
537 template <typename T> static void do_metadata_offsets(oop src_obj, T callback);
538 static void remap_dumped_metadata(oop src_obj, address archived_object);
539 inline static void remap_loaded_metadata(oop obj);
540 inline static oop maybe_remap_referent(bool is_java_lang_ref, size_t field_offset, oop referent);
541 static void get_pointer_info(oop src_obj, bool& has_oop_pointers, bool& has_native_pointers);
542 static void set_has_native_pointers(oop src_obj);
543 static uintptr_t archive_location(oop src_obj);
544
545 // We use the HeapShared::roots() array to make sure that objects stored in the
546 // archived heap region are not prematurely collected. These roots include:
547 //
548 // - mirrors of classes that have not yet been loaded.
549 // - ConstantPool::resolved_references() of classes that have not yet been loaded.
550 // - ArchivedKlassSubGraphInfoRecords that have not been initialized
551 // - java.lang.Module objects that have not yet been added to the module graph
552 //
553 // When a mirror M becomes referenced by a newly loaded class K, M will be removed
554 // from HeapShared::roots() via clear_root(), and K will be responsible for
555 // keeping M alive.
556 //
557 // Other types of roots are also cleared similarly when they become referenced.
558
559 // Dump-time only. Returns the index of the root, which can be used at run time to read
560 // the root using get_root(index, ...).
561 static int append_root(oop obj);
562 static GrowableArrayCHeap<oop, mtClassShared>* pending_roots() { return _pending_roots; }
563
564 // Dump-time and runtime
565 static objArrayOop root_segment(int segment_idx);
566 static oop get_root(int index, bool clear=false);
567
568 // Run-time only
569 static void clear_root(int index);
570
571 static void get_segment_indexes(int index, int& segment_index, int& internal_index);
572
573 static void setup_test_class(const char* test_class_name) PRODUCT_RETURN;
574 #endif // INCLUDE_CDS_JAVA_HEAP
575
576 public:
577 static void finish_materialize_objects() NOT_CDS_JAVA_HEAP_RETURN;
578
579 static void write_heap(ArchiveMappedHeapInfo* mapped_heap_info, ArchiveStreamedHeapInfo* streamed_heap_info) NOT_CDS_JAVA_HEAP_RETURN;
580 static objArrayOop scratch_resolved_references(ConstantPool* src);
581 static void add_scratch_resolved_references(ConstantPool* src, objArrayOop dest) NOT_CDS_JAVA_HEAP_RETURN;
582 static void init_dumping() NOT_CDS_JAVA_HEAP_RETURN;
583 static void init_scratch_objects_for_basic_type_mirrors(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
584 static void init_box_classes(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
585 static bool is_heap_region(int idx) {
586 CDS_JAVA_HEAP_ONLY(return (idx == AOTMetaspace::hp);)
587 NOT_CDS_JAVA_HEAP_RETURN_(false);
588 }
589 static void delete_tables_with_raw_oops() NOT_CDS_JAVA_HEAP_RETURN;
590
591 static void resolve_classes(JavaThread* current) NOT_CDS_JAVA_HEAP_RETURN;
592 static void initialize_from_archived_subgraph(JavaThread* current, Klass* k) NOT_CDS_JAVA_HEAP_RETURN;
593
594 static void init_for_dumping(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
595 static void init_heap_writer() NOT_CDS_JAVA_HEAP_RETURN;
596 static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN;
597 static void serialize_tables(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
598
599 #ifndef PRODUCT
600 static bool is_a_test_class_in_unnamed_module(Klass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
601 static void initialize_test_class_from_archive(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
602 #endif
603
604 static void initialize_java_lang_invoke(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
605 static void init_classes_for_special_subgraph(Handle loader, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
606
607 static bool is_lambda_form_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
608 static bool is_lambda_proxy_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
609 static bool is_string_concat_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
610 static bool is_archivable_hidden_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
611
612 // Used by AOTArtifactFinder
613 static void start_scanning_for_oops();
614 static void end_scanning_for_oops();
615 static void scan_java_class(Klass* k);
616 static void scan_java_mirror(oop orig_mirror);
617 static void copy_and_rescan_aot_inited_mirror(InstanceKlass* ik);
618
619 static void log_heap_roots();
620
621 static intptr_t log_target_location(oop source_oop);
622 static void log_oop_info(outputStream* st, oop source_oop, address archived_object_start, address archived_object_end);
623 static void log_oop_info(outputStream* st, oop source_oop);
624 static void log_oop_details(oop source_oop, address buffered_addr);
625 };
626
627 #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
407
408 static KlassSubGraphInfo* init_subgraph_info(Klass *k, bool is_full_module_graph);
409 static KlassSubGraphInfo* get_subgraph_info(Klass *k);
410
411 static void init_subgraph_entry_fields(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
412 static void init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[], TRAPS);
413
414 // UseCompressedOops only: Used by decode_from_archive
415 static address _narrow_oop_base;
416 static int _narrow_oop_shift;
417
418 // !UseCompressedOops only: used to relocate pointers to the archived objects
419 static ptrdiff_t _runtime_delta;
420
421 typedef ResizeableHashTable<oop, bool,
422 AnyObj::C_HEAP,
423 mtClassShared,
424 HeapShared::oop_hash> SeenObjectsTable;
425
426 static SeenObjectsTable *_seen_objects_table;
427 // The "special subgraph" contains all the archived objects that are reachable
428 // from the following roots:
429 // - interned strings
430 // - Klass::java_mirror() -- including aot-initialized mirrors such as those of Enum klasses.
431 // - ConstantPool::resolved_references()
432 // - Universe::<xxx>_exception_instance()
433 static KlassSubGraphInfo* _dump_time_special_subgraph; // for collecting info during dump time
434 static ArchivedKlassSubGraphInfoRecord* _run_time_special_subgraph; // for initializing classes during run time.
435
436 static GrowableArrayCHeap<OopHandle, mtClassShared>* _pending_roots;
437 static GrowableArrayCHeap<const char*, mtClassShared>* _context; // for debugging unarchivable objects
438 static OopHandle _scratch_basic_type_mirrors[T_VOID+1];
439 static MetaspaceObjToOopHandleTable* _scratch_objects_table;
440
441 static void init_seen_objects_table() {
442 assert(_seen_objects_table == nullptr, "must be");
443 _seen_objects_table = new (mtClass)SeenObjectsTable(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
444 }
445 static void delete_seen_objects_table() {
446 assert(_seen_objects_table != nullptr, "must be");
447 delete _seen_objects_table;
448 _seen_objects_table = nullptr;
449 }
450
451 class ContextMark;
452
453 // Statistics (for one round of start_recording_subgraph ... done_recording_subgraph)
454 static size_t _num_new_walked_objs;
455 static size_t _num_new_archived_objs;
456 static size_t _num_old_recorded_klasses;
457
458 // Statistics (for all archived subgraphs)
459 static size_t _num_total_subgraph_recordings;
460 static size_t _num_total_walked_objs;
461 static size_t _num_total_archived_objs;
462 static size_t _num_total_recorded_klasses;
463 static size_t _num_total_verifications;
464
465 static void start_recording_subgraph(InstanceKlass *k, const char* klass_name,
466 bool is_full_module_graph);
467 static void done_recording_subgraph(InstanceKlass *k, const char* klass_name);
468
469 static bool has_been_seen_during_subgraph_recording(oop obj);
470 static void set_has_been_seen_during_subgraph_recording(oop obj);
471 static bool archive_object(oop obj, oop referrer, KlassSubGraphInfo* subgraph_info);
472
493 oop _referrer;
494 int _level;
495
496 public:
497 PendingOop() : _obj(nullptr), _referrer(nullptr), _level(-1) {}
498 PendingOop(oop obj, oop referrer, int level) : _obj(obj), _referrer(referrer), _level(level) {}
499
500 oop obj() const { return _obj; }
501 oop referrer() const { return _referrer; }
502 int level() const { return _level; }
503 };
504
505 class OopFieldPusher;
506 using PendingOopStack = GrowableArrayCHeap<PendingOop, mtClassShared>;
507
508 static PendingOop _object_being_archived;
509 static bool walk_one_object(PendingOopStack* stack, int level, KlassSubGraphInfo* subgraph_info,
510 oop orig_obj, oop referrer);
511
512 public:
513 static void exit_on_error();
514 static void reset_archived_object_states(TRAPS);
515 static void create_archived_object_cache() {
516 _archived_object_cache =
517 new (mtClass)ArchivedObjectCache(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE);
518 }
519 static void destroy_archived_object_cache() {
520 delete _archived_object_cache;
521 _archived_object_cache = nullptr;
522 }
523 static ArchivedObjectCache* archived_object_cache() {
524 return _archived_object_cache;
525 }
526
527 static CachedOopInfo* get_cached_oop_info(oop orig_obj);
528
529 static int archive_exception_instance(oop exception);
530
531 static bool archive_reachable_objects_from(int level,
532 KlassSubGraphInfo* subgraph_info,
533 oop orig_obj);
534
535 static bool is_dumped_interned_string(oop o);
536
537 static void track_scratch_object(oop orig_obj, oop scratch_obj);
538
539 // Scratch objects for archiving Klass::java_mirror()
540 static void set_scratch_java_mirror(Klass* k, oop mirror);
541 static void remove_scratch_objects(Klass* k);
542 static bool is_metadata_field(oop src_obj, int offset);
543 template <typename T> static void do_metadata_offsets(oop src_obj, T callback);
544 static void remap_dumped_metadata(oop src_obj, address archived_object);
545 inline static void remap_loaded_metadata(oop obj);
546 inline static oop maybe_remap_referent(bool is_java_lang_ref, size_t field_offset, oop referent);
547 static void get_pointer_info(oop src_obj, bool& has_oop_pointers, bool& has_native_pointers);
548 static void set_has_native_pointers(oop src_obj);
549 static uintptr_t archive_location(oop src_obj);
550
551 // We use the HeapShared::roots() array to make sure that objects stored in the
552 // archived heap region are not prematurely collected. These roots include:
553 //
554 // - mirrors of classes that have not yet been loaded.
555 // - ConstantPool::resolved_references() of classes that have not yet been loaded.
556 // - ArchivedKlassSubGraphInfoRecords that have not been initialized
557 // - java.lang.Module objects that have not yet been added to the module graph
558 //
559 // When a mirror M becomes referenced by a newly loaded class K, M will be removed
560 // from HeapShared::roots() via clear_root(), and K will be responsible for
561 // keeping M alive.
562 //
563 // Other types of roots are also cleared similarly when they become referenced.
564
565 // Dump-time only. Returns the index of the root, which can be used at run time to read
566 // the root using get_root(index, ...).
567 static int append_root(oop obj);
568 static GrowableArrayCHeap<OopHandle, mtClassShared>* pending_roots() { return _pending_roots; }
569
570 // Dump-time and runtime
571 static objArrayOop root_segment(int segment_idx);
572 static oop get_root(int index, bool clear=false);
573
574 // Run-time only
575 static void clear_root(int index);
576 static void get_segment_indexes(int index, int& segment_index, int& internal_index);
577 static void setup_test_class(const char* test_class_name) PRODUCT_RETURN;
578 #endif // INCLUDE_CDS_JAVA_HEAP
579
580 public:
581 static void finish_materialize_objects() NOT_CDS_JAVA_HEAP_RETURN;
582
583 static void write_heap(ArchiveMappedHeapInfo* mapped_heap_info, ArchiveStreamedHeapInfo* streamed_heap_info) NOT_CDS_JAVA_HEAP_RETURN;
584 static objArrayOop scratch_resolved_references(ConstantPool* src);
585 static void add_scratch_resolved_references(ConstantPool* src, objArrayOop dest) NOT_CDS_JAVA_HEAP_RETURN;
586 static void init_dumping() NOT_CDS_JAVA_HEAP_RETURN;
587 static void init_scratch_objects_for_basic_type_mirrors(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
588 static void init_box_classes(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
589 static bool is_heap_region(int idx) {
590 CDS_JAVA_HEAP_ONLY(return (idx == AOTMetaspace::hp);)
591 NOT_CDS_JAVA_HEAP_RETURN_(false);
592 }
593 static void delete_tables_with_raw_oops() NOT_CDS_JAVA_HEAP_RETURN;
594
595 static void resolve_classes(JavaThread* current) NOT_CDS_JAVA_HEAP_RETURN;
596 static void initialize_from_archived_subgraph(JavaThread* current, Klass* k) NOT_CDS_JAVA_HEAP_RETURN;
597
598 static void init_for_dumping(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
599 static void init_heap_writer() NOT_CDS_JAVA_HEAP_RETURN;
600 static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN;
601 static void serialize_tables(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
602
603 #ifndef PRODUCT
604 static bool is_a_test_class_in_unnamed_module(Klass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
605 static void initialize_test_class_from_archive(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
606 #endif
607
608 static void add_to_permanent_oop_table(oop obj, int offset);
609
610 // AOT-compile time only: get a stable index for an archived object.
611 // Returns 0 if obj is not archived.
612 static int get_archived_object_permanent_index(oop obj) NOT_CDS_JAVA_HEAP_RETURN_(-1);
613 // Runtime only: get back the same object for an index returned by
614 // get_archived_object_permanent_index().
615 static oop get_archived_object(int permanent_index) NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
616
617 static void initialize_java_lang_invoke(TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
618 static void init_classes_for_special_subgraph(Handle loader, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
619
620 static bool is_core_java_lang_invoke_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
621 static bool is_lambda_form_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
622 static bool is_lambda_proxy_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
623 static bool is_string_concat_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
624 static bool is_archivable_hidden_klass(InstanceKlass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
625
626 // Used by AOTArtifactFinder
627 static void start_scanning_for_oops();
628 static void end_scanning_for_oops();
629 static void scan_java_class(Klass* k);
630 static void scan_java_mirror(oop orig_mirror);
631 static void copy_and_rescan_aot_inited_mirror(InstanceKlass* ik);
632 static void log_heap_roots();
633
634 static intptr_t log_target_location(oop source_oop);
635 static void log_oop_info(outputStream* st, oop source_oop, address archived_object_start, address archived_object_end);
636 static void log_oop_info(outputStream* st, oop source_oop);
637 static void log_oop_details(oop source_oop, address buffered_addr);
638 };
639
640 class CachedCodeDirectoryInternal {
641 int _permanent_oop_count;
642 int* _permanent_oop_offsets; // offset of each permanent object from the bottom of the archived heap
643 public:
644 void dumptime_init_internal() NOT_CDS_JAVA_HEAP_RETURN;
645 void runtime_init_internal() NOT_CDS_JAVA_HEAP_RETURN;
646 };
647
648 #endif // SHARE_CDS_HEAPSHARED_HPP
|