RFR: 8201516: DebugNonSafepoints generates incorrect information [v4]
Tobias Hartmann
thartmann at openjdk.org
Wed Mar 8 10:55:25 UTC 2023
On Wed, 8 Mar 2023 06:16:16 GMT, Xin Liu <xliu at openjdk.org> wrote:
> Why don't we just use C->_log2_node_notes_block_size directly in (_useful.size() >> 8)?
Because it's private in `Compile`. We could make it public but I thought it's not worth it.
> I don't understand why we have to add MAX2(8, new_size) either. It looks like c2 doesn't want to have node-level accuracy. It drops the lowest 8bits of node_idx as block_id. I think the minimal number of "block" is 1, or arr is NULL.
I think you are misinterpreting the code in `Compile::locate_node_notes`. It first determines the `block_idx` by `idx >> _log2_node_notes_block_size` and then the position in that block by `idx & (_node_notes_block_size-1)`.
-------------
PR: https://git.openjdk.org/jdk/pull/12806
More information about the hotspot-compiler-dev
mailing list