< prev index next >
src/share/vm/utilities/vmError.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 302,311 ****
--- 302,351 ----
}
}
#endif // ZERO
}
+ static void print_oom_reasons(outputStream* st) {
+ st->print_cr("# Possible reasons:");
+ st->print_cr("# The system is out of physical RAM or swap space");
+ if (UseCompressedOops) {
+ st->print_cr("# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap");
+ }
+ if (LogBytesPerWord == 2) {
+ st->print_cr("# In 32 bit mode, the process size limit was hit");
+ }
+ st->print_cr("# Possible solutions:");
+ st->print_cr("# Reduce memory load on the system");
+ st->print_cr("# Increase physical memory or swap space");
+ st->print_cr("# Check if swap backing store is full");
+ if (LogBytesPerWord == 2) {
+ st->print_cr("# Use 64 bit Java on a 64 bit OS");
+ }
+ st->print_cr("# Decrease Java heap size (-Xmx/-Xms)");
+ st->print_cr("# Decrease number of Java threads");
+ st->print_cr("# Decrease Java thread stack sizes (-Xss)");
+ st->print_cr("# Set larger code cache with -XX:ReservedCodeCacheSize=");
+ if (UseCompressedOops) {
+ switch (Universe::narrow_oop_mode()) {
+ case Universe::UnscaledNarrowOop:
+ st->print_cr("# JVM is running with Unscaled Compressed Oops mode in which the Java heap is");
+ st->print_cr("# placed in the first 4GB address space. The Java Heap base address is the");
+ st->print_cr("# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress");
+ st->print_cr("# to set the Java Heap base and to place the Java Heap above 4GB virtual address.");
+ break;
+ case Universe::ZeroBasedNarrowOop:
+ st->print_cr("# JVM is running with Zero Based Compressed Oops mode in which the Java heap is");
+ st->print_cr("# placed in the first 32GB address space. The Java Heap base address is the");
+ st->print_cr("# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress");
+ st->print_cr("# to set the Java Heap base and to place the Java Heap above 32GB virtual address.");
+ break;
+ default:
+ break;
+ }
+ }
+ st->print_cr("# This output file may be truncated or incomplete.");
+ }
// This is the main function to report a fatal error. Only one thread can
// call this function, so we don't need to worry about MT-safety. But it's
// possible that the error handler itself may crash or die on an internal
// error, for example, when the stack/heap is badly damaged. We must be
// able to handle recursive errors that happen inside error handler.
*** 373,395 ****
st->print("# ");
st->print_cr("%s", _message);
}
// In error file give some solutions
if (_verbose) {
! st->print_cr("# Possible reasons:");
! st->print_cr("# The system is out of physical RAM or swap space");
! st->print_cr("# In 32 bit mode, the process size limit was hit");
! st->print_cr("# Possible solutions:");
! st->print_cr("# Reduce memory load on the system");
! st->print_cr("# Increase physical memory or swap space");
! st->print_cr("# Check if swap backing store is full");
! st->print_cr("# Use 64 bit Java on a 64 bit OS");
! st->print_cr("# Decrease Java heap size (-Xmx/-Xms)");
! st->print_cr("# Decrease number of Java threads");
! st->print_cr("# Decrease Java thread stack sizes (-Xss)");
! st->print_cr("# Set larger code cache with -XX:ReservedCodeCacheSize=");
! st->print_cr("# This output file may be truncated or incomplete.");
} else {
return; // that's enough for the screen
}
break;
case INTERNAL_ERROR:
--- 413,423 ----
st->print("# ");
st->print_cr("%s", _message);
}
// In error file give some solutions
if (_verbose) {
! print_oom_reasons(st);
} else {
return; // that's enough for the screen
}
break;
case INTERNAL_ERROR:
*** 521,530 ****
--- 549,559 ----
STEP(90, "(printing siginfo)" )
// signal no, signal code, address that caused the fault
if (_verbose && _siginfo) {
+ st->cr();
os::print_siginfo(st, _siginfo);
st->cr();
}
STEP(100, "(printing registers, top of stack, instructions near pc)")
< prev index next >