On Tue, 10 Feb 2026 13:39:11 GMT, Fei Yang <[email protected]> wrote:
> Hi, > > Please consider this small test-only change. > > `ReservedCodeCacheSize` is set to 2GB in > https://bugs.openjdk.org/browse/JDK-8367691. > But 2GB is not always the limit across all platforms. RISC-V reset this limit > to 2047MB for performance reasons. > Seem to me a limit of 1GB would be more than enough for this test case. So > this change. > > Testing: verified using the same test on both x64 and aarch64 platforms with > fastdebug build. Hi, First of all, thanks for your work on RISC-V! I set this limit to 2GB because when we were running with 1.5GB, we were occasionally OOMing. When looking at [the commit](https://github.com/openjdk/valhalla/commit/b006b053ff402157b080c6a35a0d2a7c237e44c1) one can observe that we used to be more granular with the flags before. I admit switching to `ReservedCodeCacheSize` to control the total size was a bandaid fix to avoid troubleshooting which of the segments had the most pressure on it and adjusting that. I'll run a few stress tests with the 1GB limit to see if we still OOM on our infra. I'll keep you updated! ------------- PR Review: https://git.openjdk.org/valhalla/pull/2071#pullrequestreview-3783607956
