RFR: 8311248: Refactor CodeCache::initialize_heaps to simplify adding new CodeCache segments [v2]

Boris Ulasevich bulasevich at openjdk.org
Fri Jan 26 10:04:51 UTC 2024


On Thu, 18 Jan 2024 15:02:11 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> Boris Ulasevich has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   cleanup & test udpdate
>
> 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: void CodeCache::report_cache_minimal_size_error(const char *codeheap, size_t size, size_t required_size) {
> 
> I suggest to have a function:
> 
> static void check_min_size(... code_heap, size_t min_required_size) {
>    if (code_heap.enabled && code_heap.size >= min_required_size)
>      return;
> 
>     log_debug(codecache)("Code heap (%s) size "  SIZE_FORMAT " below required minimal size " SIZE_FORMAT,
>                        code_heap.name, code_heap.size, min_required_size); 
> 
>     err_msg title("Not enough space in %s to run VM", code_heap.name);
>     err_msg message(SIZE_FORMAT "K < " SIZE_FORMAT "K", code_heap.size / K, min_required_size / K);
>     vm_exit_during_initialization(title, message);
> }

ok

> src/hotspot/share/code/codeCache.cpp line 185:
> 
>> 183:                        codeheap, (long long) size, (long long) required_size);
>> 184:   err_msg title("Not enough space in %s to run VM", codeheap);
>> 185:   err_msg message(SIZE_FORMAT "K < " SIZE_FORMAT "K", size, required_size);
> 
> Missed `/ K`

thanks!

> src/hotspot/share/code/codeCache.cpp line 232:
> 
>> 230:     // segment size ever if it was set explicitly.
>> 231:     non_profiled.size += profiled.size;
>> 232:     // Profiled segment is not available, forcibly set size to 0
> 
> Profiled code heap is not available, ...

ok

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1467444024
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1467443324
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1467443079


More information about the hotspot-dev mailing list