RFR: 8312132: Add tracking of multiple address spaces in NMT [v95]
Johan Sjölen
jsjolen at openjdk.org
Tue May 21 09:37:41 UTC 2024
On Mon, 20 May 2024 23:42:58 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - Remove unused include
>> - Basic tests for NativeCallStackStorage
>> - Allow for passing in nr of buckets
>> - Remove friend-ness
>
> test/hotspot/gtest/nmt/test_nmt_treap.cpp line 326:
>
>> 324: for (int i = 0; i < ten_thousand; i++) {
>> 325: int r = os::random();
>> 326: if (r >= 0) {
>
> I think `os::random()` will only return positive numbers, so this test case will only call `upsert` and will never call `remove`.
>
> Instead of:
>
> ` if (r >= 0) {`
>
> we should do:
>
> ` if (r%2 == 0) {`
Thanks! I'll fix that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1607978359
More information about the hotspot-dev
mailing list