28 #include "classfile/javaClasses.inline.hpp" |
28 #include "classfile/javaClasses.inline.hpp" |
29 #include "classfile/stringTable.hpp" |
29 #include "classfile/stringTable.hpp" |
30 #include "classfile/systemDictionary.hpp" |
30 #include "classfile/systemDictionary.hpp" |
31 #include "gc/shared/collectedHeap.inline.hpp" |
31 #include "gc/shared/collectedHeap.inline.hpp" |
32 #include "gc/shared/gcLocker.inline.hpp" |
32 #include "gc/shared/gcLocker.inline.hpp" |
|
33 #include "logging/log.hpp" |
33 #include "memory/allocation.inline.hpp" |
34 #include "memory/allocation.inline.hpp" |
34 #include "memory/filemap.hpp" |
35 #include "memory/filemap.hpp" |
35 #include "memory/resourceArea.hpp" |
36 #include "memory/resourceArea.hpp" |
36 #include "oops/oop.inline.hpp" |
37 #include "oops/oop.inline.hpp" |
37 #include "runtime/atomic.hpp" |
38 #include "runtime/atomic.hpp" |
742 size_t* space_size) { |
743 size_t* space_size) { |
743 #if INCLUDE_CDS && defined(_LP64) && !defined(_WINDOWS) |
744 #if INCLUDE_CDS && defined(_LP64) && !defined(_WINDOWS) |
744 _shared_table.reset(); |
745 _shared_table.reset(); |
745 if (soc->writing()) { |
746 if (soc->writing()) { |
746 if (!(UseG1GC && UseCompressedOops && UseCompressedClassPointers)) { |
747 if (!(UseG1GC && UseCompressedOops && UseCompressedClassPointers)) { |
747 if (PrintSharedSpaces) { |
748 log_info(cds)( |
748 tty->print_cr( |
|
749 "Shared strings are excluded from the archive as UseG1GC, " |
749 "Shared strings are excluded from the archive as UseG1GC, " |
750 "UseCompressedOops and UseCompressedClassPointers are required." |
750 "UseCompressedOops and UseCompressedClassPointers are required." |
751 "Current settings: UseG1GC=%s, UseCompressedOops=%s, UseCompressedClassPointers=%s.", |
751 "Current settings: UseG1GC=%s, UseCompressedOops=%s, UseCompressedClassPointers=%s.", |
752 BOOL_TO_STR(UseG1GC), BOOL_TO_STR(UseCompressedOops), |
752 BOOL_TO_STR(UseG1GC), BOOL_TO_STR(UseCompressedOops), |
753 BOOL_TO_STR(UseCompressedClassPointers)); |
753 BOOL_TO_STR(UseCompressedClassPointers)); |
754 } |
|
755 } else { |
754 } else { |
756 int num_buckets = the_table()->number_of_entries() / |
755 int num_buckets = the_table()->number_of_entries() / |
757 SharedSymbolTableBucketSize; |
756 SharedSymbolTableBucketSize; |
758 // calculation of num_buckets can result in zero buckets, we need at least one |
757 // calculation of num_buckets can result in zero buckets, we need at least one |
759 CompactStringTableWriter writer(num_buckets > 1 ? num_buckets : 1, |
758 CompactStringTableWriter writer(num_buckets > 1 ? num_buckets : 1, |