-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b10
See:
void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) {
...
// vm log
if (LogEvents){
Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]",
h_exception->print_value_string(), message ? ": " : "", message ? message : "",
p2i(h_exception()), file, line);
}
Note that LogEvents is "true"! Therefore, the patch forJDK-8076161 is actually incomplete. This logging does backfire at least when exception is coming from implicit null check, like in JDK-8076161, or from the native code, like in the benchmark below. Turning LogEvents off improves performance by a lot.
Benchmark:
http://cr.openjdk.java.net/~shade/8153413/StatBench.java
Runnable JAR:
http://cr.openjdk.java.net/~shade/8153413/benchmarks.jar
Events::log_exception seems to record the exception into VM's ring buffer to provide diagnostics during the crash. There are other log messages there, but exceptions logging is special in two regards: a) exceptions may be much more frequent than other events, e.g. redefinitions or deopts; b) we are not capturing most exceptions that are coming from the generated code anyway!
Therefore, I would suggest we drop Events::log_exception facility, or at least remove its usage at Exceptions::_throw.
void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) {
...
// vm log
if (LogEvents){
Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]",
h_exception->print_value_string(), message ? ": " : "", message ? message : "",
p2i(h_exception()), file, line);
}
Note that LogEvents is "true"! Therefore, the patch for
Benchmark:
http://cr.openjdk.java.net/~shade/8153413/StatBench.java
Runnable JAR:
http://cr.openjdk.java.net/~shade/8153413/benchmarks.jar
Events::log_exception seems to record the exception into VM's ring buffer to provide diagnostics during the crash. There are other log messages there, but exceptions logging is special in two regards: a) exceptions may be much more frequent than other events, e.g. redefinitions or deopts; b) we are not capturing most exceptions that are coming from the generated code anyway!
Therefore, I would suggest we drop Events::log_exception facility, or at least remove its usage at Exceptions::_throw.
- relates to
-
JDK-8153229 JavacFiler.checkFileReopening drowns in exceptions after Modular Runtime Images change
- Closed
-
JDK-8076161 Runtime stub for throw_null_pointer_exception always constructs log messages
- Resolved
-
JDK-8212988 add recent class unloading events to the hs_err log
- Resolved