Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 10392:c07dd9be16e8
8013496: Code cache management command line options work only in special order. Another order of arguments does not deliver the second parameter to the jvm.
Summary: Moved check that ReservedCodeCacheSize >= InitialCodeCacheSize to Arguments::check_vm_args_consistency(). As a result, the ordering in which the two parameters are given to the VM is not relevant. Added a regression test.
Reviewed-by: kvn, twisti
author | anoll |
---|---|
date | Fri, 31 May 2013 06:41:50 +0200 |
parents | 91eba9f82325 |
children | 836a62f43af9 0abfeed51c9e 46c544b8fbfc |
comparison
equal
deleted
inserted
replaced
10391:83dcb116fdb1 | 10392:c07dd9be16e8 |
---|---|
2215 "ContendedPaddingWidth=" INTX_FORMAT " must be the multiple of %d\n", | 2215 "ContendedPaddingWidth=" INTX_FORMAT " must be the multiple of %d\n", |
2216 ContendedPaddingWidth, BytesPerLong); | 2216 ContendedPaddingWidth, BytesPerLong); |
2217 status = false; | 2217 status = false; |
2218 } | 2218 } |
2219 | 2219 |
2220 if (ReservedCodeCacheSize < InitialCodeCacheSize) { | |
2221 jio_fprintf(defaultStream::error_stream(), | |
2222 "Invalid ReservedCodeCacheSize: %dK. Should be greater than InitialCodeCacheSize=%dK\n", | |
2223 ReservedCodeCacheSize/K, InitialCodeCacheSize/K); | |
2224 status = false; | |
2225 } | |
2226 | |
2220 return status; | 2227 return status; |
2221 } | 2228 } |
2222 | 2229 |
2223 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, | 2230 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, |
2224 const char* option_type) { | 2231 const char* option_type) { |
2617 // HotSpot does not have separate native and Java stacks, ignore silently for compatibility | 2624 // HotSpot does not have separate native and Java stacks, ignore silently for compatibility |
2618 // -Xmaxjitcodesize | 2625 // -Xmaxjitcodesize |
2619 } else if (match_option(option, "-Xmaxjitcodesize", &tail) || | 2626 } else if (match_option(option, "-Xmaxjitcodesize", &tail) || |
2620 match_option(option, "-XX:ReservedCodeCacheSize=", &tail)) { | 2627 match_option(option, "-XX:ReservedCodeCacheSize=", &tail)) { |
2621 julong long_ReservedCodeCacheSize = 0; | 2628 julong long_ReservedCodeCacheSize = 0; |
2622 ArgsRange errcode = parse_memory_size(tail, &long_ReservedCodeCacheSize, | 2629 ArgsRange errcode = parse_memory_size(tail, &long_ReservedCodeCacheSize, 1); |
2623 (size_t)InitialCodeCacheSize); | |
2624 if (errcode != arg_in_range) { | 2630 if (errcode != arg_in_range) { |
2625 jio_fprintf(defaultStream::error_stream(), | 2631 jio_fprintf(defaultStream::error_stream(), |
2626 "Invalid maximum code cache size: %s. Should be greater than InitialCodeCacheSize=%dK\n", | 2632 "Invalid maximum code cache size: %s.\n", option->optionString); |
2627 option->optionString, InitialCodeCacheSize/K); | |
2628 describe_range_error(errcode); | |
2629 return JNI_EINVAL; | 2633 return JNI_EINVAL; |
2630 } | 2634 } |
2631 FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize); | 2635 FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize); |
2632 //-XX:IncreaseFirstTierCompileThresholdAt= | 2636 //-XX:IncreaseFirstTierCompileThresholdAt= |
2633 } else if (match_option(option, "-XX:IncreaseFirstTierCompileThresholdAt=", &tail)) { | 2637 } else if (match_option(option, "-XX:IncreaseFirstTierCompileThresholdAt=", &tail)) { |