231 void report_vm_out_of_memory(const char* file, int line, size_t size,
232 const char* message) {
233 if (Debugging) return;
234
235 Thread* thread = ThreadLocalStorage::get_thread_slow();
236 VMError(thread, file, line, size, message).report_and_die();
237
238 // The UseOSErrorReporting option in report_and_die() may allow a return
239 // to here. If so then we'll have to figure out how to handle it.
240 guarantee(false, "report_and_die() should not return here");
241 }
242
243 void report_should_not_call(const char* file, int line) {
244 report_vm_error(file, line, "ShouldNotCall()");
245 }
246
247 void report_should_not_reach_here(const char* file, int line) {
248 report_vm_error(file, line, "ShouldNotReachHere()");
249 }
250
251 void report_should_not_reach_here2(const char* file, int line, const char* message) {
252 report_vm_error(file, line, "ShouldNotReachHere()", message);
253 }
254
255 void report_unimplemented(const char* file, int line) {
256 report_vm_error(file, line, "Unimplemented()");
257 }
258
259 void report_untested(const char* file, int line, const char* message) {
260 #ifndef PRODUCT
261 warning("Untested: %s in %s: %d\n", message, file, line);
262 #endif // !PRODUCT
263 }
264
265 void report_out_of_shared_space(SharedSpaceType shared_space) {
266 static const char* name[] = {
267 "native memory for metadata",
268 "shared read only space",
269 "shared read write space",
270 "shared miscellaneous data space"
271 };
272 static const char* flag[] = {
273 "Metaspace",
274 "SharedReadOnlySize",
|
231 void report_vm_out_of_memory(const char* file, int line, size_t size,
232 const char* message) {
233 if (Debugging) return;
234
235 Thread* thread = ThreadLocalStorage::get_thread_slow();
236 VMError(thread, file, line, size, message).report_and_die();
237
238 // The UseOSErrorReporting option in report_and_die() may allow a return
239 // to here. If so then we'll have to figure out how to handle it.
240 guarantee(false, "report_and_die() should not return here");
241 }
242
243 void report_should_not_call(const char* file, int line) {
244 report_vm_error(file, line, "ShouldNotCall()");
245 }
246
247 void report_should_not_reach_here(const char* file, int line) {
248 report_vm_error(file, line, "ShouldNotReachHere()");
249 }
250
251 void report_unimplemented(const char* file, int line) {
252 report_vm_error(file, line, "Unimplemented()");
253 }
254
255 void report_untested(const char* file, int line, const char* message) {
256 #ifndef PRODUCT
257 warning("Untested: %s in %s: %d\n", message, file, line);
258 #endif // !PRODUCT
259 }
260
261 void report_out_of_shared_space(SharedSpaceType shared_space) {
262 static const char* name[] = {
263 "native memory for metadata",
264 "shared read only space",
265 "shared read write space",
266 "shared miscellaneous data space"
267 };
268 static const char* flag[] = {
269 "Metaspace",
270 "SharedReadOnlySize",
|