< prev index next >

share/runtime/os.hpp

Print this page
rev 1 : G1GC+POGC+NVDIMM Patch with latest comments incorporated from all.

*** 226,235 **** --- 226,253 ---- // the bootstrap routine for the stub generator needs to check // the processor count directly and leave the bootstrap routine // in place until called after initialization has ocurred. return AssumeMP || (_processor_count != 1); } + static inline bool has_nvdimm() { + // This is set AFTER memory is successfully mapped on NVDIMM's + // DAX filesystem + return _nvdimm_present; + } + static inline int nvdimm_fd() { + // ParallelOldGC adaptive sizing requires nvdimm fd. + return _nvdimm_fd; + } + static inline address dram_heapbase() { + return _dram_heap_base; + } + static inline address nvdimm_heapbase() { + return _nvdimm_heap_base; + } + static inline uint nvdimm_regionlength() { + return _nvdimm_region_length; + } static julong available_memory(); static julong physical_memory(); static bool has_allocatable_memory_limit(julong* limit); static bool is_server_class_machine();
*** 241,250 **** --- 259,274 ---- static int processor_count() { return _processor_count; } static void set_processor_count(int count) { _processor_count = count; } + static void set_nvdimm_present(bool status) { _nvdimm_present = status; } + static void set_nvdimm_fd(int fd) { _nvdimm_fd = fd; } + static void set_dram_heapbase(address base) {_dram_heap_base = base; } + static void set_nvdimm_heapbase(address base) {_nvdimm_heap_base = base; } + static void set_nvdimm_regionlength(uint length) {_nvdimm_region_length = length; } + // Returns the number of CPUs this process is currently allowed to run on. // Note that on some OSes this can change dynamically. static int active_processor_count(); // At startup the number of active CPUs this process is allowed to run on.
*** 329,340 **** --- 353,367 ---- static char* reserve_memory_aligned(size_t size, size_t alignment, int file_desc = -1); static char* attempt_reserve_memory_at(size_t bytes, char* addr, int file_desc = -1); static void split_reserved_memory(char *base, size_t size, size_t split, bool realloc); static bool commit_memory(char* addr, size_t bytes, bool executable); + static bool commit_memory(char* addr, size_t bytes, bool executable, int file_desc, size_t offset = 0); static bool commit_memory(char* addr, size_t size, size_t alignment_hint, bool executable); + static bool commit_memory(char* addr, size_t size, size_t alignment_hint, + bool executable, int file_desc, size_t offset = 0); // Same as commit_memory() that either succeeds or calls // vm_exit_out_of_memory() with the specified mesg. static void commit_memory_or_exit(char* addr, size_t bytes, bool executable, const char* mesg); static void commit_memory_or_exit(char* addr, size_t size,
*** 361,371 **** // Helper function to create a new file with template jvmheap.XXXXXX. // Returns a valid fd on success or else returns -1 static int create_file_for_heap(const char* dir); // Map memory to the file referred by fd. This function is slightly different from map_memory() // and is added to be used for implementation of -XX:AllocateHeapAt ! static char* map_memory_to_file(char* base, size_t size, int fd); // Replace existing reserved memory with file mapping static char* replace_existing_mapping_with_file_mapping(char* base, size_t size, int fd); static char* map_memory(int fd, const char* file_name, size_t file_offset, char *addr, size_t bytes, bool read_only = false, --- 388,399 ---- // Helper function to create a new file with template jvmheap.XXXXXX. // Returns a valid fd on success or else returns -1 static int create_file_for_heap(const char* dir); // Map memory to the file referred by fd. This function is slightly different from map_memory() // and is added to be used for implementation of -XX:AllocateHeapAt ! static char* map_memory_to_file(char* base, size_t size, int fd, int offset = 0, bool exec = false, bool allocate = true); ! static int allocate_file(int file_desc, size_t size); // Replace existing reserved memory with file mapping static char* replace_existing_mapping_with_file_mapping(char* base, size_t size, int fd); static char* map_memory(int fd, const char* file_name, size_t file_offset, char *addr, size_t bytes, bool read_only = false,
*** 1015,1025 **** const char* home, int home_len, char fileSep, char pathSep); static bool set_boot_path(char fileSep, char pathSep); ! }; #ifndef _WINDOWS template<> struct IsRegisteredEnum<os::SuspendResume::State> : public TrueType {}; #endif // !_WINDOWS --- 1043,1057 ---- const char* home, int home_len, char fileSep, char pathSep); static bool set_boot_path(char fileSep, char pathSep); ! static bool _nvdimm_present; ! static int _nvdimm_fd; ! static address _dram_heap_base; ! static address _nvdimm_heap_base; ! static uint _nvdimm_region_length; }; #ifndef _WINDOWS template<> struct IsRegisteredEnum<os::SuspendResume::State> : public TrueType {}; #endif // !_WINDOWS
< prev index next >