< prev index next >

src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp

Print this page

        

*** 136,153 **** _filesystem = buf.f_type; _block_size = buf.f_bsize; _available = buf.f_bavail * _block_size; // Make sure we're on a supported filesystem ! if (!is_tmpfs() && !is_hugetlbfs()) { log_error(gc)("Backing file must be located on a %s or a %s filesystem", ZFILESYSTEM_TMPFS, ZFILESYSTEM_HUGETLBFS); return; } // Make sure the filesystem type matches requested large page type ! if (ZLargePages::is_transparent() && !is_tmpfs()) { log_error(gc)("-XX:+UseTransparentHugePages can only be enable when using a %s filesystem", ZFILESYSTEM_TMPFS); return; } --- 136,153 ---- _filesystem = buf.f_type; _block_size = buf.f_bsize; _available = buf.f_bavail * _block_size; // Make sure we're on a supported filesystem ! if (!ZAllowHeapOnFileSystem && !is_tmpfs() && !is_hugetlbfs()) { log_error(gc)("Backing file must be located on a %s or a %s filesystem", ZFILESYSTEM_TMPFS, ZFILESYSTEM_HUGETLBFS); return; } // Make sure the filesystem type matches requested large page type ! if (!ZAllowHeapOnFileSystem && ZLargePages::is_transparent() && !is_tmpfs()) { log_error(gc)("-XX:+UseTransparentHugePages can only be enable when using a %s filesystem", ZFILESYSTEM_TMPFS); return; }
*** 168,178 **** ZFILESYSTEM_HUGETLBFS); return; } const size_t expected_block_size = is_tmpfs() ? os::vm_page_size() : os::large_page_size(); ! if (expected_block_size != _block_size) { log_error(gc)("%s filesystem has unexpected block size " SIZE_FORMAT " (expected " SIZE_FORMAT ")", is_tmpfs() ? ZFILESYSTEM_TMPFS : ZFILESYSTEM_HUGETLBFS, _block_size, expected_block_size); return; } --- 168,178 ---- ZFILESYSTEM_HUGETLBFS); return; } const size_t expected_block_size = is_tmpfs() ? os::vm_page_size() : os::large_page_size(); ! if (!ZAllowHeapOnFileSystem && (expected_block_size != _block_size)) { log_error(gc)("%s filesystem has unexpected block size " SIZE_FORMAT " (expected " SIZE_FORMAT ")", is_tmpfs() ? ZFILESYSTEM_TMPFS : ZFILESYSTEM_HUGETLBFS, _block_size, expected_block_size); return; }
*** 199,208 **** --- 199,213 ---- return fd; } int ZPhysicalMemoryBacking::create_file_fd(const char* name) const { + if (ZAllowHeapOnFileSystem && (AllocateHeapAt == NULL)) { + log_error(gc)("-XX:AllocateHeapAt is needed when ZAllowHeapOnFileSystem is specified"); + return -1; + } + const char* const filesystem = ZLargePages::is_explicit() ? ZFILESYSTEM_HUGETLBFS : ZFILESYSTEM_TMPFS; const char** const preferred_mountpoints = ZLargePages::is_explicit() ? z_preferred_hugetlbfs_mountpoints
< prev index next >