< prev index next >
src/share/vm/memory/filemap.cpp
Print this page
rev 9019 : [mq]: format.patch
*** 48,58 ****
#ifndef O_BINARY // if defined (Win32) use binary files.
#define O_BINARY 0 // otherwise do nothing.
#endif
- PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
extern address JVM_FunctionAtStart();
extern address JVM_FunctionAtEnd();
// Complain and stop. All error conditions occurring during the writing of
// an archive file should stop the process. Unrecoverable errors during
--- 48,57 ----
*** 441,452 ****
struct FileMapInfo::FileMapHeader::space_info* si = &_header->_space[region];
if (_file_open) {
guarantee(si->_file_offset == _file_offset, "file offset mismatch.");
if (PrintSharedSpaces) {
! tty->print_cr("Shared file region %d: 0x%6x bytes, addr " INTPTR_FORMAT
! " file offset 0x%6x", region, size, base, _file_offset);
}
} else {
si->_file_offset = _file_offset;
}
if (MetaspaceShared::is_string_region(region)) {
--- 440,451 ----
struct FileMapInfo::FileMapHeader::space_info* si = &_header->_space[region];
if (_file_open) {
guarantee(si->_file_offset == _file_offset, "file offset mismatch.");
if (PrintSharedSpaces) {
! tty->print_cr("Shared file region %d: " SIZE_FORMAT_HEX_W(6) " bytes, addr " INTPTR_FORMAT
! " file offset " SIZE_FORMAT_HEX_W(6), region, size, p2i(base), _file_offset);
}
} else {
si->_file_offset = _file_offset;
}
if (MetaspaceShared::is_string_region(region)) {
*** 600,610 ****
// Reserve the space first, then map otherwise map will go right over some
// other reserved memory (like the code cache).
ReservedSpace rs(size, os::vm_allocation_granularity(), false, requested_addr);
if (!rs.is_reserved()) {
! fail_continue("Unable to reserve shared space at required address " INTPTR_FORMAT, requested_addr);
return rs;
}
// the reserved virtual memory is for mapping class data sharing archive
MemTracker::record_virtual_memory_type((address)rs.base(), mtClassShared);
--- 599,610 ----
// Reserve the space first, then map otherwise map will go right over some
// other reserved memory (like the code cache).
ReservedSpace rs(size, os::vm_allocation_granularity(), false, requested_addr);
if (!rs.is_reserved()) {
! fail_continue("Unable to reserve shared space at required address "
! INTPTR_FORMAT, p2i(requested_addr));
return rs;
}
// the reserved virtual memory is for mapping class data sharing archive
MemTracker::record_virtual_memory_type((address)rs.base(), mtClassShared);
*** 657,667 ****
narrow_klass_shift() != Universe::narrow_klass_shift()) {
if (PrintSharedSpaces && _header->_space[MetaspaceShared::first_string]._used > 0) {
tty->print_cr("Shared string data from the CDS archive is being ignored. "
"The current CompressedOops/CompressedClassPointers encoding differs from "
"that archived due to heap size change. The archive was dumped using max heap "
! "size %dM.", max_heap_size()/M);
}
} else {
string_ranges = new MemRegion[MetaspaceShared::max_strings];
struct FileMapInfo::FileMapHeader::space_info* si;
--- 657,667 ----
narrow_klass_shift() != Universe::narrow_klass_shift()) {
if (PrintSharedSpaces && _header->_space[MetaspaceShared::first_string]._used > 0) {
tty->print_cr("Shared string data from the CDS archive is being ignored. "
"The current CompressedOops/CompressedClassPointers encoding differs from "
"that archived due to heap size change. The archive was dumped using max heap "
! "size " UINTX_FORMAT "M.", max_heap_size()/M);
}
} else {
string_ranges = new MemRegion[MetaspaceShared::max_strings];
struct FileMapInfo::FileMapHeader::space_info* si;
*** 894,904 ****
" version or build of HotSpot");
return false;
}
if (_obj_alignment != ObjectAlignmentInBytes) {
FileMapInfo::fail_continue("The shared archive file's ObjectAlignmentInBytes of %d"
! " does not equal the current ObjectAlignmentInBytes of %d.",
_obj_alignment, ObjectAlignmentInBytes);
return false;
}
return true;
--- 894,904 ----
" version or build of HotSpot");
return false;
}
if (_obj_alignment != ObjectAlignmentInBytes) {
FileMapInfo::fail_continue("The shared archive file's ObjectAlignmentInBytes of %d"
! " does not equal the current ObjectAlignmentInBytes of " INTX_FORMAT ".",
_obj_alignment, ObjectAlignmentInBytes);
return false;
}
return true;
*** 949,959 ****
for (int i = 0; i < MetaspaceShared::n_regions; i++) {
struct FileMapInfo::FileMapHeader::space_info* si = &_header->_space[i];
char *base = _header->region_addr(i);
gclog_or_tty->print(" %s " INTPTR_FORMAT "-" INTPTR_FORMAT,
shared_region_name[i],
! base, base + si->_used);
}
}
// Unmap mapped regions of shared space.
void FileMapInfo::stop_sharing_and_unmap(const char* msg) {
--- 949,959 ----
for (int i = 0; i < MetaspaceShared::n_regions; i++) {
struct FileMapInfo::FileMapHeader::space_info* si = &_header->_space[i];
char *base = _header->region_addr(i);
gclog_or_tty->print(" %s " INTPTR_FORMAT "-" INTPTR_FORMAT,
shared_region_name[i],
! p2i(base), p2i(base + si->_used));
}
}
// Unmap mapped regions of shared space.
void FileMapInfo::stop_sharing_and_unmap(const char* msg) {
< prev index next >