diff src/share/vm/jvmci/jvmciRuntime.cpp @ 23329:bc5552dc384b

Use VM routines to print stack traces from C++ code.
author Roland Schatz <roland.schatz@oracle.com>
date Mon, 21 Mar 2016 13:52:18 +0100
parents 19c85f6618ed
children e0a15983ab51
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciRuntime.cpp	Fri Mar 18 12:47:49 2016 -0700
+++ b/src/share/vm/jvmci/jvmciRuntime.cpp	Mon Mar 21 13:52:18 2016 +0100
@@ -913,23 +913,14 @@
   return false;
 }
 
-void JVMCIRuntime::call_printStackTrace(Handle exception, Thread* thread) {
-  assert(exception->is_a(SystemDictionary::Throwable_klass()), "Throwable instance expected");
-  JavaValue result(T_VOID);
-  JavaCalls::call_virtual(&result,
-                          exception,
-                          KlassHandle(thread,
-                          SystemDictionary::Throwable_klass()),
-                          vmSymbols::printStackTrace_name(),
-                          vmSymbols::void_method_signature(),
-                          thread);
-}
-
 void JVMCIRuntime::abort_on_pending_exception(Handle exception, const char* message, bool dump_core) {
   Thread* THREAD = Thread::current();
   CLEAR_PENDING_EXCEPTION;
   tty->print_raw_cr(message);
-  call_printStackTrace(exception, THREAD);
+
+  java_lang_Throwable::print(exception, tty);
+  tty->cr();
+  java_lang_Throwable::print_stack_trace(exception(), tty);
 
   // Give other aborting threads to also print their stack traces.
   // This can be very useful when debugging class initialization