--- old/src/hotspot/os_cpu/linux_x86/gc/z/zBackingFile_linux_x86.hpp 2019-05-02 09:57:42.955832570 +0200 +++ new/src/hotspot/os_cpu/linux_x86/gc/z/zBackingFile_linux_x86.hpp 2019-05-02 09:57:42.709824445 +0200 @@ -26,12 +26,14 @@ #include "memory/allocation.hpp" +class ZErrno; + class ZBackingFile { private: - static bool _hugetlbfs_mmap_retry; - int _fd; + size_t _size; uint64_t _filesystem; + size_t _block_size; size_t _available; bool _initialized; @@ -43,11 +45,17 @@ bool is_hugetlbfs() const; bool tmpfs_supports_transparent_huge_pages() const; - bool try_split_and_expand_tmpfs(size_t offset, size_t length, size_t alignment) const; - bool try_expand_tmpfs(size_t offset, size_t length, size_t alignment) const; - bool try_expand_tmpfs(size_t offset, size_t length) const; - bool try_expand_hugetlbfs(size_t offset, size_t length) const; - bool try_expand_tmpfs_or_hugetlbfs(size_t offset, size_t length, size_t alignment) const; + ZErrno fallocate_compat_ftruncate(size_t size) const; + ZErrno fallocate_compat_mmap(size_t offset, size_t length, bool reserve_only) const; + ZErrno fallocate_compat_pwrite(size_t offset, size_t length) const; + ZErrno fallocate_fill_hole_compat(size_t offset, size_t length); + ZErrno fallocate_fill_hole_syscall(size_t offset, size_t length); + ZErrno fallocate_fill_hole(size_t offset, size_t length); + ZErrno fallocate_punch_hole(size_t offset, size_t length); + ZErrno split_and_fallocate(bool punch_hole, size_t offset, size_t length); + ZErrno fallocate(bool punch_hole, size_t offset, size_t length); + + bool commit_inner(size_t offset, size_t length); public: ZBackingFile(); @@ -55,9 +63,11 @@ bool is_initialized() const; int fd() const; + size_t size() const; size_t available() const; - size_t try_expand(size_t offset, size_t length, size_t alignment) const; + size_t commit(size_t offset, size_t length); + size_t uncommit(size_t offset, size_t length); }; #endif // OS_CPU_LINUX_X86_GC_Z_ZBACKINGFILE_LINUX_X86_HPP