363 // If PrintSharedArchiveAndExit is enabled, don't report failure to the
364 // caller. Please see above comments for more details.
365 ok = true;
366 MetaspaceShared::set_archive_loading_failed();
367 }
368 return ok;
369 }
370
371 bool SharedClassPathEntry::check_non_existent() const {
372 assert(_type == non_existent_entry, "must be");
373 log_info(class, path)("should be non-existent: %s", name());
374 struct stat st;
375 if (os::stat(name(), &st) != 0) {
376 log_info(class, path)("ok");
377 return true; // file doesn't exist
378 } else {
379 return false;
380 }
381 }
382
383 void SharedClassPathEntry::metaspace_pointers_do(MetaspaceClosure* it) {
384 it->push(&_name);
385 it->push(&_manifest);
386 }
387
388 void SharedPathTable::metaspace_pointers_do(MetaspaceClosure* it) {
389 it->push(&_table);
390 for (int i=0; i<_size; i++) {
391 path_at(i)->metaspace_pointers_do(it);
392 }
393 }
394
395 void SharedPathTable::dumptime_init(ClassLoaderData* loader_data, Thread* THREAD) {
396 size_t entry_size = sizeof(SharedClassPathEntry);
397 int num_entries = 0;
398 num_entries += ClassLoader::num_boot_classpath_entries();
399 num_entries += ClassLoader::num_app_classpath_entries();
400 num_entries += ClassLoader::num_module_path_entries();
401 num_entries += FileMapInfo::num_non_existent_class_paths();
402 size_t bytes = entry_size * num_entries;
|
363 // If PrintSharedArchiveAndExit is enabled, don't report failure to the
364 // caller. Please see above comments for more details.
365 ok = true;
366 MetaspaceShared::set_archive_loading_failed();
367 }
368 return ok;
369 }
370
371 bool SharedClassPathEntry::check_non_existent() const {
372 assert(_type == non_existent_entry, "must be");
373 log_info(class, path)("should be non-existent: %s", name());
374 struct stat st;
375 if (os::stat(name(), &st) != 0) {
376 log_info(class, path)("ok");
377 return true; // file doesn't exist
378 } else {
379 return false;
380 }
381 }
382
383
384 void SharedClassPathEntry::metaspace_pointers_do(MetaspaceClosure* it) {
385 it->push(&_name);
386 it->push(&_manifest);
387 }
388
389 void SharedPathTable::metaspace_pointers_do(MetaspaceClosure* it) {
390 it->push(&_table);
391 for (int i=0; i<_size; i++) {
392 path_at(i)->metaspace_pointers_do(it);
393 }
394 }
395
396 void SharedPathTable::dumptime_init(ClassLoaderData* loader_data, Thread* THREAD) {
397 size_t entry_size = sizeof(SharedClassPathEntry);
398 int num_entries = 0;
399 num_entries += ClassLoader::num_boot_classpath_entries();
400 num_entries += ClassLoader::num_app_classpath_entries();
401 num_entries += ClassLoader::num_module_path_entries();
402 num_entries += FileMapInfo::num_non_existent_class_paths();
403 size_t bytes = entry_size * num_entries;
|