RFR: 8266557: assert(SafepointMechanism::local_poll_armed(_handshakee)) failed: Must be [v3]

Robbin Ehn rehn at openjdk.java.net
Wed Jun 2 09:23:33 UTC 2021


On Tue, 1 Jun 2021 20:48:25 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>> 
>>  - Merge branch 'master' into handshakee
>>  - Small update
>>  - Merge branch 'master' into handshakee
>>  - Fix
>
> src/hotspot/share/runtime/handshake.cpp line 429:
> 
>> 427:   assert(_handshakee == Thread::current(), "Must be called by self");
>> 428:   assert(_lock.owned_by_self(), "Lock must be held");
>> 429:   return _queue.peek();
> 
> `get_op_for_self()` name does not match the `peek()` operation.
> The new name should be `peek_op_for_self()`.

The method retrieves the next operation to be executed, hence 'get'.
That the method uses a queue which provides a pop() and peek() is an implementation, there is no value for the user of  get_op_for_self() to know how this is done?

> src/hotspot/share/runtime/handshake.cpp line 445:
> 
>> 443:   assert(_handshakee != Thread::current(), "Must not be called by self");
>> 444:   assert(_lock.owned_by_self(), "Lock must be held");
>> 445:   return _queue.peek(non_self_queue_filter);
> 
> `get_op()` name does not match the peek() operation.
> The new name should be `peek_op()`.

The method retrieves the next operation to be executed, hence 'get'.
That the method uses a queue which provides a pop() and peek() is an implementation, there is no value for the user of  get_op_for_self() to know how this is done?

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

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


More information about the hotspot-runtime-dev mailing list