8275718: Relax memory constraint on exception counter updates
Reviewed-by: dholmes, minqi
This commit is contained in:
parent
99d4b07cdd
commit
2b5a32c73f
@ -166,7 +166,7 @@ void Exceptions::_throw(JavaThread* thread, const char* file, int line, Handle h
|
||||
}
|
||||
|
||||
if (h_exception->is_a(vmClasses::LinkageError_klass())) {
|
||||
Atomic::inc(&_linkage_errors);
|
||||
Atomic::inc(&_linkage_errors, memory_order_relaxed);
|
||||
}
|
||||
|
||||
assert(h_exception->is_a(vmClasses::Throwable_klass()), "exception is not a subclass of java/lang/Throwable");
|
||||
@ -242,7 +242,7 @@ void Exceptions::throw_stack_overflow_exception(JavaThread* THREAD, const char*
|
||||
java_lang_Throwable::fill_in_stack_trace(exception, method);
|
||||
}
|
||||
// Increment counter for hs_err file reporting
|
||||
Atomic::inc(&Exceptions::_stack_overflow_errors);
|
||||
Atomic::inc(&Exceptions::_stack_overflow_errors, memory_order_relaxed);
|
||||
} else {
|
||||
// if prior exception, throw that one instead
|
||||
exception = Handle(THREAD, THREAD->pending_exception());
|
||||
@ -462,12 +462,12 @@ volatile int Exceptions::_out_of_memory_error_class_metaspace_errors = 0;
|
||||
|
||||
void Exceptions::count_out_of_memory_exceptions(Handle exception) {
|
||||
if (exception() == Universe::out_of_memory_error_metaspace()) {
|
||||
Atomic::inc(&_out_of_memory_error_metaspace_errors);
|
||||
Atomic::inc(&_out_of_memory_error_metaspace_errors, memory_order_relaxed);
|
||||
} else if (exception() == Universe::out_of_memory_error_class_metaspace()) {
|
||||
Atomic::inc(&_out_of_memory_error_class_metaspace_errors);
|
||||
Atomic::inc(&_out_of_memory_error_class_metaspace_errors, memory_order_relaxed);
|
||||
} else {
|
||||
// everything else reported as java heap OOM
|
||||
Atomic::inc(&_out_of_memory_error_java_heap_errors);
|
||||
Atomic::inc(&_out_of_memory_error_java_heap_errors, memory_order_relaxed);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user