--- old/share/gc/parallel/adjoiningGenerations.cpp 2018-06-14 13:09:51.740858387 -0700 +++ new/share/gc/parallel/adjoiningGenerations.cpp 2018-06-14 13:09:51.708858386 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -60,6 +60,15 @@ // a virtual to each generation for initialization of the // generation. + if (os::has_nvdimm()) { + _virtual_spaces.setup_fd(old_young_rs.nvdimm_fd()); +#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, @@ -77,7 +86,10 @@ min_low_byte_size, _virtual_spaces.low_byte_size_limit(), "old", 1); - + + if (os::has_nvdimm()) { + _old_gen->setup_fd(old_young_rs.nvdimm_fd()); + } young_gen()->initialize_work(); assert(young_gen()->reserved().byte_size() <= young_gen()->gen_size_limit(), "Consistency check"); @@ -112,6 +124,10 @@ _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(old_young_rs.nvdimm_fd()); + old_rs.setup_fd(old_young_rs.nvdimm_fd()); + } _old_gen->initialize(old_rs, alignment, "old", 1); assert(old_gen()->gen_size_limit() == old_rs.size(), "Consistency check"); }