# HG changeset patch # User coleenp # Date 1564494978 14400 # Node ID f40a73b61b5e8ae8489c279dff5477f3cf7a27e4 # Parent 11de092bcc5a251904d1000c7f3941ab73e07588 8227123: Assertion failure when setting SymbolTableSize larger than 2^17 (131,072) Summary: Increase max size for SymbolTable and fix experimental option range. Fix option range test to include experimental options. Reviewed-by: jiangli, dholmes, hseigel, gziemski diff -r 11de092bcc5a -r f40a73b61b5e src/hotspot/share/classfile/symbolTable.cpp --- a/src/hotspot/share/classfile/symbolTable.cpp Tue Jul 30 09:26:47 2019 -0400 +++ b/src/hotspot/share/classfile/symbolTable.cpp Tue Jul 30 09:56:18 2019 -0400 @@ -45,10 +45,8 @@ // and not set it too short before we decide to resize, // to match previous startup behavior const double PREF_AVG_LIST_LEN = 8.0; -// 2^17 (131,072) is max size, which is about 6.5 times as large -// as the previous table size (used to be 20,011), -// which never resized -const size_t END_SIZE = 17; +// 2^24 is max size, like StringTable. +const size_t END_SIZE = 24; // If a chain gets to 100 something might be wrong const size_t REHASH_LEN = 100; diff -r 11de092bcc5a -r f40a73b61b5e src/hotspot/share/runtime/globals.hpp --- a/src/hotspot/share/runtime/globals.hpp Tue Jul 30 09:26:47 2019 -0400 +++ b/src/hotspot/share/runtime/globals.hpp Tue Jul 30 09:56:18 2019 -0400 @@ -2339,11 +2339,11 @@ product(uintx, StringTableSize, defaultStringTableSize, \ "Number of buckets in the interned String table " \ "(will be rounded to nearest higher power of 2)") \ - range(minimumStringTableSize, 16777216ul) \ + range(minimumStringTableSize, 16777216ul /* 2^24 */) \ \ experimental(uintx, SymbolTableSize, defaultSymbolTableSize, \ "Number of buckets in the JVM internal Symbol table") \ - range(minimumSymbolTableSize, 111*defaultSymbolTableSize) \ + range(minimumSymbolTableSize, 16777216ul /* 2^24 */) \ \ product(bool, UseStringDeduplication, false, \ "Use string deduplication") \ diff -r 11de092bcc5a -r f40a73b61b5e test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java --- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java Tue Jul 30 09:26:47 2019 -0400 +++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java Tue Jul 30 09:56:18 2019 -0400 @@ -44,6 +44,9 @@ public abstract class JVMOption { + private static final String UNLOCK_FLAG1 = "-XX:+UnlockDiagnosticVMOptions"; + private static final String UNLOCK_FLAG2 = "-XX:+UnlockExperimentalVMOptions"; + /** * Executor for JCMD */ @@ -408,6 +411,9 @@ runJava.add(explicitGC); } + runJava.add(UNLOCK_FLAG1); + runJava.add(UNLOCK_FLAG2); + runJava.addAll(prepend); runJava.add(optionValue); runJava.add(JVMStartup.class.getName()); diff -r 11de092bcc5a -r f40a73b61b5e test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java --- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java Tue Jul 30 09:26:47 2019 -0400 +++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java Tue Jul 30 09:56:18 2019 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -46,6 +46,9 @@ /* Java option which print options with ranges */ private static final String PRINT_FLAGS_RANGES = "-XX:+PrintFlagsRanges"; + private static final String UNLOCK_FLAG1 = "-XX:+UnlockDiagnosticVMOptions"; + private static final String UNLOCK_FLAG2 = "-XX:+UnlockExperimentalVMOptions"; + /* StringBuilder to accumulate failed message */ private static final StringBuilder finalFailedMessage = new StringBuilder(); @@ -458,7 +461,7 @@ * @throws Exception if a new process can not be created or an error * occurred while reading the data */ - public static Map getOptionsAsMap(boolean withRanges, Predicate acceptOrigin, + private static Map getOptionsAsMap(boolean withRanges, Predicate acceptOrigin, String... additionalArgs) throws Exception { Map result; Process p; @@ -475,6 +478,8 @@ if (GCType != null) { runJava.add(GCType); } + runJava.add(UNLOCK_FLAG1); + runJava.add(UNLOCK_FLAG2); runJava.add(PRINT_FLAGS_RANGES); runJava.add("-version");