RFR: 8373022: serviceability/sa/ClhsdbScanOops.java assumes no GC should occur [v3]
Joel Sikström
jsikstro at openjdk.org
Tue Dec 9 09:47:12 UTC 2025
On Fri, 5 Dec 2025 15:59:03 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Hello,
>>
>> If the initial heap size is set too low in serviceability/sa/ClhsdbScanOops.java, a GC migh run, which will interfere with the test and might cause it to fail.
>>
>> The test is scanning the oops in a region of the heap, and after a GC that region appears to be empty, so the output that the test expects is not present. Running the test with a larger explicit InitialHeapSize gives enough headroom to not run a GC.
>>
>> Testing:
>> * serviceability/sa/ClhsdbScanOops.java originally failed when run with `-XX:InitialRAMPercentage=0` (which is the new default). We now explicitly set `-XX:InitialHeapSize=100M`. I've rerun the test 10 times with Serial and Parallel for each test and they all pass.
>
> Joel Sikström has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8373022_initialheapsize_test_no_gc
> - Remove ClhsdbScanOops.java from ProblemList
> - Merge branch 'master' into JDK-8373022_initialheapsize_test_no_gc
> - Remove InitialHeapSize from MethodInvokeWithTraceOnTest
> - Spell fix
> - 8373022: Increase initial heap size for test which assumes no GC
Thank you for the reviews everyone!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28637#issuecomment-3631278879
More information about the serviceability-dev
mailing list