RFR (M): 8145435: [JVMCI] some tests on Windows fail with: assert(!thread->is_Java_thread()) failed: must not be java thread
tom.rodriguez at oracle.com
Thu Dec 17 07:20:26 UTC 2015
>>> I feel like there was a reason we weren’t using java_lang_Throwable::print_stack_trace but it looks like it handles the causes properly which is the only reason I could think of. Maybe Doug knows?
>> There are two issues with java_lang_Throwable::print_stack_trace:
>> 1. It doesn’t print the exception message, just the stack.
> I’m printing the message separately:
> java_lang_Throwable::print(exception, tty);
> java_lang_Throwable::print_stack_trace(exception(), tty);
There are already 3 other copies of this idiom. Throwable should probably have a single method for this. Or maybe print_stack_trace itself should do this? That would better parallel Throwable.printStackTrace().
>> 2. It doesn’t synchronize the printing on the stream object (in contrast to Throwable.printStackTrace()).
> We can solve that by using ttyLocker.
>> Unless java_lang_Throwable::print_stack_trace is be modified to (optionally) include these 2 features, I think we should keep using JVMCIRuntime::call_printStackTrace and add a comment to it highlighting these differences.
More information about the hotspot-dev