RFR: 8340103: Add internal set_flag function to VMATree [v11]
Thomas Stuefe
stuefe at openjdk.org
Wed Nov 6 14:23:34 UTC 2024
On Wed, 6 Nov 2024 10:10:45 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> test/hotspot/gtest/nmt/test_vmatree.cpp line 347:
>>
>>> 345: EXPECT_EQ(20, diff.tag[i(mtClassShared)].commit);
>>> 346: }
>>> 347: }
>>
>> I would like to see the following cases explicitly tested:
>> 1) set a tag over a range spanning multiple existing segments with the same stack but different tags - here, I would like to see that set_tag causes the tree to coalesce these different ranges to a single range
>> 2) set a tag over a range spanning multiple existing segments with different stacks and different tags - here, I would like to see that the original ranges stay intact, including their stack information, only the tags should now all be the same
>> 3) set a tag within a range - here, I would like to see three ranges now
>>
>> for 1, also for mismatched starts and ends where either start or end are in the middle of an existing range, which should cause the tree to split that range
>
> Tests added, and they all passed! I really didn't think that case 3 would work, but sometimes I write good code I guess.
That's the good thing about tests. Gives you confidence.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20994#discussion_r1831102568
More information about the hotspot-runtime-dev
mailing list