< prev index next >

share/gc/parallel/adjoiningGenerations.cpp

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

@@ -1,7 +1,7 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -58,10 +58,19 @@
   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(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,
                                init_high_byte_size);
 

@@ -76,10 +85,13 @@
                               _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(old_young_rs.nvdimm_fd());
+    }
     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,10 +122,14 @@
 
     // 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(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");
   }
 }
 
< prev index next >