RFR: 8212107: VMThread issues and cleanup [v5]
Robbin Ehn
rehn at openjdk.java.net
Thu Sep 24 06:14:05 UTC 2020
On Thu, 24 Sep 2020 04:10:14 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Whitespace fixes, thanks to Shipilev
>
> src/hotspot/share/runtime/vmThread.hpp line 108:
>
>> 106:
>> 107: static VM_Operation::VMOp_Type vm_op_type() {
>> 108: VM_Operation* op = vm_operation();
>
> Why use vm_operation() instead of direct access to _cur_vm_operation? Elsewhere you made the reverse change.
It was suggested by @shipilev todo that, so we don't need the:
`assert(Thread::current()->is_VM_thread(), "Must be");`
In that method also.
In the other cases we already had access to _cur_vm_operation and it was confusing to mix.
> src/hotspot/share/runtime/vmThread.cpp line 471:
>
>> 469: SafepointSynchronize::init(_vm_thread);
>> 470:
>> 471: assert(Thread::current()->is_VM_thread(), "Must be the VM thread");
>
> This is unnecessary, we don't need to guard against accidental calls to VMThread::loop by other threads!
Removed
-------------
PR: https://git.openjdk.java.net/jdk/pull/228
More information about the hotspot-dev
mailing list