RFR: 8330061: Cleanup: follow code heaps order in CodeCache initialization and logging, code heap info in logs

Boris Ulasevich bulasevich at openjdk.org
Thu Apr 18 13:22:57 UTC 2024


On Wed, 10 Apr 2024 21:51:14 GMT, Dmitry Chuyko <dchuyko at openjdk.org> wrote:

> This is an additional tiny cleanup after CodeCache::initialize_heaps refactoring (JDK-8311248). CodeCache::initialize_heaps: code heaps info is printed in code heaps order, final size adjustments and flags are made in code heaps order. CodeCache::allocate: assertion message contains blob type. CodeCache::print_trace: name of the heap containing the method is printed.
> 
> Testing: jtreg test/hotspot/jtreg/compiler/codecache, tier1, tier2.

src/hotspot/share/code/codeCache.cpp line 254:

> 252:   size_t total = non_nmethod.size + profiled.size + non_profiled.size;
> 253:   if (total != cache_size && !cache_size_set) {
> 254:     log_info(codecache)("ReservedCodeCache size " SIZE_FORMAT "K changed to total segments size"

This code is not important. Consider compacting it back to three lines

src/hotspot/share/code/codeCache.cpp line 1578:

> 1576:     }
> 1577:     tty->print("CodeCache %s:  addr: " INTPTR_FORMAT ", size: 0x%x", event, p2i(cb), size);
> 1578:     FOR_ALL_HEAPS(heap) {

It would be preferable to use the get_code_heap_containing method here

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18732#discussion_r1570735977
PR Review Comment: https://git.openjdk.org/jdk/pull/18732#discussion_r1570739270


More information about the hotspot-compiler-dev mailing list