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

Boris Ulasevich bulasevich at openjdk.org
Fri Feb 16 10:23:07 UTC 2024


On Thu, 15 Feb 2024 22:38:21 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> Boris Ulasevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   set_size_of_unset_code_heap
>
> src/hotspot/share/code/codeCache.cpp line 202:
> 
>> 200: static void report_cache_size_error(const CodeHeapInfo& non_nmethod, const CodeHeapInfo& profiled,
>> 201:                                     const CodeHeapInfo& non_profiled, size_t cache_size) {
>> 202:   size_t total = non_nmethod.size;
> 
> You have already calculated the total, why not to reuse it?
> Also add an assert: `assert(total != ReservedCodeCacheSize, "Should be invoked to report an error")`

Okay. Let me remove this helper function. It complicates things more than it simplifies them.

> src/hotspot/share/code/codeCache.cpp line 220:
> 
>> 218:   }
>> 219:   else {
>> 220:     message.append(" is not equal to ReservedCodeCacheSize (" SIZE_FORMAT "K).", cache_size/K);
> 
> The correct message is " is less than ...". We call the function when they are not equal.

ok

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1492248284
PR Review Comment: https://git.openjdk.org/jdk/pull/17244#discussion_r1492250329


More information about the hotspot-dev mailing list