< prev index next >

src/hotspot/share/memory/filemap.cpp

Print this page




 442 
 443   return i;
 444 }
 445 
 446 void FileMapInfo::check_nonempty_dir_in_shared_path_table() {
 447   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
 448 
 449   bool has_nonempty_dir = false;
 450 
 451   int last = _shared_path_table.size() - 1;
 452   if (last > ClassLoaderExt::max_used_path_index()) {
 453      // no need to check any path beyond max_used_path_index
 454      last = ClassLoaderExt::max_used_path_index();
 455   }
 456 
 457   for (int i = 0; i <= last; i++) {
 458     SharedClassPathEntry *e = shared_path(i);
 459     if (e->is_dir()) {
 460       const char* path = e->name();
 461       if (!os::dir_is_empty(path)) {
 462         tty->print_cr("Error: non-empty directory '%s'", path);
 463         has_nonempty_dir = true;
 464       }
 465     }
 466   }
 467 
 468   if (has_nonempty_dir) {
 469     ClassLoader::exit_with_path_failure("Cannot have non-empty directory in paths", NULL);
 470   }
 471 }
 472 
 473 void FileMapInfo::record_non_existent_class_path_entry(const char* path) {
 474   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
 475   log_info(class, path)("non-existent Class-Path entry %s", path);
 476   if (_non_existent_class_paths == NULL) {
 477     _non_existent_class_paths = new (ResourceObj::C_HEAP, mtInternal)GrowableArray<const char*>(10, true);
 478   }
 479   _non_existent_class_paths->append(os::strdup(path));
 480 }
 481 
 482 int FileMapInfo::num_non_existent_class_paths() {




 442 
 443   return i;
 444 }
 445 
 446 void FileMapInfo::check_nonempty_dir_in_shared_path_table() {
 447   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
 448 
 449   bool has_nonempty_dir = false;
 450 
 451   int last = _shared_path_table.size() - 1;
 452   if (last > ClassLoaderExt::max_used_path_index()) {
 453      // no need to check any path beyond max_used_path_index
 454      last = ClassLoaderExt::max_used_path_index();
 455   }
 456 
 457   for (int i = 0; i <= last; i++) {
 458     SharedClassPathEntry *e = shared_path(i);
 459     if (e->is_dir()) {
 460       const char* path = e->name();
 461       if (!os::dir_is_empty(path)) {
 462         log_error(cds)("Error: non-empty directory '%s'", path);
 463         has_nonempty_dir = true;
 464       }
 465     }
 466   }
 467 
 468   if (has_nonempty_dir) {
 469     ClassLoader::exit_with_path_failure("Cannot have non-empty directory in paths", NULL);
 470   }
 471 }
 472 
 473 void FileMapInfo::record_non_existent_class_path_entry(const char* path) {
 474   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
 475   log_info(class, path)("non-existent Class-Path entry %s", path);
 476   if (_non_existent_class_paths == NULL) {
 477     _non_existent_class_paths = new (ResourceObj::C_HEAP, mtInternal)GrowableArray<const char*>(10, true);
 478   }
 479   _non_existent_class_paths->append(os::strdup(path));
 480 }
 481 
 482 int FileMapInfo::num_non_existent_class_paths() {


< prev index next >