RFR: 8318817: Could not reserve enough space in CodeHeap 'profiled nmethods' (0K) [v4]
Thomas Stuefe
stuefe at openjdk.org
Wed Nov 1 07:44:00 UTC 2023
On Wed, 1 Nov 2023 07:12:43 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> src/hotspot/share/code/codeCache.cpp line 204:
>>
>>> 202: bool non_profiled_set = FLAG_IS_CMDLINE(NonProfiledCodeHeapSize);
>>> 203: const size_t ps = page_size(false, 8);
>>> 204: const size_t min_size = MAX2(os::vm_allocation_granularity(), ps);
>>
>> There is no need for this, nor for the assert below. We know what these sizes are, and their relationship to each other.
>>
>> AIX: ps <= os::vm_page_size == alloc granularity
>> Windows: ps == os::vm_page_size < alloc granularity
>> Everyone else: ps == os::vm_page_size == alloc granularity
>>
>> If it weren't so, a lot of things would break. Just use alloc granularity.
>
>> Windows: ps == os::vm_page_size < alloc granularity
>> Everyone else: ps == os::vm_page_size == alloc granularity
>
> For Linux using `-XX:+UseTransparentHugePages` and Windows using `-XX:+UseLargePages`, I see `ps > os::vm_page_size()` and `ps > os::vm_allocation_granularity()`.
Oh right, my bad. I thought it calls the system pagesize function. Okay, then the max2 makes sense. I'd still remove the assert though.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16373#discussion_r1378481162
More information about the hotspot-compiler-dev
mailing list