changeset 10448:143691dafa25

8145204: JVM can hang when ParGCArrayScanChunk=4294967296 and ParallelGC is used Summary: Changed the max value of ParGCArrayScanChunk to max_jint/3 Reviewed-by: jwilhelm, drwhite
author sangheki
date Mon, 07 Mar 2016 01:20:12 -0800
parents f96580a236c0
children 001616491946
files src/share/vm/runtime/commandLineFlagRangeList.cpp src/share/vm/runtime/globals.hpp test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
diffstat 3 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/commandLineFlagRangeList.cpp	Mon Mar 07 10:36:50 2016 +0300
+++ b/src/share/vm/runtime/commandLineFlagRangeList.cpp	Mon Mar 07 01:20:12 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -247,6 +247,9 @@
 void emit_range_double(const char* /*name*/)    { /* NOP */ }
 
 // CommandLineFlagRange emitting code functions if range arguments are provided
+void emit_range_int(const char* name, int min, int max)       {
+  CommandLineFlagRangeList::add(new CommandLineFlagRange_int(name, min, max));
+}
 void emit_range_intx(const char* name, intx min, intx max) {
   CommandLineFlagRangeList::add(new CommandLineFlagRange_intx(name, min, max));
 }
--- a/src/share/vm/runtime/globals.hpp	Mon Mar 07 10:36:50 2016 +0300
+++ b/src/share/vm/runtime/globals.hpp	Mon Mar 07 01:20:12 2016 -0800
@@ -1603,10 +1603,10 @@
   product(bool, ResizePLAB, true,                                           \
           "Dynamically resize (survivor space) promotion LAB's")            \
                                                                             \
-  product(intx, ParGCArrayScanChunk, 50,                                    \
+  product(int, ParGCArrayScanChunk, 50,                                     \
           "Scan a subset of object array and push remainder, if array is "  \
           "bigger than this")                                               \
-          range(1, max_intx)                                                \
+          range(1, max_jint/3)                                              \
                                                                             \
   product(bool, ParGCUseLocalOverflow, false,                               \
           "Instead of a global overflow list, use local overflow stacks")   \
--- a/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java	Mon Mar 07 10:36:50 2016 +0300
+++ b/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java	Mon Mar 07 01:20:12 2016 -0800
@@ -84,13 +84,6 @@
         setAllowedExitCodes("SharedMiscCodeSize", 2);
 
         /*
-         * JDK-8145204
-         * Temporarily remove testing of max range for ParGCArrayScanChunk because
-         * JVM can hang when ParGCArrayScanChunk=4294967296 and ParallelGC is used
-         */
-        excludeTestMaxRange("ParGCArrayScanChunk");
-
-        /*
          * Remove CICompilerCount from testing because currently it can hang system
          */
         excludeTestMaxRange("CICompilerCount");