Fri, 02 Aug 2013 10:20:34 -0700
8021301: better event messages
Summary: made event messages better readable
Reviewed-by: kvn, rbackman
src/share/vm/classfile/classLoader.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/utilities/exceptions.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/classfile/classLoader.cpp Thu Aug 01 16:01:32 2013 -0700 1.2 +++ b/src/share/vm/classfile/classLoader.cpp Fri Aug 02 10:20:34 2013 -0700 1.3 @@ -878,7 +878,7 @@ 1.4 1.5 instanceKlassHandle ClassLoader::load_classfile(Symbol* h_name, TRAPS) { 1.6 ResourceMark rm(THREAD); 1.7 - EventMark m("loading class " INTPTR_FORMAT, (address)h_name); 1.8 + EventMark m("loading class %s", h_name->as_C_string()); 1.9 ThreadProfilerMark tpm(ThreadProfilerMark::classLoaderRegion); 1.10 1.11 stringStream st;
2.1 --- a/src/share/vm/utilities/exceptions.cpp Thu Aug 01 16:01:32 2013 -0700 2.2 +++ b/src/share/vm/utilities/exceptions.cpp Fri Aug 02 10:20:34 2013 -0700 2.3 @@ -125,13 +125,13 @@ 2.4 } 2.5 2.6 void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) { 2.7 + ResourceMark rm; 2.8 assert(h_exception() != NULL, "exception should not be NULL"); 2.9 2.10 // tracing (do this up front - so it works during boot strapping) 2.11 if (TraceExceptions) { 2.12 ttyLocker ttyl; 2.13 - ResourceMark rm; 2.14 - tty->print_cr("Exception <%s>%s%s (" INTPTR_FORMAT " ) \n" 2.15 + tty->print_cr("Exception <%s%s%s> (" INTPTR_FORMAT ") \n" 2.16 "thrown [%s, line %d]\nfor thread " INTPTR_FORMAT, 2.17 h_exception->print_value_string(), 2.18 message ? ": " : "", message ? message : "", 2.19 @@ -141,7 +141,9 @@ 2.20 NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message)); 2.21 2.22 // Check for special boot-strapping/vm-thread handling 2.23 - if (special_exception(thread, file, line, h_exception)) return; 2.24 + if (special_exception(thread, file, line, h_exception)) { 2.25 + return; 2.26 + } 2.27 2.28 assert(h_exception->is_a(SystemDictionary::Throwable_klass()), "exception is not a subclass of java/lang/Throwable"); 2.29 2.30 @@ -149,7 +151,9 @@ 2.31 thread->set_pending_exception(h_exception(), file, line); 2.32 2.33 // vm log 2.34 - Events::log_exception(thread, "Threw " INTPTR_FORMAT " at %s:%d", (address)h_exception(), file, line); 2.35 + Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]", 2.36 + h_exception->print_value_string(), message ? ": " : "", message ? message : "", 2.37 + (address)h_exception(), file, line); 2.38 } 2.39 2.40