RFR: 8225702(13): Safepoint counter can't be used for safepoint detection

Robbin Ehn robbin.ehn at oracle.com
Tue Jun 18 07:45:34 UTC 2019


Hi Dan,

Fixed below!

v2 against RFR mail.

Thanks, Robbin

On 2019-06-18 00:11, Daniel D. Daugherty wrote:
> 
> src/hotspot/share/runtime/safepoint.hpp
>      L52:   uint64_t _id;
>          Please consider: 's/_id/_safepoint_id/'; see below for more renames.
> 
>      L55:   SafepointStateTracker(uint64_t current_id, bool at_safepoint);
>          Please consider: 's/current_id/safepoint_id/'; see below for more renames.
> 
>      L103:   // Basic counter which increase inside each safepoint.
>          nit - typo: s/increase/increases once/
> 
>          Perhaps add a bit more to the comment:
> 
>              // A change in this counter or a change in the result of
>              // is_at_safepoint() are used by SafepointStateTracker::
>              // safepoint_state_changed() to determine its answer.
> 
>      L165:     return SafepointStateTracker(_safepoint_id, _state == 
> _synchronized);
>          Should the second param be "is_at_safepoint()" instead?
> 
> src/hotspot/share/runtime/safepoint.cpp
>      L122: SafepointStateTracker::SafepointStateTracker(uint64_t current, bool 
> in_safepoint) {
>      L123:   _id = current;
>      L124:   _at_safepoint = in_safepoint;
>          Please consider:
>           SafepointStateTracker::SafepointStateTracker(uint64_t safepoint_id, 
> bool at_safepoint) {
>             _safepoint_id = safepoint_id;
>             _at_safepoint = is_safepoint;
> 
>      L128:   return _id != SafepointSynchronize::_safepoint_id ||
>          Please consider: 's/_id/_safepoint_id/'
> 
> src/hotspot/share/runtime/vmThread.cpp
>      No comments.
> 
> src/hotspot/share/ci/ciMethodData.cpp
>      No comments.
> 
> src/hotspot/share/code/dependencyContext.hpp
>      No comments.
> 
> src/hotspot/share/runtime/biasedLocking.cpp
>      Should this file include safepoint.hpp?
> 
> Dan
> 
>> Issue:
>> https://bugs.openjdk.java.net/browse/JDK-8225702
>>
>> Passes JFR test and t1-3.
>>
>> Thanks, Robbin
> 


More information about the hotspot-jfr-dev mailing list