Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 2095:36c186bcc085
6302804: Hotspot VM dies ungraceful death when C heap is exhausted in various places.
Summary: enhance the error reporting mechanism to help user to fix the problem rather than making it look like a VM error.
Reviewed-by: kvn, kamg
author | coleenp |
---|---|
date | Mon, 03 Jan 2011 14:09:11 -0500 |
parents | ac637b7220d1 |
children | 91fe28b03d6a 8f8dfba37802 |
comparison
equal
deleted
inserted
replaced
2075:06e4b9c9db76 | 2095:36c186bcc085 |
---|---|
2295 round_to((int)long_ThreadStackSize, K) / K); | 2295 round_to((int)long_ThreadStackSize, K) / K); |
2296 // -Xoss | 2296 // -Xoss |
2297 } else if (match_option(option, "-Xoss", &tail)) { | 2297 } else if (match_option(option, "-Xoss", &tail)) { |
2298 // HotSpot does not have separate native and Java stacks, ignore silently for compatibility | 2298 // HotSpot does not have separate native and Java stacks, ignore silently for compatibility |
2299 // -Xmaxjitcodesize | 2299 // -Xmaxjitcodesize |
2300 } else if (match_option(option, "-Xmaxjitcodesize", &tail)) { | 2300 } else if (match_option(option, "-Xmaxjitcodesize", &tail) || |
2301 match_option(option, "-XX:ReservedCodeCacheSize=", &tail)) { | |
2301 julong long_ReservedCodeCacheSize = 0; | 2302 julong long_ReservedCodeCacheSize = 0; |
2302 ArgsRange errcode = parse_memory_size(tail, &long_ReservedCodeCacheSize, | 2303 ArgsRange errcode = parse_memory_size(tail, &long_ReservedCodeCacheSize, |
2303 (size_t)InitialCodeCacheSize); | 2304 (size_t)InitialCodeCacheSize); |
2304 if (errcode != arg_in_range) { | 2305 if (errcode != arg_in_range) { |
2305 jio_fprintf(defaultStream::error_stream(), | 2306 jio_fprintf(defaultStream::error_stream(), |
2306 "Invalid maximum code cache size: %s\n", | 2307 "Invalid maximum code cache size: %s. Should be greater than InitialCodeCacheSize=%dK\n", |
2307 option->optionString); | 2308 option->optionString, InitialCodeCacheSize/K); |
2308 describe_range_error(errcode); | 2309 describe_range_error(errcode); |
2309 return JNI_EINVAL; | 2310 return JNI_EINVAL; |
2310 } | 2311 } |
2311 FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize); | 2312 FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize); |
2312 // -green | 2313 // -green |