RFR: 8306843: JVMTI tag map extremely slow after JDK-8292741 [v3]
    Coleen Phillimore 
    coleenp at openjdk.org
       
    Tue May  9 14:02:30 UTC 2023
    
    
  
On Tue, 9 May 2023 07:58:36 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename and comment put_when_absent.
>
> src/hotspot/share/prims/jvmtiTagMapTable.cpp line 50:
> 
>> 48:     _wh = src._wh;
>> 49:     _obj = nullptr;
>> 50:   }
> 
> There can be just one line at 51 instead of two lines at 45 and 49
> where `_obj` field is initialized with the `nullptr`.
> Is it intentional that the `_obj` field always gets `nullptr` value in this constructor?
Yes, _obj should always be null after copying either because we've transferred the oop over to the WeakHandle or that it's a copy from a node in the table so already a WeakHandle.  I admit that having _obj assigned to null in both places looks odd, but it was for two different reasons.  I added a comment too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13818#discussion_r1188641401
    
    
More information about the serviceability-dev
mailing list