80
81 void FileMapInfo::fail_continue(const char *msg, ...) {
82 va_list ap;
83 va_start(ap, msg);
84 MetaspaceShared::set_archive_loading_failed();
85 if (PrintSharedArchiveAndExit && _validating_classpath_entry_table) {
86 // If we are doing PrintSharedArchiveAndExit and some of the classpath entries
87 // do not validate, we can still continue "limping" to validate the remaining
88 // entries. No need to quit.
89 tty->print("[");
90 tty->vprint(msg, ap);
91 tty->print_cr("]");
92 } else {
93 if (RequireSharedSpaces) {
94 fail(msg, ap);
95 } else {
96 if (PrintSharedSpaces) {
97 tty->print_cr("UseSharedSpaces: %s", msg);
98 }
99 }
100 }
101 va_end(ap);
102 UseSharedSpaces = false;
103 assert(current_info() != NULL, "singleton must be registered");
104 current_info()->close();
105 }
106
107 // Fill in the fileMapInfo structure with data about this VM instance.
108
109 // This method copies the vm version info into header_version. If the version is too
110 // long then a truncated version, which has a hash code appended to it, is copied.
111 //
112 // Using a template enables this method to verify that header_version is an array of
113 // length JVM_IDENT_MAX. This ensures that the code that writes to the CDS file and
114 // the code that reads the CDS file will both use the same size buffer. Hence, will
115 // use identical truncation. This is necessary for matching of truncated versions.
116 template <int N> static void get_header_version(char (&header_version) [N]) {
117 assert(N == JVM_IDENT_MAX, "Bad header_version size");
118
119 const char *vm_version = VM_Version::internal_vm_info_string();
120 const int version_len = (int)strlen(vm_version);
121
122 if (version_len < (JVM_IDENT_MAX-1)) {
123 strcpy(header_version, vm_version);
124
|
80
81 void FileMapInfo::fail_continue(const char *msg, ...) {
82 va_list ap;
83 va_start(ap, msg);
84 MetaspaceShared::set_archive_loading_failed();
85 if (PrintSharedArchiveAndExit && _validating_classpath_entry_table) {
86 // If we are doing PrintSharedArchiveAndExit and some of the classpath entries
87 // do not validate, we can still continue "limping" to validate the remaining
88 // entries. No need to quit.
89 tty->print("[");
90 tty->vprint(msg, ap);
91 tty->print_cr("]");
92 } else {
93 if (RequireSharedSpaces) {
94 fail(msg, ap);
95 } else {
96 if (PrintSharedSpaces) {
97 tty->print_cr("UseSharedSpaces: %s", msg);
98 }
99 }
100 UseSharedSpaces = false;
101 assert(current_info() != NULL, "singleton must be registered");
102 current_info()->close();
103 }
104 va_end(ap);
105 }
106
107 // Fill in the fileMapInfo structure with data about this VM instance.
108
109 // This method copies the vm version info into header_version. If the version is too
110 // long then a truncated version, which has a hash code appended to it, is copied.
111 //
112 // Using a template enables this method to verify that header_version is an array of
113 // length JVM_IDENT_MAX. This ensures that the code that writes to the CDS file and
114 // the code that reads the CDS file will both use the same size buffer. Hence, will
115 // use identical truncation. This is necessary for matching of truncated versions.
116 template <int N> static void get_header_version(char (&header_version) [N]) {
117 assert(N == JVM_IDENT_MAX, "Bad header_version size");
118
119 const char *vm_version = VM_Version::internal_vm_info_string();
120 const int version_len = (int)strlen(vm_version);
121
122 if (version_len < (JVM_IDENT_MAX-1)) {
123 strcpy(header_version, vm_version);
124
|