Skip to content

Commit

Permalink
Adjust TraceException dumping code in c1 and JVMCI runtimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mur47x111 committed Dec 9, 2020
1 parent fab6158 commit 3ebaee2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions src/hotspot/share/c1/c1_Runtime1.cpp
Expand Up @@ -538,6 +538,20 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t
}
#endif

// debugging support
// tracing
if (log_is_enabled(Info, exceptions)) {
ResourceMark rm;
stringStream tempst;
assert(nm->method() != NULL, "Unexpected NULL method()");
tempst.print("compiled method <%s>\n"
" at PC" INTPTR_FORMAT " for thread " INTPTR_FORMAT,
nm->method()->print_value_string(), p2i(pc), p2i(thread));
Exceptions::log_exception(exception, tempst.as_string());
}
// for AbortVMOnException flag
Exceptions::debug_check_abort(exception);

// Check the stack guard pages and reenable them if necessary and there is
// enough space on the stack to do so. Use fast exceptions only if the guard
// pages are enabled.
Expand Down Expand Up @@ -584,20 +598,6 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t
// New exception handling mechanism can support inlined methods
// with exception handlers since the mappings are from PC to PC

// debugging support
// tracing
if (log_is_enabled(Info, exceptions)) {
ResourceMark rm;
stringStream tempst;
assert(nm->method() != NULL, "Unexpected NULL method()");
tempst.print("compiled method <%s>\n"
" at PC" INTPTR_FORMAT " for thread " INTPTR_FORMAT,
nm->method()->print_value_string(), p2i(pc), p2i(thread));
Exceptions::log_exception(exception, tempst.as_string());
}
// for AbortVMOnException flag
Exceptions::debug_check_abort(exception);

// Clear out the exception oop and pc since looking up an
// exception handler can cause class loading, which might throw an
// exception and those fields are expected to be clear during
Expand Down
28 changes: 14 additions & 14 deletions src/hotspot/share/jvmci/jvmciRuntime.cpp
Expand Up @@ -267,6 +267,20 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t
}
#endif

// debugging support
// tracing
if (log_is_enabled(Info, exceptions)) {
ResourceMark rm;
stringStream tempst;
assert(cm->method() != NULL, "Unexpected null method()");
tempst.print("compiled method <%s>\n"
" at PC" INTPTR_FORMAT " for thread " INTPTR_FORMAT,
cm->method()->print_value_string(), p2i(pc), p2i(thread));
Exceptions::log_exception(exception, tempst.as_string());
}
// for AbortVMOnException flag
NOT_PRODUCT(Exceptions::debug_check_abort(exception));

// Check the stack guard pages and reenable them if necessary and there is
// enough space on the stack to do so. Use fast exceptions only if the guard
// pages are enabled.
Expand Down Expand Up @@ -313,20 +327,6 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t
// New exception handling mechanism can support inlined methods
// with exception handlers since the mappings are from PC to PC

// debugging support
// tracing
if (log_is_enabled(Info, exceptions)) {
ResourceMark rm;
stringStream tempst;
assert(cm->method() != NULL, "Unexpected null method()");
tempst.print("compiled method <%s>\n"
" at PC" INTPTR_FORMAT " for thread " INTPTR_FORMAT,
cm->method()->print_value_string(), p2i(pc), p2i(thread));
Exceptions::log_exception(exception, tempst.as_string());
}
// for AbortVMOnException flag
NOT_PRODUCT(Exceptions::debug_check_abort(exception));

// Clear out the exception oop and pc since looking up an
// exception handler can cause class loading, which might throw an
// exception and those fields are expected to be clear during
Expand Down

0 comments on commit 3ebaee2

Please sign in to comment.