mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8021301: better event messages
Made event messages better readable Reviewed-by: kvn, rbackman
This commit is contained in:
parent
4ca00ef5a6
commit
fb2554e3f3
2 changed files with 9 additions and 5 deletions
|
@ -878,7 +878,7 @@ objArrayOop ClassLoader::get_system_packages(TRAPS) {
|
||||||
|
|
||||||
instanceKlassHandle ClassLoader::load_classfile(Symbol* h_name, TRAPS) {
|
instanceKlassHandle ClassLoader::load_classfile(Symbol* h_name, TRAPS) {
|
||||||
ResourceMark rm(THREAD);
|
ResourceMark rm(THREAD);
|
||||||
EventMark m("loading class " INTPTR_FORMAT, (address)h_name);
|
EventMark m("loading class %s", h_name->as_C_string());
|
||||||
ThreadProfilerMark tpm(ThreadProfilerMark::classLoaderRegion);
|
ThreadProfilerMark tpm(ThreadProfilerMark::classLoaderRegion);
|
||||||
|
|
||||||
stringStream st;
|
stringStream st;
|
||||||
|
|
|
@ -125,13 +125,13 @@ void Exceptions::_throw_oop(Thread* thread, const char* file, int line, oop exce
|
||||||
}
|
}
|
||||||
|
|
||||||
void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) {
|
void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) {
|
||||||
|
ResourceMark rm;
|
||||||
assert(h_exception() != NULL, "exception should not be NULL");
|
assert(h_exception() != NULL, "exception should not be NULL");
|
||||||
|
|
||||||
// tracing (do this up front - so it works during boot strapping)
|
// tracing (do this up front - so it works during boot strapping)
|
||||||
if (TraceExceptions) {
|
if (TraceExceptions) {
|
||||||
ttyLocker ttyl;
|
ttyLocker ttyl;
|
||||||
ResourceMark rm;
|
tty->print_cr("Exception <%s%s%s> (" INTPTR_FORMAT ") \n"
|
||||||
tty->print_cr("Exception <%s>%s%s (" INTPTR_FORMAT " ) \n"
|
|
||||||
"thrown [%s, line %d]\nfor thread " INTPTR_FORMAT,
|
"thrown [%s, line %d]\nfor thread " INTPTR_FORMAT,
|
||||||
h_exception->print_value_string(),
|
h_exception->print_value_string(),
|
||||||
message ? ": " : "", message ? message : "",
|
message ? ": " : "", message ? message : "",
|
||||||
|
@ -141,7 +141,9 @@ void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exc
|
||||||
NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message));
|
NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message));
|
||||||
|
|
||||||
// Check for special boot-strapping/vm-thread handling
|
// Check for special boot-strapping/vm-thread handling
|
||||||
if (special_exception(thread, file, line, h_exception)) return;
|
if (special_exception(thread, file, line, h_exception)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(h_exception->is_a(SystemDictionary::Throwable_klass()), "exception is not a subclass of java/lang/Throwable");
|
assert(h_exception->is_a(SystemDictionary::Throwable_klass()), "exception is not a subclass of java/lang/Throwable");
|
||||||
|
|
||||||
|
@ -149,7 +151,9 @@ void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exc
|
||||||
thread->set_pending_exception(h_exception(), file, line);
|
thread->set_pending_exception(h_exception(), file, line);
|
||||||
|
|
||||||
// vm log
|
// vm log
|
||||||
Events::log_exception(thread, "Threw " INTPTR_FORMAT " at %s:%d", (address)h_exception(), file, line);
|
Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]",
|
||||||
|
h_exception->print_value_string(), message ? ": " : "", message ? message : "",
|
||||||
|
(address)h_exception(), file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue