RFR: 8337217: Port VirtualMemoryTracker to use VMATree

Johan Sjölen jsjolen at openjdk.org
Fri Nov 8 10:52:05 UTC 2024


On Tue, 20 Aug 2024 07:33:06 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> src/hotspot/share/nmt/nmtNativeCallStackStorage.hpp line 94:
>> 
>>> 92:     if (si._stack_index < 0 || si._stack_index >= _stacks.length()) {
>>> 93:       return _fake_stack;
>>> 94:     }
>> 
>> Is that a leftover from debugging?
>> 
>> Shouldn't this be an `assert` in final code?
>
> You are right. Since the next lines check the `-1` as special case; this check should be either an `assert` or logged. I wait for @jdksjolen, as this is his code.

Old code, delete it. No logging for this. You can always add an assert for `si._stack_index >= _stacks.length()`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1731029704


More information about the core-libs-dev mailing list