RFR: 8311248: Refactor CodeCache::initialize_heaps to simplify adding new CodeCache segments [v7]
Boris Ulasevich
bulasevich at openjdk.org
Tue Feb 20 12:46:57 UTC 2024
On Mon, 19 Feb 2024 19:26:44 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>> 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.
ok. thank you
> src/hotspot/share/code/codeCache.cpp line 231:
>
>> 229: // MethodNonProfiled heap is always available for segmented code heap
>> 230: ShouldNotReachHere();
>> 231: }
>
> Should we make it an assert?
Ok
> src/hotspot/share/code/codeCache.cpp line 255:
>
>> 253:
>> 254: // Compatibility.
>> 255: // Override Non-NMethod default size if two other segments are set explicitly
>
> I don't think we need this comment because it is obvious from IF.
ok
> src/hotspot/share/code/codeCache.cpp line 297:
>
>> 295:
>> 296: vm_exit_during_initialization("Invalid code heap sizes", message);
>> 297: return;
>
> `return` is not needed.
right. thanks
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1495759721
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1495760549
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1495760913
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1495759279
More information about the hotspot-dev
mailing list