On Mon, 19 May 2025 07:11:46 GMT, Stefan Karlsson <stef...@openjdk.org> wrote:

>> src/hotspot/share/runtime/threadHeapSampler.cpp line 399:
>> 
>>> 397:   assert(result > 0 && result < static_cast<double>(SIZE_MAX), "Result 
>>> is not in an acceptable range.");
>>> 398:   size_t interval = static_cast<size_t>(result);
>>> 399:   _sample_threshold = interval;
>> 
>> Nit: The line 399 is not needed as the value is reset at 400.
>
> Nice catch. This is debugging code from the early stage of this patch. It set 
> up a consistent state to make it easier to get consistent data from the test 
> runs. This also means that we need to respin our testing to make sure that 
> the randomization doesn't trigger anything that we didn't catch with the 
> fixed _sample_threshold.

The unit tests still pass after the fix for this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25114#discussion_r2095512240

Reply via email to