RFR: 8201516: DebugNonSafepoints generates incorrect information [v4]

Tobias Hartmann thartmann at openjdk.org
Fri Mar 3 06:37:12 UTC 2023


On Thu, 2 Mar 2023 17:47:17 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Presize new node note array
>
> src/hotspot/share/opto/phaseX.cpp line 474:
> 
>> 472:   GrowableArray<Node_Notes*>* old_node_note_array = C->node_note_array();
>> 473:   if (old_node_note_array != nullptr) {
>> 474:     int new_size = (_useful.size() >> 8) + 1; // The node note array uses blocks, see C->_log2_node_notes_block_size
> 
> You should call `new_size = MAX2(8, new_size)` to make sure that we have at least 8 elements for initial allocation.

Okay, I added that. The 8 seems arbitrary to me but since we already use that for initial allocation of the array, we can as well be consistent here. Just note that since we are calling `C->grow_node_notes`, we will also initialize with `Node_Notes*` right away.

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

PR: https://git.openjdk.org/jdk/pull/12806


More information about the hotspot-compiler-dev mailing list