RFR: 8311248: Refactor CodeCache::initialize_heaps to simplify adding new CodeCache segments [v7]
Evgeny Astigeevich
eastigeevich at openjdk.org
Mon Feb 19 19:28:55 UTC 2024
On Fri, 16 Feb 2024 10:23:06 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:
>> These changes clean up the logic and the code of allocating codecache segments and add more testing of it, to open a door for further optimization of code cache segmentation. The goal was to keep the behavior as close to the existing behavior as possible, even if it's not quite logical.
>>
>> Also, these changes better account for alignment - PrintFlagsFinal shows the final aligned segment sizes, and the segments fill the ReservedCodeCacheSize without gaps caused by alignment.
>
> Boris Ulasevich has updated the pull request incrementally with one additional commit since the last revision:
>
> minor update. removed helper function as it caused many comments in the review
src/hotspot/share/code/codeCache.cpp line 181:
> 179: GrowableArray<CodeHeap*>* CodeCache::_allocable_heaps = new(mtCode) GrowableArray<CodeHeap*> (static_cast<int>(CodeBlobType::All), mtCode);
> 180:
> 181: static bool check_min_size(const char *codeheap, size_t size, size_t required_size) {
This function never returns `false`.
`return false` is not reachable because of `vm_exit_during_initialization`.
We don't need to return anything from it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1494951869
More information about the hotspot-dev
mailing list