RFR: 8340103: Add internal set_flag function to VMATree [v7]

Johan Sjölen jsjolen at openjdk.org
Wed Sep 25 17:44:54 UTC 2024


On Wed, 25 Sep 2024 16:00:02 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   apply -> add
>
> src/hotspot/share/nmt/vmatree.cpp line 205:
> 
>> 203:   visit_in_order([&](TreapNode* current) {
>> 204:     out->print(SIZE_FORMAT " (%s) - %s - ", current->key(), NMTUtil::tag_to_name(current->val().out.mem_tag()),
>> 205:                statetype_to_string(current->val().out.type()));
> 
> Could we consider here adding a utility function:
> 
> 
>   IntervalState getState(TreapNode* node) {
>     return node->val().out;
>   }
> 
> 
> to simplify from:
> 
> 
>     out->print(SIZE_FORMAT " (%s) - %s - ", current->key(), NMTUtil::tag_to_name(current->val().out.mem_tag()),
>                 statetype_to_string(current->val().out.type()));
> 
> 
> to
> 
> 
>     out->print(SIZE_FORMAT " (%s) - %s - ", current->key(), NMTUtil::tag_to_name(getState(current).mem_tag()),
>                 statetype_to_string(getState(current).type()));
> 
> 
> and all the other from:
> 
> `    stB.out = leqA_n->val().out;
> `
> 
> to:
> 
> `    stB.out = getState(leqA_n);
> `

Sure, but I had to pick `in_state` and `out_state` as there are two states we're interested in.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20994#discussion_r1775687867


More information about the hotspot-runtime-dev mailing list