Make chunk-in-place-enlargment switchable stuefe-new-metaspace-branch
authorstuefe
Fri, 27 Sep 2019 19:01:21 +0200
branchstuefe-new-metaspace-branch
changeset 58380 0d77dd9159b1
parent 58333 78b2e8f46dd4
child 58381 5f5558a1a113
Make chunk-in-place-enlargment switchable
src/hotspot/share/memory/metaspace/settings.cpp
src/hotspot/share/runtime/globals.hpp
--- a/src/hotspot/share/memory/metaspace/settings.cpp	Wed Sep 25 12:40:57 2019 +0200
+++ b/src/hotspot/share/memory/metaspace/settings.cpp	Fri Sep 27 19:01:21 2019 +0200
@@ -128,7 +128,7 @@
 
   // Since this has nothing to do with reclaiming, set it independently from the
   // strategy. This is rather arbitrarily choosen.
-  _enlarge_chunks_in_place = true;
+  _enlarge_chunks_in_place = MetaspaceEnlargeChunksInPlace;
   _enlarge_chunks_in_place_max_word_size = 256 * K;
 
   // Optionally, we can shepherd micro cld metaspace allocs to an own root chunk.
--- a/src/hotspot/share/runtime/globals.hpp	Wed Sep 25 12:40:57 2019 +0200
+++ b/src/hotspot/share/runtime/globals.hpp	Fri Sep 27 19:01:21 2019 +0200
@@ -1619,6 +1619,9 @@
   product(bool, MetaspaceSeparateMicroCLDs, false,                          \
           "Micro CLDs are separated.")                                      \
                                                                             \
+  product(bool, MetaspaceEnlargeChunksInPlace, true,                        \
+          "Metapace chunks are enlarged in place.")                         \
+                                                                            \
   manageable(uintx, MinHeapFreeRatio, 40,                                   \
           "The minimum percentage of heap free after GC to avoid expansion."\
           " For most GCs this applies to the old generation. In G1 and"     \