< prev index next >

share/gc/parallel/adjoiningGenerations.cpp

Print this page
rev 1 : G1GC+POGC+NVDIMM Patch with latest comments incorporated from all.
rev 10 : Removed any AllocateOldGenAt handling in reservespace

*** 1,7 **** /* ! * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 53,67 **** --- 53,88 ---- init_low_byte_size <= max_low_byte_size, "Parameter check"); assert(min_high_byte_size <= init_high_byte_size && init_high_byte_size <= max_high_byte_size, "Parameter check"); // Create the generations differently based on the option to // move the boundary. + int fd_for_heap = -1; + if (AllocateOldGenAt != NULL) { + fd_for_heap = os::create_file_for_heap(AllocateOldGenAt); + if (fd_for_heap== -1) { + vm_exit_during_initialization( + err_msg("Could not create file for Heap at location %s", AllocateOldGenAt)); + } + // Allocate space on device. + os::allocate_file(fd_for_heap, MaxHeapSize); + os::set_nvdimm_fd(fd_for_heap); + os::set_nvdimm_present(true); + } if (UseAdaptiveGCBoundary) { // Initialize the adjoining virtual spaces. Then pass the // a virtual to each generation for initialization of the // generation. + if (os::has_nvdimm()) { + _virtual_spaces.setup_fd(fd_for_heap); + #if defined(_WINDOWS) + log_info(gc, heap)("On Windows, ParallelOldGC with NVDIMM does not support adaptive sizing of OldGen. "); + init_low_byte_size = policy->max_old_size(); + min_low_byte_size = policy->max_old_size(); + max_low_byte_size = policy->max_old_size(); + #endif + } // Does the actual creation of the virtual spaces _virtual_spaces.initialize(max_low_byte_size, init_low_byte_size, init_high_byte_size);
*** 76,85 **** --- 97,109 ---- _virtual_spaces.low()->committed_size(), min_low_byte_size, _virtual_spaces.low_byte_size_limit(), "old", 1); + if (os::has_nvdimm()) { + _old_gen->setup_fd(fd_for_heap); + } young_gen()->initialize_work(); assert(young_gen()->reserved().byte_size() <= young_gen()->gen_size_limit(), "Consistency check"); assert(old_young_rs.size() >= young_gen()->gen_size_limit(), "Consistency check");
*** 110,119 **** --- 134,147 ---- // The virtual spaces are created by the initialization of the gens. _young_gen->initialize(young_rs, alignment); assert(young_gen()->gen_size_limit() == young_rs.size(), "Consistency check"); + if (os::has_nvdimm()) { + _old_gen->setup_fd(fd_for_heap); + old_rs.setup_fd(fd_for_heap); + } _old_gen->initialize(old_rs, alignment, "old", 1); assert(old_gen()->gen_size_limit() == old_rs.size(), "Consistency check"); } }
< prev index next >