8144953: runtime/CommandLine/TraceExceptionsTest.java fails when exception is thrown in compiled code

Added long-form logging message to three places in code, allowing TraceExceptionsTest.java to pass with compiled code.

Reviewed-by: dholmes, coleenp, lfoltan
This commit is contained in:
Rachel Protacio 2016-01-12 12:35:08 -05:00
parent baa19166d1
commit f4555ca41f
6 changed files with 48 additions and 40 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -459,21 +459,11 @@ IRT_ENTRY(address, InterpreterRuntime::exception_handler_for_exception(JavaThrea
// tracing
if (log_is_enabled(Info, exceptions)) {
ResourceMark rm(thread);
Symbol* message = java_lang_Throwable::detail_message(h_exception());
stringStream tempst;
if (message != NULL) {
tempst.print("Exception <%s: %s> (" INTPTR_FORMAT ")\n",
h_exception->print_value_string(), message->as_C_string(),
p2i(h_exception()));
} else {
tempst.print("Exception <%s> (" INTPTR_FORMAT ")\n",
h_exception->print_value_string(),
p2i(h_exception()));
}
tempst.print(" thrown in interpreter method <%s>\n"
tempst.print("interpreter method <%s>\n"
" at bci %d for thread " INTPTR_FORMAT,
h_method->print_value_string(), current_bci, p2i(thread));
LogHandle(exceptions)::info_stream()->print_raw_cr(tempst.as_string());
Exceptions::log_exception(h_exception, tempst);
}
// Don't go paging in something which won't be used.
// else if (extable->length() == 0) {