RFR: 8366363: MemBaseline accesses VMT without using lock [v9]

Paul Hübner phubner at openjdk.org
Tue Sep 2 13:08:50 UTC 2025


On Tue, 2 Sep 2025 11:54:19 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Hi,
>> 
>> The `MemBaseline` used to access the VMT instance directly without a lock. We fix that, and we switch from using a `LinkedList` to a copied `RegionsTree` instead.
>
> Johan Sjölen has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - Yup
>  - Some more ugly casts
>  - Aha, _root is typed as an IntrusiveRBNode

src/hotspot/share/utilities/rbTree.hpp line 464:

> 462:     struct node_pair { const RBNode<K, V>* current; RBNode<K, V>* other_parent; Dir d; };
> 463:     struct stack {
> 464:       node_pair s[64];

Could you clarify the choice of 64 as an upper bound? It's not immediately obvious to me if we guarantee (or if we don't care about) the maximum visitation size in the code below.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27003#discussion_r2316036406


More information about the hotspot-dev mailing list