Skip to content

Commit 8bfa540

Browse files
committed
8347731: Replace SIZE_FORMAT in zgc
Reviewed-by: stefank, tschatzl, jsikstro
1 parent cbe2f96 commit 8bfa540

19 files changed

+79
-79
lines changed

src/hotspot/share/gc/z/zAddress.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -106,7 +106,7 @@ void ZGlobalsPointers::initialize() {
106106
// Check max supported heap size
107107
if (MaxHeapSize > ZAddressOffsetMax) {
108108
vm_exit_during_initialization(
109-
err_msg("Java heap too large (max supported heap size is " SIZE_FORMAT "G)",
109+
err_msg("Java heap too large (max supported heap size is %zuG)",
110110
ZAddressOffsetMax / G));
111111
}
112112

src/hotspot/share/gc/z/zArguments.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -180,7 +180,7 @@ void ZArguments::initialize() {
180180
// Large page size must match granule size
181181
if (!FLAG_IS_DEFAULT(LargePageSizeInBytes) && LargePageSizeInBytes != ZGranuleSize) {
182182
vm_exit_during_initialization(err_msg("Incompatible -XX:LargePageSizeInBytes, only "
183-
SIZE_FORMAT "M large pages are supported by ZGC",
183+
"%zuM large pages are supported by ZGC",
184184
ZGranuleSize / M));
185185
}
186186

src/hotspot/share/gc/z/zCollectedHeap.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -363,12 +363,12 @@ void ZCollectedHeap::print_on_error(outputStream* st) const {
363363
st->print_cr("ZGC Globals:");
364364
st->print_cr(" Young Collection: %s/%u", ZGeneration::young()->phase_to_string(), ZGeneration::young()->seqnum());
365365
st->print_cr(" Old Collection: %s/%u", ZGeneration::old()->phase_to_string(), ZGeneration::old()->seqnum());
366-
st->print_cr(" Offset Max: " SIZE_FORMAT "%s (" PTR_FORMAT ")",
366+
st->print_cr(" Offset Max: %zu%s (" PTR_FORMAT ")",
367367
byte_size_in_exact_unit(ZAddressOffsetMax),
368368
exact_unit_for_byte_size(ZAddressOffsetMax),
369369
ZAddressOffsetMax);
370-
st->print_cr(" Page Size Small: " SIZE_FORMAT "M", ZPageSizeSmall / M);
371-
st->print_cr(" Page Size Medium: " SIZE_FORMAT "M", ZPageSizeMedium / M);
370+
st->print_cr(" Page Size Small: %zuM", ZPageSizeSmall / M);
371+
st->print_cr(" Page Size Medium: %zuM", ZPageSizeMedium / M);
372372
st->cr();
373373
st->print_cr("ZGC Metadata Bits:");
374374
st->print_cr(" LoadGood: " PTR_FORMAT, ZPointerLoadGoodMask);

src/hotspot/share/gc/z/zDirector.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -194,7 +194,7 @@ static ZDriverRequest rule_minor_allocation_rate_dynamic(const ZDirectorStats& s
194194
const double time_until_gc = time_until_oom - actual_gc_duration;
195195

196196
log_debug(gc, director)("Rule Minor: Allocation Rate (Dynamic GC Workers), "
197-
"MaxAllocRate: %.1fMB/s (+/-%.1f%%), Free: " SIZE_FORMAT "MB, GCCPUTime: %.3f, "
197+
"MaxAllocRate: %.1fMB/s (+/-%.1f%%), Free: %zuMB, GCCPUTime: %.3f, "
198198
"GCDuration: %.3fs, TimeUntilOOM: %.3fs, TimeUntilGC: %.3fs, GCWorkers: %u",
199199
alloc_rate / M,
200200
alloc_rate_sd_percent * 100,
@@ -288,7 +288,7 @@ static bool rule_minor_allocation_rate_static(const ZDirectorStats& stats) {
288288
// time and end up starting the GC too late in the next interval.
289289
const double time_until_gc = time_until_oom - gc_duration;
290290

291-
log_debug(gc, director)("Rule Minor: Allocation Rate (Static GC Workers), MaxAllocRate: %.1fMB/s, Free: " SIZE_FORMAT "MB, GCDuration: %.3fs, TimeUntilGC: %.3fs",
291+
log_debug(gc, director)("Rule Minor: Allocation Rate (Static GC Workers), MaxAllocRate: %.1fMB/s, Free: %zuMB, GCDuration: %.3fs, TimeUntilGC: %.3fs",
292292
max_alloc_rate / M, free / M, gc_duration, time_until_gc);
293293

294294
return time_until_gc <= 0;
@@ -386,7 +386,7 @@ static bool rule_minor_high_usage(const ZDirectorStats& stats) {
386386
const double free_percent = percent_of(free, soft_max_capacity);
387387

388388
auto print_function = [&](size_t free, double free_percent) {
389-
log_debug(gc, director)("Rule Minor: High Usage, Free: " SIZE_FORMAT "MB(%.1f%%)",
389+
log_debug(gc, director)("Rule Minor: High Usage, Free: %zuMB(%.1f%%)",
390390
free / M, free_percent);
391391
};
392392

@@ -430,7 +430,7 @@ static bool rule_major_warmup(const ZDirectorStats& stats) {
430430
const double used_threshold_percent = (stats._old_stats._cycle._nwarmup_cycles + 1) * 0.1;
431431
const size_t used_threshold = (size_t)(soft_max_capacity * used_threshold_percent);
432432

433-
log_debug(gc, director)("Rule Major: Warmup %.0f%%, Used: " SIZE_FORMAT "MB, UsedThreshold: " SIZE_FORMAT "MB",
433+
log_debug(gc, director)("Rule Major: Warmup %.0f%%, Used: %zuMB, UsedThreshold: %zuMB",
434434
used_threshold_percent * 100, used / M, used_threshold / M);
435435

436436
return used >= used_threshold;
@@ -593,7 +593,7 @@ static bool rule_major_proactive(const ZDirectorStats& stats) {
593593
const double time_since_last_gc_threshold = 5 * 60; // 5 minutes
594594
if (used < used_threshold && time_since_last_gc < time_since_last_gc_threshold) {
595595
// Don't even consider doing a proactive GC
596-
log_debug(gc, director)("Rule Major: Proactive, UsedUntilEnabled: " SIZE_FORMAT "MB, TimeUntilEnabled: %.3fs",
596+
log_debug(gc, director)("Rule Major: Proactive, UsedUntilEnabled: %zuMB, TimeUntilEnabled: %.3fs",
597597
(used_threshold - used) / M,
598598
time_since_last_gc_threshold - time_since_last_gc);
599599
return false;

src/hotspot/share/gc/z/zGeneration.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -361,7 +361,7 @@ void ZGeneration::log_phase_switch(Phase from, Phase to) {
361361
index += 1;
362362
}
363363

364-
assert(index < ARRAY_SIZE(str), "OOB: " SIZE_FORMAT " < " SIZE_FORMAT, index, ARRAY_SIZE(str));
364+
assert(index < ARRAY_SIZE(str), "OOB: %zu < %zu", index, ARRAY_SIZE(str));
365365

366366
Events::log_zgc_phase_switch("%-21s %4u", str[index], seqnum());
367367
}
@@ -796,8 +796,8 @@ uint ZGenerationYoung::compute_tenuring_threshold(ZRelocationSetSelectorStats st
796796
// if the GC is finding it hard to keep up with the allocation rate.
797797
const double tenuring_threshold_raw = young_life_decay_factor * young_log_residency;
798798

799-
log_trace(gc, reloc)("Young Allocated: " SIZE_FORMAT "M", young_allocated / M);
800-
log_trace(gc, reloc)("Young Garbage: " SIZE_FORMAT "M", young_garbage / M);
799+
log_trace(gc, reloc)("Young Allocated: %zuM", young_allocated / M);
800+
log_trace(gc, reloc)("Young Garbage: %zuM", young_garbage / M);
801801
log_debug(gc, reloc)("Allocated To Garbage: %.1f", allocated_garbage_ratio);
802802
log_trace(gc, reloc)("Young Log: %.1f", young_log);
803803
log_trace(gc, reloc)("Young Residency Reciprocal: %.1f", young_residency_reciprocal);

src/hotspot/share/gc/z/zHeap.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@ ZHeap::ZHeap()
7575

7676
// Prime cache
7777
if (!_page_allocator.prime_cache(_old.workers(), InitialHeapSize)) {
78-
ZInitialize::error("Failed to allocate initial Java heap (" SIZE_FORMAT "M)", InitialHeapSize / M);
78+
ZInitialize::error("Failed to allocate initial Java heap (%zuM)", InitialHeapSize / M);
7979
return;
8080
}
8181

@@ -238,7 +238,7 @@ void ZHeap::undo_alloc_page(ZPage* page) {
238238
assert(page->is_allocating(), "Invalid page state");
239239

240240
ZStatInc(ZCounterUndoPageAllocation);
241-
log_trace(gc)("Undo page allocation, thread: " PTR_FORMAT " (%s), page: " PTR_FORMAT ", size: " SIZE_FORMAT,
241+
log_trace(gc)("Undo page allocation, thread: " PTR_FORMAT " (%s), page: " PTR_FORMAT ", size: %zu",
242242
p2i(Thread::current()), ZUtils::thread_name(), p2i(page), page->size());
243243

244244
free_page(page, false /* allow_defragment */);
@@ -320,7 +320,7 @@ ZServiceabilityCounters* ZHeap::serviceability_counters() {
320320
}
321321

322322
void ZHeap::print_on(outputStream* st) const {
323-
st->print_cr(" ZHeap used " SIZE_FORMAT "M, capacity " SIZE_FORMAT "M, max capacity " SIZE_FORMAT "M",
323+
st->print_cr(" ZHeap used %zuM, capacity %zuM, max capacity %zuM",
324324
used() / M,
325325
capacity() / M,
326326
max_capacity() / M);

src/hotspot/share/gc/z/zIndexDistributor.inline.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -274,7 +274,7 @@ class ZIndexDistributorClaimTree : public CHeapObj<mtGC> {
274274
assert((levels_size(ClaimLevels - 1) << _last_level_segment_size_shift) == count, "Incorrectly setup");
275275

276276
#if 0
277-
tty->print_cr("ZIndexDistributorClaimTree count: %d byte size: " SIZE_FORMAT, count, claim_variables_size() + os::vm_page_size());
277+
tty->print_cr("ZIndexDistributorClaimTree count: %d byte size: %zu", count, claim_variables_size() + os::vm_page_size());
278278
#endif
279279

280280
memset(_malloced, 0, claim_variables_size() + os::vm_page_size());

src/hotspot/share/gc/z/zLiveMap.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -103,7 +103,7 @@ void ZLiveMap::reset_segment(BitMap::idx_t segment) {
103103
ZStatInc(ZCounterMarkSegmentResetContention);
104104
contention = true;
105105

106-
log_trace(gc)("Mark segment reset contention, thread: " PTR_FORMAT " (%s), map: " PTR_FORMAT ", segment: " SIZE_FORMAT,
106+
log_trace(gc)("Mark segment reset contention, thread: " PTR_FORMAT " (%s), map: " PTR_FORMAT ", segment: %zu",
107107
p2i(Thread::current()), ZUtils::thread_name(), p2i(this), segment);
108108
}
109109
}

src/hotspot/share/gc/z/zMark.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -135,7 +135,7 @@ void ZMark::start() {
135135
for (uint worker_id = 0; worker_id < _nworkers; worker_id++) {
136136
const ZMarkStripe* const stripe = _stripes.stripe_for_worker(_nworkers, worker_id);
137137
const size_t stripe_id = _stripes.stripe_id(stripe);
138-
log.print(" Worker %u(%u) -> Stripe " SIZE_FORMAT "(" SIZE_FORMAT ")",
138+
log.print(" Worker %u(%u) -> Stripe %zu(%zu)",
139139
worker_id, _nworkers, stripe_id, nstripes);
140140
}
141141
}
@@ -194,7 +194,7 @@ void ZMark::push_partial_array(zpointer* addr, size_t length, bool finalizable)
194194
const uintptr_t offset = encode_partial_array_offset(addr);
195195
const ZMarkStackEntry entry(offset, length, finalizable);
196196

197-
log_develop_trace(gc, marking)("Array push partial: " PTR_FORMAT " (" SIZE_FORMAT "), stripe: " SIZE_FORMAT,
197+
log_develop_trace(gc, marking)("Array push partial: " PTR_FORMAT " (%zu), stripe: %zu",
198198
p2i(addr), length, _stripes.stripe_id(stripe));
199199

200200
stacks->push(&_allocator, &_stripes, stripe, &_terminate, entry, false /* publish */);
@@ -213,7 +213,7 @@ static void mark_barrier_on_oop_array(volatile zpointer* p, size_t length, bool
213213
void ZMark::follow_array_elements_small(zpointer* addr, size_t length, bool finalizable) {
214214
assert(length <= ZMarkPartialArrayMinLength, "Too large, should be split");
215215

216-
log_develop_trace(gc, marking)("Array follow small: " PTR_FORMAT " (" SIZE_FORMAT ")", p2i(addr), length);
216+
log_develop_trace(gc, marking)("Array follow small: " PTR_FORMAT " (%zu)", p2i(addr), length);
217217

218218
mark_barrier_on_oop_array(addr, length, finalizable, _generation->is_young());
219219
}
@@ -232,8 +232,8 @@ void ZMark::follow_array_elements_large(zpointer* addr, size_t length, bool fina
232232
const size_t middle_length = align_down(end - middle_start, ZMarkPartialArrayMinLength);
233233
zpointer* const middle_end = middle_start + middle_length;
234234

235-
log_develop_trace(gc, marking)("Array follow large: " PTR_FORMAT "-" PTR_FORMAT" (" SIZE_FORMAT "), "
236-
"middle: " PTR_FORMAT "-" PTR_FORMAT " (" SIZE_FORMAT ")",
235+
log_develop_trace(gc, marking)("Array follow large: " PTR_FORMAT "-" PTR_FORMAT" (%zu), "
236+
"middle: " PTR_FORMAT "-" PTR_FORMAT " (%zu)",
237237
p2i(start), p2i(end), length, p2i(middle_start), p2i(middle_end), middle_length);
238238

239239
// Push unaligned trailing part

src/hotspot/share/gc/z/zMarkStack.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@ void ZMarkStripeSet::set_nstripes(size_t nstripes) {
5454
// if they see the old or new values.
5555
Atomic::store(&_nstripes_mask, nstripes - 1);
5656

57-
log_debug(gc, marking)("Using " SIZE_FORMAT " mark stripes", nstripes);
57+
log_debug(gc, marking)("Using %zu mark stripes", nstripes);
5858
}
5959

6060
size_t ZMarkStripeSet::nstripes() const {

src/hotspot/share/gc/z/zMarkStackAllocator.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -79,11 +79,11 @@ size_t ZMarkStackSpace::expand_space() {
7979
// Expansion limit reached. This is a fatal error since we
8080
// currently can't recover from running out of mark stack space.
8181
fatal("Mark stack space exhausted. Use -XX:ZMarkStackSpaceLimit=<size> to increase the "
82-
"maximum number of bytes allocated for mark stacks. Current limit is " SIZE_FORMAT "M.",
82+
"maximum number of bytes allocated for mark stacks. Current limit is %zuM.",
8383
ZMarkStackSpaceLimit / M);
8484
}
8585

86-
log_debug(gc, marking)("Expanding mark stack space: " SIZE_FORMAT "M->" SIZE_FORMAT "M",
86+
log_debug(gc, marking)("Expanding mark stack space: %zuM->%zuM",
8787
old_size / M, new_size / M);
8888

8989
// Expand
@@ -100,7 +100,7 @@ size_t ZMarkStackSpace::shrink_space() {
100100

101101
if (shrink_size > 0) {
102102
// Shrink
103-
log_debug(gc, marking)("Shrinking mark stack space: " SIZE_FORMAT "M->" SIZE_FORMAT "M",
103+
log_debug(gc, marking)("Shrinking mark stack space: %zuM->%zuM",
104104
old_size / M, new_size / M);
105105

106106
const uintptr_t shrink_start = _end - shrink_size;

src/hotspot/share/gc/z/zNMethodTable.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -110,9 +110,9 @@ void ZNMethodTable::rebuild(size_t new_size) {
110110
assert(is_power_of_2(new_size), "Invalid size");
111111

112112
log_debug(gc, nmethod)("Rebuilding NMethod Table: "
113-
SIZE_FORMAT "->" SIZE_FORMAT " entries, "
114-
SIZE_FORMAT "(%.0f%%->%.0f%%) registered, "
115-
SIZE_FORMAT "(%.0f%%->%.0f%%) unregistered",
113+
"%zu->%zu entries, "
114+
"%zu(%.0f%%->%.0f%%) registered, "
115+
"%zu(%.0f%%->%.0f%%) unregistered",
116116
_size, new_size,
117117
_nregistered, percent_of(_nregistered, _size), percent_of(_nregistered, new_size),
118118
_nunregistered, percent_of(_nunregistered, _size), 0.0);

src/hotspot/share/gc/z/zPageAllocator.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -207,12 +207,12 @@ ZPageAllocator::ZPageAllocator(size_t min_capacity,
207207
return;
208208
}
209209

210-
log_info_p(gc, init)("Min Capacity: " SIZE_FORMAT "M", min_capacity / M);
211-
log_info_p(gc, init)("Initial Capacity: " SIZE_FORMAT "M", initial_capacity / M);
212-
log_info_p(gc, init)("Max Capacity: " SIZE_FORMAT "M", max_capacity / M);
213-
log_info_p(gc, init)("Soft Max Capacity: " SIZE_FORMAT "M", soft_max_capacity / M);
210+
log_info_p(gc, init)("Min Capacity: %zuM", min_capacity / M);
211+
log_info_p(gc, init)("Initial Capacity: %zuM", initial_capacity / M);
212+
log_info_p(gc, init)("Max Capacity: %zuM", max_capacity / M);
213+
log_info_p(gc, init)("Soft Max Capacity: %zuM", soft_max_capacity / M);
214214
if (ZPageSizeMedium > 0) {
215-
log_info_p(gc, init)("Medium Page Size: " SIZE_FORMAT "M", ZPageSizeMedium / M);
215+
log_info_p(gc, init)("Medium Page Size: %zuM", ZPageSizeMedium / M);
216216
} else {
217217
log_info_p(gc, init)("Medium Page Size: N/A");
218218
}
@@ -377,7 +377,7 @@ void ZPageAllocator::decrease_capacity(size_t size, bool set_max_capacity) {
377377
if (set_max_capacity) {
378378
// Adjust current max capacity to avoid further attempts to increase capacity
379379
log_error_p(gc)("Forced to lower max Java heap size from "
380-
SIZE_FORMAT "M(%.0f%%) to " SIZE_FORMAT "M(%.0f%%)",
380+
"%zuM(%.0f%%) to %zuM(%.0f%%)",
381381
_current_max_capacity / M, percent_of(_current_max_capacity, _max_capacity),
382382
_capacity / M, percent_of(_capacity, _max_capacity));
383383

@@ -650,7 +650,7 @@ ZPage* ZPageAllocator::alloc_page_create(ZPageAllocation* allocation) {
650650

651651
// Update statistics
652652
ZStatInc(ZCounterPageCacheFlush, flushed);
653-
log_debug(gc, heap)("Page Cache Flushed: " SIZE_FORMAT "M", flushed / M);
653+
log_debug(gc, heap)("Page Cache Flushed: %zuM", flushed / M);
654654
}
655655

656656
// Allocate any remaining physical memory. Capacity and used has

0 commit comments

Comments
 (0)