273 #ifndef PRODUCT |
273 #ifndef PRODUCT |
274 warning("Untested: %s in %s: %d\n", message, file, line); |
274 warning("Untested: %s in %s: %d\n", message, file, line); |
275 #endif // !PRODUCT |
275 #endif // !PRODUCT |
276 } |
276 } |
277 |
277 |
278 void report_out_of_shared_space(SharedSpaceType shared_space) { |
|
279 if (shared_space == SharedOptional) { |
|
280 // The estimated shared_optional_space size is large enough |
|
281 // for all class bytes. It should not run out of space. |
|
282 ShouldNotReachHere(); |
|
283 } |
|
284 |
|
285 static const char* name[] = { |
|
286 "shared read only space", |
|
287 "shared read write space", |
|
288 "shared miscellaneous data space", |
|
289 "shared miscellaneous code space" |
|
290 }; |
|
291 static const char* flag[] = { |
|
292 "SharedReadOnlySize", |
|
293 "SharedReadWriteSize", |
|
294 "SharedMiscDataSize", |
|
295 "SharedMiscCodeSize" |
|
296 }; |
|
297 |
|
298 warning("\nThe %s is not large enough\n" |
|
299 "to preload requested classes. Use -XX:%s=<size>\n" |
|
300 "to increase the initial size of %s.\n", |
|
301 name[shared_space], flag[shared_space], name[shared_space]); |
|
302 exit(2); |
|
303 } |
|
304 |
|
305 |
|
306 void report_insufficient_metaspace(size_t required_size) { |
|
307 warning("\nThe MaxMetaspaceSize of " SIZE_FORMAT " bytes is not large enough.\n" |
|
308 "Either don't specify the -XX:MaxMetaspaceSize=<size>\n" |
|
309 "or increase the size to at least " SIZE_FORMAT ".\n", |
|
310 MaxMetaspaceSize, required_size); |
|
311 exit(2); |
|
312 } |
|
313 |
|
314 void report_java_out_of_memory(const char* message) { |
278 void report_java_out_of_memory(const char* message) { |
315 static jint out_of_memory_reported = 0; |
279 static jint out_of_memory_reported = 0; |
316 |
280 |
317 // A number of threads may attempt to report OutOfMemoryError at around the |
281 // A number of threads may attempt to report OutOfMemoryError at around the |
318 // same time. To avoid dumping the heap or executing the data collection |
282 // same time. To avoid dumping the heap or executing the data collection |