Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 6982:e4f764ddb06a
7122219: Passed StringTableSize value not verified
Summary: Check that the values specified for -XX:StringTableSize are within a certain range.
Reviewed-by: dholmes, coleenp
author | hseigel |
---|---|
date | Mon, 12 Nov 2012 15:58:11 -0500 |
parents | 8cb93eadfb6d |
children | 2cb439954abf 53715fb1597d |
comparison
equal
deleted
inserted
replaced
6981:8c413497f434 | 6982:e4f764ddb06a |
---|---|
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "classfile/javaAssertions.hpp" | 26 #include "classfile/javaAssertions.hpp" |
27 #include "classfile/symbolTable.hpp" | |
27 #include "compiler/compilerOracle.hpp" | 28 #include "compiler/compilerOracle.hpp" |
28 #include "memory/allocation.inline.hpp" | 29 #include "memory/allocation.inline.hpp" |
29 #include "memory/cardTableRS.hpp" | 30 #include "memory/cardTableRS.hpp" |
30 #include "memory/referenceProcessor.hpp" | 31 #include "memory/referenceProcessor.hpp" |
31 #include "memory/universe.inline.hpp" | 32 #include "memory/universe.inline.hpp" |
1841 status = status && verify_percentage(AdaptiveSizePolicyWeight, | 1842 status = status && verify_percentage(AdaptiveSizePolicyWeight, |
1842 "AdaptiveSizePolicyWeight"); | 1843 "AdaptiveSizePolicyWeight"); |
1843 status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance"); | 1844 status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance"); |
1844 status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio"); | 1845 status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio"); |
1845 status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio"); | 1846 status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio"); |
1847 | |
1848 // Divide by bucket size to prevent a large size from causing rollover when | |
1849 // calculating amount of memory needed to be allocated for the String table. | |
1850 status = status && verify_interval(StringTableSize, defaultStringTableSize, | |
1851 (max_uintx / StringTable::bucket_size()), "StringTable size"); | |
1846 | 1852 |
1847 if (MinHeapFreeRatio > MaxHeapFreeRatio) { | 1853 if (MinHeapFreeRatio > MaxHeapFreeRatio) { |
1848 jio_fprintf(defaultStream::error_stream(), | 1854 jio_fprintf(defaultStream::error_stream(), |
1849 "MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or " | 1855 "MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or " |
1850 "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")\n", | 1856 "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")\n", |