RFR: JDK-8277056: Combining several C2 Print* flags asserts in xmlStream::pop_tag

Tobias Holenstein duke at openjdk.java.net
Fri Apr 22 08:29:26 UTC 2022


On Thu, 21 Apr 2022 23:26:41 GMT, Dean Long <dlong at openjdk.org> wrote:

>>> If the problem is the native --> VM transition while holding the tty lock, then how about if we enter VM mode first, then grab the tty lock?
>> 
>> Unfortunately, there are already `VM_ENTRY_MARK`'s for example in `dump_asm_on` -> `CallStaticJavaDirectNode::format` -> `CallStaticJavaDirectNode::format` -> `JVMState::print_method_with_lineno` -> `ciMethod:line_number_from_bci`. The `VM_ENTRY_MARK` requires the thread to be in native mode for the transition and cannot be called if it was already called before.
>
>> > If the problem is the native --> VM transition while holding the tty lock, then how about if we enter VM mode first, then grab the tty lock?
>> 
>> Unfortunately, there are already `VM_ENTRY_MARK`'s for example in `dump_asm_on` -> `CallStaticJavaDirectNode::format` -> `CallStaticJavaDirectNode::format` -> `JVMState::print_method_with_lineno` -> `ciMethod:line_number_from_bci`. The `VM_ENTRY_MARK` requires the thread to be in native mode for the transition and cannot be called if it was already called before.
> 
> There are ways to fix that.  I see other methods that use GUARDED_VM_ENTRY, for example.  But maybe it's not worth it.

@dean-long , @TobiHartmann , @vnkozlov and @navyxliu thanks for the reviews!

-------------

PR: https://git.openjdk.java.net/jdk/pull/8203


More information about the hotspot-compiler-dev mailing list