< prev index next >
src/hotspot/share/memory/filemap.cpp
Print this page
@@ -261,11 +261,11 @@
set_name(path, THREAD);
}
void SharedClassPathEntry::init(bool is_modules_image,
ClassPathEntry* cpe, TRAPS) {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
+ assert(Arguments::is_dumping_archive(), "dump time only");
_timestamp = 0;
_filesize = 0;
_from_class_path_attr = false;
struct stat st;
@@ -395,11 +395,11 @@
_table = MetadataFactory::new_array<u8>(loader_data, (int)(bytes + 7 / 8), THREAD);
_size = num_entries;
}
void FileMapInfo::allocate_shared_path_table() {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "Sanity");
+ assert(Arguments::is_dumping_archive(), "Sanity");
EXCEPTION_MARK; // The following calls should never throw, but would exit VM on error.
ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
ClassPathEntry* jrt = ClassLoader::get_jrt_entry();
@@ -442,11 +442,11 @@
return i;
}
void FileMapInfo::check_nonempty_dir_in_shared_path_table() {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
+ assert(Arguments::is_dumping_archive(), "dump time only");
bool has_nonempty_dir = false;
int last = _shared_path_table.size() - 1;
if (last > ClassLoaderExt::max_used_path_index()) {
@@ -469,20 +469,20 @@
ClassLoader::exit_with_path_failure("Cannot have non-empty directory in paths", NULL);
}
}
void FileMapInfo::record_non_existent_class_path_entry(const char* path) {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
+ assert(Arguments::is_dumping_archive(), "dump time only");
log_info(class, path)("non-existent Class-Path entry %s", path);
if (_non_existent_class_paths == NULL) {
_non_existent_class_paths = new (ResourceObj::C_HEAP, mtInternal)GrowableArray<const char*>(10, true);
}
_non_existent_class_paths->append(os::strdup(path));
}
int FileMapInfo::num_non_existent_class_paths() {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "dump time only");
+ assert(Arguments::is_dumping_archive(), "dump time only");
if (_non_existent_class_paths != NULL) {
return _non_existent_class_paths->length();
} else {
return 0;
}
@@ -1148,11 +1148,11 @@
_crc = crc;
}
void FileMapInfo::write_region(int region, char* base, size_t size,
bool read_only, bool allow_exec) {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "Dump time only");
+ assert(Arguments::is_dumping_archive(), "Dump time only");
FileMapRegion* si = space_at(region);
char* target_base = base;
if (DynamicDumpSharedSpaces) {
assert(!HeapShared::is_heap_region(region), "dynamic archive doesn't support heap regions");
< prev index next >