< prev index next >
src/hotspot/share/utilities/exceptions.cpp
Print this page
rev 50234 : Count linkage errors and print in Exceptions::print_exception_counts_on_error
@@ -149,10 +149,14 @@
if (h_exception->is_a(SystemDictionary::OutOfMemoryError_klass())) {
count_out_of_memory_exceptions(h_exception);
}
+ if (h_exception->is_a(SystemDictionary::LinkageError_klass())) {
+ Atomic::inc(&Exceptions::_linkage_errors);
+ }
+
assert(h_exception->is_a(SystemDictionary::Throwable_klass()), "exception is not a subclass of java/lang/Throwable");
// set the pending exception
thread->set_pending_exception(h_exception(), file, line);
@@ -423,10 +427,11 @@
}
}
// Exception counting for hs_err file
volatile int Exceptions::_stack_overflow_errors = 0;
+volatile int Exceptions::_linkage_errors = 0;
volatile int Exceptions::_out_of_memory_error_java_heap_errors = 0;
volatile int Exceptions::_out_of_memory_error_metaspace_errors = 0;
volatile int Exceptions::_out_of_memory_error_class_metaspace_errors = 0;
void Exceptions::count_out_of_memory_exceptions(Handle exception) {
@@ -456,10 +461,13 @@
print_oom_count(st, "metaspace_errors", _out_of_memory_error_metaspace_errors);
print_oom_count(st, "class_metaspace_errors", _out_of_memory_error_class_metaspace_errors);
if (_stack_overflow_errors > 0) {
st->print_cr("StackOverflowErrors=%d", _stack_overflow_errors);
}
+ if (_linkage_errors > 0) {
+ st->print_cr("LinkageErrors=%d", _linkage_errors);
+ }
}
// Implementation of ExceptionMark
ExceptionMark::ExceptionMark(Thread*& thread) {
< prev index next >