--- old/src/share/vm/utilities/exceptions.hpp 2015-06-05 16:15:25.637767707 -0400 +++ new/src/share/vm/utilities/exceptions.hpp 2015-06-05 16:15:25.123378571 -0400 @@ -102,6 +102,11 @@ class Exceptions { static bool special_exception(Thread *thread, const char* file, int line, Handle exception); static bool special_exception(Thread* thread, const char* file, int line, Symbol* name, const char* message); + + // Count out of memory errors that are interesting in error diagnosis + static volatile int _out_of_memory_error_java_heap_errors; + static volatile int _out_of_memory_error_metaspace_errors; + static volatile int _out_of_memory_error_class_metaspace_errors; public: // this enum is defined to indicate whether it is safe to // ignore the encoding scheme of the original message string. @@ -160,6 +165,14 @@ static void throw_stack_overflow_exception(Thread* thread, const char* file, int line, methodHandle method); + // Exception counting for error files of interesting exceptions that may have + // caused a problem for the jvm + static volatile int _stack_overflow_errors; + + static bool has_exception_counts(); + static void count_out_of_memory_exceptions(Handle exception); + static void print_exception_counts_on_error(outputStream* st); + // for AbortVMOnException flag NOT_PRODUCT(static void debug_check_abort(Handle exception, const char* message = NULL);) NOT_PRODUCT(static void debug_check_abort(const char *value_string, const char* message = NULL);)