Skip to content

Commit

Permalink
log messages: use SIZE_FORMAT, printed in K
Browse files Browse the repository at this point in the history
  • Loading branch information
bulasevich committed Apr 3, 2024
1 parent 83c7aee commit 6549765
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/hotspot/share/code/codeCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ GrowableArray<CodeHeap*>* CodeCache::_allocable_heaps = new(mtCode) GrowableArra

static void check_min_size(const char* codeheap, size_t size, size_t required_size) {
if (size < required_size) {
log_debug(codecache)("Code heap (%s) size " SIZE_FORMAT " below required minimal size " SIZE_FORMAT,
codeheap, size, required_size);
log_debug(codecache)("Code heap (%s) size " SIZE_FORMAT "K below required minimal size " SIZE_FORMAT "K",
codeheap, size/K, required_size/K);
err_msg title("Not enough space in %s to run VM", codeheap);
err_msg message(SIZE_FORMAT "K < " SIZE_FORMAT "K", size/K, required_size/K);
vm_exit_during_initialization(title, message);
Expand Down Expand Up @@ -252,16 +252,16 @@ void CodeCache::initialize_heaps() {

size_t total = non_nmethod.size + profiled.size + non_profiled.size;
if (total != cache_size && !cache_size_set) {
log_info(codecache)("ReservedCodeCache size %lld changed to total segments size NonNMethod %lld NonProfiled %lld Profiled %lld = %lld",
(long long) cache_size, (long long) non_nmethod.size, (long long) non_profiled.size,
(long long) profiled.size, (long long) total);
log_info(codecache)("ReservedCodeCache size " SIZE_FORMAT "K changed to total segments size NonNMethod "
SIZE_FORMAT "K NonProfiled " SIZE_FORMAT "K Profiled " SIZE_FORMAT "K = " SIZE_FORMAT "K",
cache_size/K, non_nmethod.size/K, non_profiled.size/K, profiled.size/K, total/K);
// Adjust ReservedCodeCacheSize as necessary because it was not set explicitly
cache_size = total;
}

log_debug(codecache)("Initializing code heaps ReservedCodeCache %lld NonNMethod %lld NonProfiled %lld Profiled %lld",
(long long) cache_size, (long long) non_nmethod.size,
(long long) non_profiled.size, (long long) profiled.size);
log_debug(codecache)("Initializing code heaps ReservedCodeCache " SIZE_FORMAT "K NonNMethod " SIZE_FORMAT "K"
" NonProfiled " SIZE_FORMAT "K Profiled " SIZE_FORMAT "K",
cache_size/K, non_nmethod.size/K, non_profiled.size/K, profiled.size/K);

// Validation
// Check minimal required sizes
Expand Down

0 comments on commit 6549765

Please sign in to comment.