RFR: 8349525: RBTree: provide leftmost, rightmost, and a simple way to print trees [v2]

Johan Sjölen jsjolen at openjdk.org
Fri Feb 7 09:12:11 UTC 2025


On Fri, 7 Feb 2025 07:28:55 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> For things I currently work on (compilation memory statistic), I need this functionality.
>> 
>> Changes:
>> 
>> - added leftmost() and rightmost() (pretty self-explanatory)
>> - added print_on(outputStream*) (likewise)
>> - const correctness
>> - other minor cleanups
>> - gtests for all added functions
>> 
>> Tests: GHA (all clean), manual tests on Linux x64
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
> 
>   feedback johan

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

> 46: class RBTree {
> 47:   friend class RBTreeTest;
> 48:   typedef RBTree<K, V, COMPARATOR, ALLOCATOR> TreeType;

I'm referring to this being `TreeType` and not only `Tree`, same with `Node`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23486#discussion_r1946202773


More information about the hotspot-dev mailing list