8076073: shared: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files

Reviewed-by: stefank, brutisso
This commit is contained in:
David Lindholm 2015-03-27 15:29:19 +01:00
parent 28d7b8200d
commit 4e7e0848a7
16 changed files with 93 additions and 121 deletions

View File

@ -32,8 +32,6 @@
#include "oops/objArrayKlass.inline.hpp" #include "oops/objArrayKlass.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
uint MarkSweep::_total_invocations = 0; uint MarkSweep::_total_invocations = 0;
Stack<oop, mtGC> MarkSweep::_marking_stack; Stack<oop, mtGC> MarkSweep::_marking_stack;

View File

@ -31,8 +31,6 @@
#include "runtime/atomic.inline.hpp" #include "runtime/atomic.inline.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) { MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) {
_lgrp_spaces = new (ResourceObj::C_HEAP, mtGC) GrowableArray<LGRPSpace*>(0, true); _lgrp_spaces = new (ResourceObj::C_HEAP, mtGC) GrowableArray<LGRPSpace*>(0, true);
_page_size = os::vm_page_size(); _page_size = os::vm_page_size();
@ -973,7 +971,7 @@ void MutableNUMASpace::LGRPSpace::scan_pages(size_t page_size, size_t page_count
break; break;
} }
if (e != scan_end) { if (e != scan_end) {
assert(e < scan_end, err_msg("e: " PTR_FORMAT " scan_end: " PTR_FORMAT, e, scan_end)); assert(e < scan_end, err_msg("e: " PTR_FORMAT " scan_end: " PTR_FORMAT, p2i(e), p2i(scan_end)));
if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id()) if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id())
&& page_expected.size != 0) { && page_expected.size != 0) {

View File

@ -33,8 +33,6 @@
#include "runtime/thread.hpp" #include "runtime/thread.hpp"
#endif // INCLUDE_ALL_GCS #endif // INCLUDE_ALL_GCS
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
MutableSpace::MutableSpace(size_t alignment): ImmutableSpace(), _top(NULL), _alignment(alignment) { MutableSpace::MutableSpace(size_t alignment): ImmutableSpace(), _top(NULL), _alignment(alignment) {
assert(MutableSpace::alignment() % os::vm_page_size() == 0, assert(MutableSpace::alignment() % os::vm_page_size() == 0,
"Space should be aligned"); "Space should be aligned");
@ -253,7 +251,7 @@ void MutableSpace::print() const { print_on(tty); }
void MutableSpace::print_on(outputStream* st) const { void MutableSpace::print_on(outputStream* st) const {
MutableSpace::print_short_on(st); MutableSpace::print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT "," INTPTR_FORMAT "," INTPTR_FORMAT ")", st->print_cr(" [" INTPTR_FORMAT "," INTPTR_FORMAT "," INTPTR_FORMAT ")",
bottom(), top(), end()); p2i(bottom()), p2i(top()), p2i(end()));
} }
void MutableSpace::verify() { void MutableSpace::verify() {

View File

@ -27,8 +27,6 @@
#include "memory/space.inline.hpp" #include "memory/space.inline.hpp"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
// Catch-all file for utility classes // Catch-all file for utility classes
#ifndef PRODUCT #ifndef PRODUCT
@ -86,7 +84,7 @@ void SpaceMangler::mangle_region(MemRegion mr) {
assert(ZapUnusedHeapArea, "Mangling should not be in use"); assert(ZapUnusedHeapArea, "Mangling should not be in use");
#ifdef ASSERT #ifdef ASSERT
if(TraceZapUnusedHeapArea) { if(TraceZapUnusedHeapArea) {
gclog_or_tty->print("Mangling [" PTR_FORMAT " to " PTR_FORMAT ")", mr.start(), mr.end()); gclog_or_tty->print("Mangling [" PTR_FORMAT " to " PTR_FORMAT ")", p2i(mr.start()), p2i(mr.end()));
} }
Copy::fill_to_words(mr.start(), mr.word_size(), badHeapWord); Copy::fill_to_words(mr.start(), mr.word_size(), badHeapWord);
if(TraceZapUnusedHeapArea) { if(TraceZapUnusedHeapArea) {

View File

@ -49,8 +49,6 @@
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"
#include "utilities/stack.inline.hpp" #include "utilities/stack.inline.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
// //
// DefNewGeneration functions. // DefNewGeneration functions.
@ -137,7 +135,7 @@ void KlassScanClosure::do_klass(Klass* klass) {
if (TraceScavenge) { if (TraceScavenge) {
ResourceMark rm; ResourceMark rm;
gclog_or_tty->print_cr("KlassScanClosure::do_klass " PTR_FORMAT ", %s, dirty: %s", gclog_or_tty->print_cr("KlassScanClosure::do_klass " PTR_FORMAT ", %s, dirty: %s",
klass, p2i(klass),
klass->external_name(), klass->external_name(),
klass->has_modified_oops() ? "true" : "false"); klass->has_modified_oops() ? "true" : "false");
} }

View File

@ -1337,7 +1337,7 @@ jlong GenCollectedHeap::millis_since_last_gc() {
// back a time later than 'now'. // back a time later than 'now'.
jlong retVal = now - tolgc_cl.time(); jlong retVal = now - tolgc_cl.time();
if (retVal < 0) { if (retVal < 0) {
NOT_PRODUCT(warning("time warp: "INT64_FORMAT, (int64_t) retVal);) NOT_PRODUCT(warning("time warp: " JLONG_FORMAT, retVal);)
return 0; return 0;
} }
return retVal; return retVal;

View File

@ -42,8 +42,6 @@
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
Generation::Generation(ReservedSpace rs, size_t initial_size, int level) : Generation::Generation(ReservedSpace rs, size_t initial_size, int level) :
_level(level), _level(level),
_ref_processor(NULL) { _ref_processor(NULL) {
@ -103,9 +101,9 @@ void Generation::print_on(outputStream* st) const {
st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
capacity()/K, used()/K); capacity()/K, used()/K);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
_virtual_space.low_boundary(), p2i(_virtual_space.low_boundary()),
_virtual_space.high(), p2i(_virtual_space.high()),
_virtual_space.high_boundary()); p2i(_virtual_space.high_boundary()));
} }
void Generation::print_summary_info() { print_summary_info_on(tty); } void Generation::print_summary_info() { print_summary_info_on(tty); }

View File

@ -399,7 +399,7 @@ class Generation: public CHeapObj<mtGC> {
// have to guard against non-monotonicity. // have to guard against non-monotonicity.
NOT_PRODUCT( NOT_PRODUCT(
if (now < _time_of_last_gc) { if (now < _time_of_last_gc) {
warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, (int64_t)_time_of_last_gc, (int64_t)now); warning("time warp: " JLONG_FORMAT " to " JLONG_FORMAT, _time_of_last_gc, now);
} }
) )
return _time_of_last_gc; return _time_of_last_gc;

View File

@ -38,8 +38,6 @@
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#endif // INCLUDE_ALL_GCS #endif // INCLUDE_ALL_GCS
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
// HeapInspection // HeapInspection
inline KlassInfoEntry::~KlassInfoEntry() { inline KlassInfoEntry::~KlassInfoEntry() {
@ -100,8 +98,8 @@ void KlassInfoEntry::print_on(outputStream* st) const {
// simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit // simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s", st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s",
(jlong) _instance_count, (int64_t)_instance_count,
(julong) _instance_words * HeapWordSize, (uint64_t)_instance_words * HeapWordSize,
name()); name());
} }
@ -240,8 +238,8 @@ void KlassInfoHisto::sort() {
void KlassInfoHisto::print_elements(outputStream* st) const { void KlassInfoHisto::print_elements(outputStream* st) const {
// simplify the formatting (ILP32 vs LP64) - store the sum in 64-bit // simplify the formatting (ILP32 vs LP64) - store the sum in 64-bit
jlong total = 0; int64_t total = 0;
julong totalw = 0; uint64_t totalw = 0;
for(int i=0; i < elements()->length(); i++) { for(int i=0; i < elements()->length(); i++) {
st->print("%4d: ", i+1); st->print("%4d: ", i+1);
elements()->at(i)->print_on(st); elements()->at(i)->print_on(st);
@ -451,7 +449,7 @@ static void print_classname(outputStream* st, Klass* klass) {
if (loader_oop == NULL) { if (loader_oop == NULL) {
st->print("null"); st->print("null");
} else { } else {
st->print(INTPTR_FORMAT, klass->class_loader_data()); st->print(INTPTR_FORMAT, p2i(klass->class_loader_data()));
} }
} }
@ -557,13 +555,13 @@ void KlassInfoHisto::print_class_stats(outputStream* st,
} }
if (csv_format) { if (csv_format) {
st->print("%d,%d", e->index(), super_index); st->print("%ld,%d", e->index(), super_index);
for (int c=0; c<KlassSizeStats::_num_columns; c++) { for (int c=0; c<KlassSizeStats::_num_columns; c++) {
if (selected[c]) {st->print("," JULONG_FORMAT, col_table[c]);} if (selected[c]) {st->print("," JULONG_FORMAT, col_table[c]);}
} }
st->print(",%s",e->name()); st->print(",%s",e->name());
} else { } else {
st->print("%5d %5d", e->index(), super_index); st->print("%5ld %5d", e->index(), super_index);
for (int c=0; c<KlassSizeStats::_num_columns; c++) { for (int c=0; c<KlassSizeStats::_num_columns; c++) {
if (selected[c]) {print_julong(st, width_table[c], col_table[c]);} if (selected[c]) {print_julong(st, width_table[c], col_table[c]);}
} }

View File

@ -28,8 +28,6 @@
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
class VirtualSpaceNode; class VirtualSpaceNode;
const size_t metadata_chunk_initialize = 0xf7f7f7f7; const size_t metadata_chunk_initialize = 0xf7f7f7f7;
@ -92,7 +90,7 @@ void Metachunk::print_on(outputStream* st) const {
st->print_cr("Metachunk:" st->print_cr("Metachunk:"
" bottom " PTR_FORMAT " top " PTR_FORMAT " bottom " PTR_FORMAT " top " PTR_FORMAT
" end " PTR_FORMAT " size " SIZE_FORMAT, " end " PTR_FORMAT " size " SIZE_FORMAT,
bottom(), _top, end(), word_size()); p2i(bottom()), p2i(_top), p2i(end()), word_size());
if (Verbose) { if (Verbose) {
st->print_cr(" used " SIZE_FORMAT " free " SIZE_FORMAT, st->print_cr(" used " SIZE_FORMAT " free " SIZE_FORMAT,
used_word_size(), free_word_size()); used_word_size(), free_word_size());

View File

@ -49,8 +49,6 @@
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > BlockTreeDictionary; typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > BlockTreeDictionary;
typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary; typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary;
@ -388,7 +386,7 @@ class VirtualSpaceNode : public CHeapObj<mtClass> {
#define assert_is_ptr_aligned(ptr, alignment) \ #define assert_is_ptr_aligned(ptr, alignment) \
assert(is_ptr_aligned(ptr, alignment), \ assert(is_ptr_aligned(ptr, alignment), \
err_msg(PTR_FORMAT " is not aligned to " \ err_msg(PTR_FORMAT " is not aligned to " \
SIZE_FORMAT, ptr, alignment)) SIZE_FORMAT, p2i(ptr), alignment))
#define assert_is_size_aligned(size, alignment) \ #define assert_is_size_aligned(size, alignment) \
assert(is_size_aligned(size, alignment), \ assert(is_size_aligned(size, alignment), \
@ -800,7 +798,7 @@ void VirtualSpaceNode::inc_container_count() {
_container_count++; _container_count++;
assert(_container_count == container_count_slow(), assert(_container_count == container_count_slow(),
err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT
" container_count_slow() " SIZE_FORMAT, " container_count_slow() %u",
_container_count, container_count_slow())); _container_count, container_count_slow()));
} }
@ -813,7 +811,7 @@ void VirtualSpaceNode::dec_container_count() {
void VirtualSpaceNode::verify_container_count() { void VirtualSpaceNode::verify_container_count() {
assert(_container_count == container_count_slow(), assert(_container_count == container_count_slow(),
err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT
" container_count_slow() " SIZE_FORMAT, _container_count, container_count_slow())); " container_count_slow() %u", _container_count, container_count_slow()));
} }
#endif #endif
@ -916,7 +914,7 @@ Metachunk* VirtualSpaceNode::take_from_committed(size_t chunk_word_size) {
if (!is_available(chunk_word_size)) { if (!is_available(chunk_word_size)) {
if (TraceMetadataChunkAllocation) { if (TraceMetadataChunkAllocation) {
gclog_or_tty->print("VirtualSpaceNode::take_from_committed() not available %d words ", chunk_word_size); gclog_or_tty->print("VirtualSpaceNode::take_from_committed() not available " SIZE_FORMAT " words ", chunk_word_size);
// Dump some information about the virtual space that is nearly full // Dump some information about the virtual space that is nearly full
print_on(gclog_or_tty); print_on(gclog_or_tty);
} }
@ -989,7 +987,7 @@ bool VirtualSpaceNode::initialize() {
assert(reserved()->start() == (HeapWord*) _rs.base(), assert(reserved()->start() == (HeapWord*) _rs.base(),
err_msg("Reserved start was not set properly " PTR_FORMAT err_msg("Reserved start was not set properly " PTR_FORMAT
" != " PTR_FORMAT, reserved()->start(), _rs.base())); " != " PTR_FORMAT, p2i(reserved()->start()), p2i(_rs.base())));
assert(reserved()->word_size() == _rs.size() / BytesPerWord, assert(reserved()->word_size() == _rs.size() / BytesPerWord,
err_msg("Reserved size was not set properly " SIZE_FORMAT err_msg("Reserved size was not set properly " SIZE_FORMAT
" != " SIZE_FORMAT, reserved()->word_size(), " != " SIZE_FORMAT, reserved()->word_size(),
@ -1003,13 +1001,13 @@ void VirtualSpaceNode::print_on(outputStream* st) const {
size_t used = used_words_in_vs(); size_t used = used_words_in_vs();
size_t capacity = capacity_words_in_vs(); size_t capacity = capacity_words_in_vs();
VirtualSpace* vs = virtual_space(); VirtualSpace* vs = virtual_space();
st->print_cr(" space @ " PTR_FORMAT " " SIZE_FORMAT "K, %3d%% used " st->print_cr(" space @ " PTR_FORMAT " " SIZE_FORMAT "K, " SIZE_FORMAT_W(3) "%% used "
"[" PTR_FORMAT ", " PTR_FORMAT ", " "[" PTR_FORMAT ", " PTR_FORMAT ", "
PTR_FORMAT ", " PTR_FORMAT ")", PTR_FORMAT ", " PTR_FORMAT ")",
vs, capacity / K, p2i(vs), capacity / K,
capacity == 0 ? 0 : used * 100 / capacity, capacity == 0 ? 0 : used * 100 / capacity,
bottom(), top(), end(), p2i(bottom()), p2i(top()), p2i(end()),
vs->high_boundary()); p2i(vs->high_boundary()));
} }
#ifdef ASSERT #ifdef ASSERT
@ -1812,7 +1810,7 @@ Metachunk* ChunkManager::free_chunks_get(size_t word_size) {
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print_cr("ChunkManager::free_chunks_get: free_list " gclog_or_tty->print_cr("ChunkManager::free_chunks_get: free_list "
PTR_FORMAT " head " PTR_FORMAT " size " SIZE_FORMAT, PTR_FORMAT " head " PTR_FORMAT " size " SIZE_FORMAT,
free_list, chunk, chunk->word_size()); p2i(free_list), p2i(chunk), chunk->word_size());
} }
} else { } else {
chunk = humongous_dictionary()->get_chunk( chunk = humongous_dictionary()->get_chunk(
@ -1872,7 +1870,7 @@ Metachunk* ChunkManager::chunk_freelist_allocate(size_t word_size) {
} }
gclog_or_tty->print("ChunkManager::chunk_freelist_allocate: " PTR_FORMAT " chunk " gclog_or_tty->print("ChunkManager::chunk_freelist_allocate: " PTR_FORMAT " chunk "
PTR_FORMAT " size " SIZE_FORMAT " count " SIZE_FORMAT " ", PTR_FORMAT " size " SIZE_FORMAT " count " SIZE_FORMAT " ",
this, chunk, chunk->word_size(), list_count); p2i(this), p2i(chunk), chunk->word_size(), list_count);
locked_print_free_chunks(gclog_or_tty); locked_print_free_chunks(gclog_or_tty);
} }
@ -2019,7 +2017,7 @@ void SpaceManager::locked_print_chunks_in_use_on(outputStream* st) const {
for (ChunkIndex i = ZeroIndex; i < NumberOfInUseLists; i = next_chunk_index(i)) { for (ChunkIndex i = ZeroIndex; i < NumberOfInUseLists; i = next_chunk_index(i)) {
Metachunk* chunk = chunks_in_use(i); Metachunk* chunk = chunks_in_use(i);
st->print("SpaceManager: %s " PTR_FORMAT, st->print("SpaceManager: %s " PTR_FORMAT,
chunk_size_name(i), chunk); chunk_size_name(i), p2i(chunk));
if (chunk != NULL) { if (chunk != NULL) {
st->print_cr(" free " SIZE_FORMAT, st->print_cr(" free " SIZE_FORMAT,
chunk->free_word_size()); chunk->free_word_size());
@ -2130,8 +2128,8 @@ void SpaceManager::print_on(outputStream* st) const {
for (ChunkIndex i = ZeroIndex; for (ChunkIndex i = ZeroIndex;
i < NumberOfInUseLists ; i < NumberOfInUseLists ;
i = next_chunk_index(i) ) { i = next_chunk_index(i) ) {
st->print_cr(" chunks_in_use " PTR_FORMAT " chunk size " PTR_FORMAT, st->print_cr(" chunks_in_use " PTR_FORMAT " chunk size " SIZE_FORMAT,
chunks_in_use(i), p2i(chunks_in_use(i)),
chunks_in_use(i) == NULL ? 0 : chunks_in_use(i)->word_size()); chunks_in_use(i) == NULL ? 0 : chunks_in_use(i)->word_size());
} }
st->print_cr(" waste: Small " SIZE_FORMAT " Medium " SIZE_FORMAT st->print_cr(" waste: Small " SIZE_FORMAT " Medium " SIZE_FORMAT
@ -2194,7 +2192,7 @@ void SpaceManager::initialize() {
} }
_current_chunk = NULL; _current_chunk = NULL;
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print_cr("SpaceManager(): " PTR_FORMAT, this); gclog_or_tty->print_cr("SpaceManager(): " PTR_FORMAT, p2i(this));
} }
} }
@ -2238,7 +2236,7 @@ SpaceManager::~SpaceManager() {
dec_total_from_size_metrics(); dec_total_from_size_metrics();
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print_cr("~SpaceManager(): " PTR_FORMAT, this); gclog_or_tty->print_cr("~SpaceManager(): " PTR_FORMAT, p2i(this));
locked_print_chunks_in_use_on(gclog_or_tty); locked_print_chunks_in_use_on(gclog_or_tty);
} }
@ -2258,7 +2256,7 @@ SpaceManager::~SpaceManager() {
for (ChunkIndex i = ZeroIndex; i < HumongousIndex; i = next_chunk_index(i)) { for (ChunkIndex i = ZeroIndex; i < HumongousIndex; i = next_chunk_index(i)) {
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print_cr("returned %d %s chunks to freelist", gclog_or_tty->print_cr("returned " SIZE_FORMAT " %s chunks to freelist",
sum_count_in_chunks_in_use(i), sum_count_in_chunks_in_use(i),
chunk_size_name(i)); chunk_size_name(i));
} }
@ -2266,7 +2264,7 @@ SpaceManager::~SpaceManager() {
chunk_manager()->return_chunks(i, chunks); chunk_manager()->return_chunks(i, chunks);
set_chunks_in_use(i, NULL); set_chunks_in_use(i, NULL);
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print_cr("updated freelist count %d %s", gclog_or_tty->print_cr("updated freelist count " SSIZE_FORMAT " %s",
chunk_manager()->free_chunks(i)->count(), chunk_manager()->free_chunks(i)->count(),
chunk_size_name(i)); chunk_size_name(i));
} }
@ -2279,7 +2277,7 @@ SpaceManager::~SpaceManager() {
// Humongous chunks // Humongous chunks
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print_cr("returned %d %s humongous chunks to dictionary", gclog_or_tty->print_cr("returned " SIZE_FORMAT " %s humongous chunks to dictionary",
sum_count_in_chunks_in_use(HumongousIndex), sum_count_in_chunks_in_use(HumongousIndex),
chunk_size_name(HumongousIndex)); chunk_size_name(HumongousIndex));
gclog_or_tty->print("Humongous chunk dictionary: "); gclog_or_tty->print("Humongous chunk dictionary: ");
@ -2293,14 +2291,14 @@ SpaceManager::~SpaceManager() {
#endif #endif
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print(PTR_FORMAT " (" SIZE_FORMAT ") ", gclog_or_tty->print(PTR_FORMAT " (" SIZE_FORMAT ") ",
humongous_chunks, p2i(humongous_chunks),
humongous_chunks->word_size()); humongous_chunks->word_size());
} }
assert(humongous_chunks->word_size() == (size_t) assert(humongous_chunks->word_size() == (size_t)
align_size_up(humongous_chunks->word_size(), align_size_up(humongous_chunks->word_size(),
smallest_chunk_size()), smallest_chunk_size()),
err_msg("Humongous chunk size is wrong: word size " SIZE_FORMAT err_msg("Humongous chunk size is wrong: word size " SIZE_FORMAT
" granularity %d", " granularity " SIZE_FORMAT,
humongous_chunks->word_size(), smallest_chunk_size())); humongous_chunks->word_size(), smallest_chunk_size()));
Metachunk* next_humongous_chunks = humongous_chunks->next(); Metachunk* next_humongous_chunks = humongous_chunks->next();
humongous_chunks->container()->dec_container_count(); humongous_chunks->container()->dec_container_count();
@ -2309,7 +2307,7 @@ SpaceManager::~SpaceManager() {
} }
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->cr(); gclog_or_tty->cr();
gclog_or_tty->print_cr("updated dictionary count %d %s", gclog_or_tty->print_cr("updated dictionary count " SIZE_FORMAT " %s",
chunk_manager()->humongous_dictionary()->total_count(), chunk_manager()->humongous_dictionary()->total_count(),
chunk_size_name(HumongousIndex)); chunk_size_name(HumongousIndex));
} }
@ -2399,7 +2397,7 @@ void SpaceManager::add_chunk(Metachunk* new_chunk, bool make_current) {
assert(new_chunk->is_empty(), "Not ready for reuse"); assert(new_chunk->is_empty(), "Not ready for reuse");
if (TraceMetadataChunkAllocation && Verbose) { if (TraceMetadataChunkAllocation && Verbose) {
gclog_or_tty->print("SpaceManager::add_chunk: %d) ", gclog_or_tty->print("SpaceManager::add_chunk: " SIZE_FORMAT ") ",
sum_count_in_chunks_in_use()); sum_count_in_chunks_in_use());
new_chunk->print_on(gclog_or_tty); new_chunk->print_on(gclog_or_tty);
chunk_manager()->locked_print_free_chunks(gclog_or_tty); chunk_manager()->locked_print_free_chunks(gclog_or_tty);
@ -3097,7 +3095,7 @@ void Metaspace::allocate_metaspace_compressed_klass_ptrs(char* requested_addr, a
metaspace_rs = ReservedSpace(compressed_class_space_size(), metaspace_rs = ReservedSpace(compressed_class_space_size(),
_reserve_alignment, large_pages); _reserve_alignment, large_pages);
if (!metaspace_rs.is_reserved()) { if (!metaspace_rs.is_reserved()) {
vm_exit_during_initialization(err_msg("Could not allocate metaspace: %d bytes", vm_exit_during_initialization(err_msg("Could not allocate metaspace: " SIZE_FORMAT " bytes",
compressed_class_space_size())); compressed_class_space_size()));
} }
} }
@ -3119,10 +3117,10 @@ void Metaspace::allocate_metaspace_compressed_klass_ptrs(char* requested_addr, a
initialize_class_space(metaspace_rs); initialize_class_space(metaspace_rs);
if (PrintCompressedOopsMode || (PrintMiscellaneous && Verbose)) { if (PrintCompressedOopsMode || (PrintMiscellaneous && Verbose)) {
gclog_or_tty->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: " SIZE_FORMAT, gclog_or_tty->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: %d",
Universe::narrow_klass_base(), Universe::narrow_klass_shift()); p2i(Universe::narrow_klass_base()), Universe::narrow_klass_shift());
gclog_or_tty->print_cr("Compressed class space size: " SIZE_FORMAT " Address: " PTR_FORMAT " Req Addr: " PTR_FORMAT, gclog_or_tty->print_cr("Compressed class space size: " SIZE_FORMAT " Address: " PTR_FORMAT " Req Addr: " PTR_FORMAT,
compressed_class_space_size(), metaspace_rs.base(), requested_addr); compressed_class_space_size(), p2i(metaspace_rs.base()), p2i(requested_addr));
} }
} }
@ -3251,7 +3249,7 @@ void Metaspace::global_initialize() {
vm_exit_during_initialization("Unable to dump shared archive.", vm_exit_during_initialization("Unable to dump shared archive.",
err_msg("Size of archive (" SIZE_FORMAT ") + compressed class space (" err_msg("Size of archive (" SIZE_FORMAT ") + compressed class space ("
SIZE_FORMAT ") == total (" SIZE_FORMAT ") is larger than compressed " SIZE_FORMAT ") == total (" SIZE_FORMAT ") is larger than compressed "
"klass limit: " SIZE_FORMAT, cds_total, compressed_class_space_size(), "klass limit: " UINT64_FORMAT, cds_total, compressed_class_space_size(),
cds_total + compressed_class_space_size(), UnscaledClassSpaceMax)); cds_total + compressed_class_space_size(), UnscaledClassSpaceMax));
} }
@ -3262,7 +3260,7 @@ void Metaspace::global_initialize() {
Universe::set_narrow_klass_base((address)_space_list->current_virtual_space()->bottom()); Universe::set_narrow_klass_base((address)_space_list->current_virtual_space()->bottom());
if (TraceMetavirtualspaceAllocation && Verbose) { if (TraceMetavirtualspaceAllocation && Verbose) {
gclog_or_tty->print_cr("Setting_narrow_klass_base to Address: " PTR_FORMAT, gclog_or_tty->print_cr("Setting_narrow_klass_base to Address: " PTR_FORMAT,
_space_list->current_virtual_space()->bottom()); p2i(_space_list->current_virtual_space()->bottom()));
} }
Universe::set_narrow_klass_shift(0); Universe::set_narrow_klass_shift(0);
@ -3768,10 +3766,10 @@ void Metaspace::verify() {
} }
void Metaspace::dump(outputStream* const out) const { void Metaspace::dump(outputStream* const out) const {
out->print_cr("\nVirtual space manager: " INTPTR_FORMAT, vsm()); out->print_cr("\nVirtual space manager: " INTPTR_FORMAT, p2i(vsm()));
vsm()->dump(out); vsm()->dump(out);
if (using_class_space()) { if (using_class_space()) {
out->print_cr("\nClass space manager: " INTPTR_FORMAT, class_vsm()); out->print_cr("\nClass space manager: " INTPTR_FORMAT, p2i(class_vsm()));
class_vsm()->dump(out); class_vsm()->dump(out);
} }
} }
@ -3932,13 +3930,13 @@ class TestVirtualSpaceNodeTest {
assert(vsn.is_available(word_size), \ assert(vsn.is_available(word_size), \
err_msg(#word_size ": " PTR_FORMAT " bytes were not available in " \ err_msg(#word_size ": " PTR_FORMAT " bytes were not available in " \
"VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")", \ "VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")", \
(uintptr_t)(word_size * BytesPerWord), vsn.bottom(), vsn.end())); (uintptr_t)(word_size * BytesPerWord), p2i(vsn.bottom()), p2i(vsn.end())));
#define assert_is_available_negative(word_size) \ #define assert_is_available_negative(word_size) \
assert(!vsn.is_available(word_size), \ assert(!vsn.is_available(word_size), \
err_msg(#word_size ": " PTR_FORMAT " bytes should not be available in " \ err_msg(#word_size ": " PTR_FORMAT " bytes should not be available in " \
"VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")", \ "VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")", \
(uintptr_t)(word_size * BytesPerWord), vsn.bottom(), vsn.end())); (uintptr_t)(word_size * BytesPerWord), p2i(vsn.bottom()), p2i(vsn.end())));
static void test_is_available_positive() { static void test_is_available_positive() {
// Reserve some memory. // Reserve some memory.

View File

@ -35,8 +35,6 @@
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/jniHandles.hpp" #include "runtime/jniHandles.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL; ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL;
ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL; ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL;
bool ReferenceProcessor::_pending_list_uses_discovered_field = false; bool ReferenceProcessor::_pending_list_uses_discovered_field = false;
@ -161,7 +159,7 @@ void ReferenceProcessor::update_soft_ref_master_clock() {
NOT_PRODUCT( NOT_PRODUCT(
if (now < _soft_ref_timestamp_clock) { if (now < _soft_ref_timestamp_clock) {
warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, warning("time warp: " JLONG_FORMAT " to " JLONG_FORMAT,
_soft_ref_timestamp_clock, now); _soft_ref_timestamp_clock, now);
} }
) )
@ -361,7 +359,7 @@ void ReferenceProcessor::enqueue_discovered_reflist(DiscoveredList& refs_list,
// field. // field.
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr("ReferenceProcessor::enqueue_discovered_reflist list " gclog_or_tty->print_cr("ReferenceProcessor::enqueue_discovered_reflist list "
INTPTR_FORMAT, (address)refs_list.head()); INTPTR_FORMAT, p2i(refs_list.head()));
} }
oop obj = NULL; oop obj = NULL;
@ -375,7 +373,7 @@ void ReferenceProcessor::enqueue_discovered_reflist(DiscoveredList& refs_list,
next_d = java_lang_ref_Reference::discovered(obj); next_d = java_lang_ref_Reference::discovered(obj);
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr(" obj " INTPTR_FORMAT "/next_d " INTPTR_FORMAT, gclog_or_tty->print_cr(" obj " INTPTR_FORMAT "/next_d " INTPTR_FORMAT,
(void *)obj, (void *)next_d); p2i(obj), p2i(next_d));
} }
assert(java_lang_ref_Reference::next(obj) == NULL, assert(java_lang_ref_Reference::next(obj) == NULL,
"Reference not active; should not be discovered"); "Reference not active; should not be discovered");
@ -402,7 +400,7 @@ void ReferenceProcessor::enqueue_discovered_reflist(DiscoveredList& refs_list,
next_d = java_lang_ref_Reference::discovered(obj); next_d = java_lang_ref_Reference::discovered(obj);
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr(" obj " INTPTR_FORMAT "/next_d " INTPTR_FORMAT, gclog_or_tty->print_cr(" obj " INTPTR_FORMAT "/next_d " INTPTR_FORMAT,
(void *)obj, (void *)next_d); p2i(obj), p2i(next_d));
} }
assert(java_lang_ref_Reference::next(obj) == NULL, assert(java_lang_ref_Reference::next(obj) == NULL,
"The reference should not be enqueued"); "The reference should not be enqueued");
@ -565,7 +563,7 @@ ReferenceProcessor::process_phase1(DiscoveredList& refs_list,
!policy->should_clear_reference(iter.obj(), _soft_ref_timestamp_clock)) { !policy->should_clear_reference(iter.obj(), _soft_ref_timestamp_clock)) {
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Dropping reference (" INTPTR_FORMAT ": %s" ") by policy", gclog_or_tty->print_cr("Dropping reference (" INTPTR_FORMAT ": %s" ") by policy",
(void *)iter.obj(), iter.obj()->klass()->internal_name()); p2i(iter.obj()), iter.obj()->klass()->internal_name());
} }
// Remove Reference object from list // Remove Reference object from list
iter.remove(); iter.remove();
@ -582,9 +580,9 @@ ReferenceProcessor::process_phase1(DiscoveredList& refs_list,
complete_gc->do_void(); complete_gc->do_void();
NOT_PRODUCT( NOT_PRODUCT(
if (PrintGCDetails && TraceReferenceGC) { if (PrintGCDetails && TraceReferenceGC) {
gclog_or_tty->print_cr(" Dropped %d dead Refs out of %d " gclog_or_tty->print_cr(" Dropped " SIZE_FORMAT " dead Refs out of " SIZE_FORMAT
"discovered Refs by policy, from list " INTPTR_FORMAT, " discovered Refs by policy, from list " INTPTR_FORMAT,
iter.removed(), iter.processed(), (address)refs_list.head()); iter.removed(), iter.processed(), p2i(refs_list.head()));
} }
) )
} }
@ -604,7 +602,7 @@ ReferenceProcessor::pp2_work(DiscoveredList& refs_list,
if (iter.is_referent_alive()) { if (iter.is_referent_alive()) {
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Dropping strongly reachable reference (" INTPTR_FORMAT ": %s)", gclog_or_tty->print_cr("Dropping strongly reachable reference (" INTPTR_FORMAT ": %s)",
(void *)iter.obj(), iter.obj()->klass()->internal_name()); p2i(iter.obj()), iter.obj()->klass()->internal_name());
} }
// The referent is reachable after all. // The referent is reachable after all.
// Remove Reference object from list. // Remove Reference object from list.
@ -620,9 +618,9 @@ ReferenceProcessor::pp2_work(DiscoveredList& refs_list,
} }
NOT_PRODUCT( NOT_PRODUCT(
if (PrintGCDetails && TraceReferenceGC && (iter.processed() > 0)) { if (PrintGCDetails && TraceReferenceGC && (iter.processed() > 0)) {
gclog_or_tty->print_cr(" Dropped %d active Refs out of %d " gclog_or_tty->print_cr(" Dropped " SIZE_FORMAT " active Refs out of " SIZE_FORMAT
"Refs in discovered list " INTPTR_FORMAT, " Refs in discovered list " INTPTR_FORMAT,
iter.removed(), iter.processed(), (address)refs_list.head()); iter.removed(), iter.processed(), p2i(refs_list.head()));
} }
) )
} }
@ -659,9 +657,9 @@ ReferenceProcessor::pp2_work_concurrent_discovery(DiscoveredList& refs_list,
complete_gc->do_void(); complete_gc->do_void();
NOT_PRODUCT( NOT_PRODUCT(
if (PrintGCDetails && TraceReferenceGC && (iter.processed() > 0)) { if (PrintGCDetails && TraceReferenceGC && (iter.processed() > 0)) {
gclog_or_tty->print_cr(" Dropped %d active Refs out of %d " gclog_or_tty->print_cr(" Dropped " SIZE_FORMAT " active Refs out of " SIZE_FORMAT
"Refs in discovered list " INTPTR_FORMAT, " Refs in discovered list " INTPTR_FORMAT,
iter.removed(), iter.processed(), (address)refs_list.head()); iter.removed(), iter.processed(), p2i(refs_list.head()));
} }
) )
} }
@ -690,7 +688,7 @@ ReferenceProcessor::process_phase3(DiscoveredList& refs_list,
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Adding %sreference (" INTPTR_FORMAT ": %s) as pending", gclog_or_tty->print_cr("Adding %sreference (" INTPTR_FORMAT ": %s) as pending",
clear_referent ? "cleared " : "", clear_referent ? "cleared " : "",
(void *)iter.obj(), iter.obj()->klass()->internal_name()); p2i(iter.obj()), iter.obj()->klass()->internal_name());
} }
assert(iter.obj()->is_oop(UseConcMarkSweepGC), "Adding a bad reference"); assert(iter.obj()->is_oop(UseConcMarkSweepGC), "Adding a bad reference");
iter.next(); iter.next();
@ -807,11 +805,11 @@ void ReferenceProcessor::balance_queues(DiscoveredList ref_lists[])
for (uint i = 0; i < _max_num_q; ++i) { for (uint i = 0; i < _max_num_q; ++i) {
total_refs += ref_lists[i].length(); total_refs += ref_lists[i].length();
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print("%d ", ref_lists[i].length()); gclog_or_tty->print(SIZE_FORMAT " ", ref_lists[i].length());
} }
} }
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr(" = %d", total_refs); gclog_or_tty->print_cr(" = " SIZE_FORMAT, total_refs);
} }
size_t avg_refs = total_refs / _num_q + 1; size_t avg_refs = total_refs / _num_q + 1;
uint to_idx = 0; uint to_idx = 0;
@ -877,11 +875,11 @@ void ReferenceProcessor::balance_queues(DiscoveredList ref_lists[])
for (uint i = 0; i < _max_num_q; ++i) { for (uint i = 0; i < _max_num_q; ++i) {
balanced_total_refs += ref_lists[i].length(); balanced_total_refs += ref_lists[i].length();
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print("%d ", ref_lists[i].length()); gclog_or_tty->print(SIZE_FORMAT " ", ref_lists[i].length());
} }
} }
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr(" = %d", balanced_total_refs); gclog_or_tty->print_cr(" = " SIZE_FORMAT, balanced_total_refs);
gclog_or_tty->flush(); gclog_or_tty->flush();
} }
assert(total_refs == balanced_total_refs, "Balancing was incomplete"); assert(total_refs == balanced_total_refs, "Balancing was incomplete");
@ -923,7 +921,7 @@ ReferenceProcessor::process_discovered_reflist(
size_t total_list_count = total_count(refs_lists); size_t total_list_count = total_count(refs_lists);
if (PrintReferenceGC && PrintGCDetails) { if (PrintReferenceGC && PrintGCDetails) {
gclog_or_tty->print(", %u refs", total_list_count); gclog_or_tty->print(", " SIZE_FORMAT " refs", total_list_count);
} }
// Phase 1 (soft refs only): // Phase 1 (soft refs only):
@ -1016,7 +1014,7 @@ inline DiscoveredList* ReferenceProcessor::get_discovered_list(ReferenceType rt)
ShouldNotReachHere(); ShouldNotReachHere();
} }
if (TraceReferenceGC && PrintGCDetails) { if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr("Thread %d gets list " INTPTR_FORMAT, id, list); gclog_or_tty->print_cr("Thread %d gets list " INTPTR_FORMAT, id, p2i(list));
} }
return list; return list;
} }
@ -1043,14 +1041,14 @@ ReferenceProcessor::add_to_discovered_list_mt(DiscoveredList& refs_list,
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Discovered reference (mt) (" INTPTR_FORMAT ": %s)", gclog_or_tty->print_cr("Discovered reference (mt) (" INTPTR_FORMAT ": %s)",
(void *)obj, obj->klass()->internal_name()); p2i(obj), obj->klass()->internal_name());
} }
} else { } else {
// If retest was non NULL, another thread beat us to it: // If retest was non NULL, another thread beat us to it:
// The reference has already been discovered... // The reference has already been discovered...
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Already discovered reference (" INTPTR_FORMAT ": %s)", gclog_or_tty->print_cr("Already discovered reference (" INTPTR_FORMAT ": %s)",
(void *)obj, obj->klass()->internal_name()); p2i(obj), obj->klass()->internal_name());
} }
} }
} }
@ -1065,7 +1063,7 @@ void ReferenceProcessor::verify_referent(oop obj) {
assert(da ? referent->is_oop() : referent->is_oop_or_null(), assert(da ? referent->is_oop() : referent->is_oop_or_null(),
err_msg("Bad referent " INTPTR_FORMAT " found in Reference " err_msg("Bad referent " INTPTR_FORMAT " found in Reference "
INTPTR_FORMAT " during %satomic discovery ", INTPTR_FORMAT " during %satomic discovery ",
(void *)referent, (void *)obj, da ? "" : "non-")); p2i(referent), p2i(obj), da ? "" : "non-"));
} }
#endif #endif
@ -1145,7 +1143,7 @@ bool ReferenceProcessor::discover_reference(oop obj, ReferenceType rt) {
// The reference has already been discovered... // The reference has already been discovered...
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Already discovered reference (" INTPTR_FORMAT ": %s)", gclog_or_tty->print_cr("Already discovered reference (" INTPTR_FORMAT ": %s)",
(void *)obj, obj->klass()->internal_name()); p2i(obj), obj->klass()->internal_name());
} }
if (RefDiscoveryPolicy == ReferentBasedDiscovery) { if (RefDiscoveryPolicy == ReferentBasedDiscovery) {
// assumes that an object is not processed twice; // assumes that an object is not processed twice;
@ -1203,7 +1201,7 @@ bool ReferenceProcessor::discover_reference(oop obj, ReferenceType rt) {
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Discovered reference (" INTPTR_FORMAT ": %s)", gclog_or_tty->print_cr("Discovered reference (" INTPTR_FORMAT ": %s)",
(void *)obj, obj->klass()->internal_name()); p2i(obj), obj->klass()->internal_name());
} }
} }
assert(obj->is_oop(), "Discovered a bad reference"); assert(obj->is_oop(), "Discovered a bad reference");
@ -1314,7 +1312,7 @@ ReferenceProcessor::preclean_discovered_reflist(DiscoveredList& refs_list,
// active; we need to trace and mark its cohort. // active; we need to trace and mark its cohort.
if (TraceReferenceGC) { if (TraceReferenceGC) {
gclog_or_tty->print_cr("Precleaning Reference (" INTPTR_FORMAT ": %s)", gclog_or_tty->print_cr("Precleaning Reference (" INTPTR_FORMAT ": %s)",
(void *)iter.obj(), iter.obj()->klass()->internal_name()); p2i(iter.obj()), iter.obj()->klass()->internal_name());
} }
// Remove Reference object from list // Remove Reference object from list
iter.remove(); iter.remove();
@ -1337,9 +1335,9 @@ ReferenceProcessor::preclean_discovered_reflist(DiscoveredList& refs_list,
NOT_PRODUCT( NOT_PRODUCT(
if (PrintGCDetails && PrintReferenceGC && (iter.processed() > 0)) { if (PrintGCDetails && PrintReferenceGC && (iter.processed() > 0)) {
gclog_or_tty->print_cr(" Dropped %d Refs out of %d " gclog_or_tty->print_cr(" Dropped " SIZE_FORMAT " Refs out of " SIZE_FORMAT
"Refs in discovered list " INTPTR_FORMAT, " Refs in discovered list " INTPTR_FORMAT,
iter.removed(), iter.processed(), (address)refs_list.head()); iter.removed(), iter.processed(), p2i(refs_list.head()));
} }
) )
} }

View File

@ -35,8 +35,6 @@
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
#include "utilities/workgroup.hpp" #include "utilities/workgroup.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
SharedHeap* SharedHeap::_sh; SharedHeap* SharedHeap::_sh;
SharedHeap::SharedHeap(CollectorPolicy* policy_) : SharedHeap::SharedHeap(CollectorPolicy* policy_) :

View File

@ -44,8 +44,6 @@
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top, HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top,
HeapWord* top_obj) { HeapWord* top_obj) {
if (top_obj != NULL) { if (top_obj != NULL) {
@ -456,20 +454,20 @@ void Space::print() const { print_on(tty); }
void Space::print_on(outputStream* st) const { void Space::print_on(outputStream* st) const {
print_short_on(st); print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ")", st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ")",
bottom(), end()); p2i(bottom()), p2i(end()));
} }
void ContiguousSpace::print_on(outputStream* st) const { void ContiguousSpace::print_on(outputStream* st) const {
print_short_on(st); print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
bottom(), top(), end()); p2i(bottom()), p2i(top()), p2i(end()));
} }
void OffsetTableContigSpace::print_on(outputStream* st) const { void OffsetTableContigSpace::print_on(outputStream* st) const {
print_short_on(st); print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", "
INTPTR_FORMAT ", " INTPTR_FORMAT ")", INTPTR_FORMAT ", " INTPTR_FORMAT ")",
bottom(), top(), _offsets.threshold(), end()); p2i(bottom()), p2i(top()), p2i(_offsets.threshold()), p2i(end()));
} }
void ContiguousSpace::verify() const { void ContiguousSpace::verify() const {
@ -592,7 +590,7 @@ ALL_SINCE_SAVE_MARKS_CLOSURES(ContigSpace_OOP_SINCE_SAVE_MARKS_DEFN)
HeapWord* ContiguousSpace::block_start_const(const void* p) const { HeapWord* ContiguousSpace::block_start_const(const void* p) const {
assert(MemRegion(bottom(), end()).contains(p), assert(MemRegion(bottom(), end()).contains(p),
err_msg("p (" PTR_FORMAT ") not in space [" PTR_FORMAT ", " PTR_FORMAT ")", err_msg("p (" PTR_FORMAT ") not in space [" PTR_FORMAT ", " PTR_FORMAT ")",
p, bottom(), end())); p2i(p), p2i(bottom()), p2i(end())));
if (p >= top()) { if (p >= top()) {
return top(); return top();
} else { } else {
@ -603,7 +601,7 @@ HeapWord* ContiguousSpace::block_start_const(const void* p) const {
cur += oop(cur)->size(); cur += oop(cur)->size();
} }
assert(oop(last)->is_oop(), assert(oop(last)->is_oop(),
err_msg(PTR_FORMAT " should be an object start", last)); err_msg(PTR_FORMAT " should be an object start", p2i(last)));
return last; return last;
} }
} }
@ -611,15 +609,15 @@ HeapWord* ContiguousSpace::block_start_const(const void* p) const {
size_t ContiguousSpace::block_size(const HeapWord* p) const { size_t ContiguousSpace::block_size(const HeapWord* p) const {
assert(MemRegion(bottom(), end()).contains(p), assert(MemRegion(bottom(), end()).contains(p),
err_msg("p (" PTR_FORMAT ") not in space [" PTR_FORMAT ", " PTR_FORMAT ")", err_msg("p (" PTR_FORMAT ") not in space [" PTR_FORMAT ", " PTR_FORMAT ")",
p, bottom(), end())); p2i(p), p2i(bottom()), p2i(end())));
HeapWord* current_top = top(); HeapWord* current_top = top();
assert(p <= current_top, assert(p <= current_top,
err_msg("p > current top - p: " PTR_FORMAT ", current top: " PTR_FORMAT, err_msg("p > current top - p: " PTR_FORMAT ", current top: " PTR_FORMAT,
p, current_top)); p2i(p), p2i(current_top)));
assert(p == current_top || oop(p)->is_oop(), assert(p == current_top || oop(p)->is_oop(),
err_msg("p (" PTR_FORMAT ") is not a block start - " err_msg("p (" PTR_FORMAT ") is not a block start - "
"current_top: " PTR_FORMAT ", is_oop: %s", "current_top: " PTR_FORMAT ", is_oop: %s",
p, current_top, BOOL_TO_STR(oop(p)->is_oop()))); p2i(p), p2i(current_top), BOOL_TO_STR(oop(p)->is_oop())));
if (p < current_top) { if (p < current_top) {
return oop(p)->size(); return oop(p)->size();
} else { } else {

View File

@ -31,8 +31,6 @@
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
// Thread-Local Edens support // Thread-Local Edens support
// static member initialization // static member initialization
@ -154,7 +152,7 @@ void ThreadLocalAllocBuffer::resize() {
if (PrintTLAB && Verbose) { if (PrintTLAB && Verbose) {
gclog_or_tty->print("TLAB new size: thread: " INTPTR_FORMAT " [id: %2d]" gclog_or_tty->print("TLAB new size: thread: " INTPTR_FORMAT " [id: %2d]"
" refills %d alloc: %8.6f desired_size: " SIZE_FORMAT " -> " SIZE_FORMAT "\n", " refills %d alloc: %8.6f desired_size: " SIZE_FORMAT " -> " SIZE_FORMAT "\n",
myThread(), myThread()->osthread()->thread_id(), p2i(myThread()), myThread()->osthread()->thread_id(),
_target_refills, _allocation_fraction.average(), desired_size(), aligned_new_size); _target_refills, _allocation_fraction.average(), desired_size(), aligned_new_size);
} }
set_desired_size(aligned_new_size); set_desired_size(aligned_new_size);
@ -263,7 +261,7 @@ void ThreadLocalAllocBuffer::print_stats(const char* tag) {
" slow allocs: %d refill waste: " SIZE_FORMAT "B" " slow allocs: %d refill waste: " SIZE_FORMAT "B"
" alloc:%8.5f %8.0fKB refills: %d waste %4.1f%% gc: %dB" " alloc:%8.5f %8.0fKB refills: %d waste %4.1f%% gc: %dB"
" slow: %dB fast: %dB\n", " slow: %dB fast: %dB\n",
tag, thrd, thrd->osthread()->thread_id(), tag, p2i(thrd), thrd->osthread()->thread_id(),
_desired_size / (K / HeapWordSize), _desired_size / (K / HeapWordSize),
_slow_allocations, _refill_waste_limit * HeapWordSize, _slow_allocations, _refill_waste_limit * HeapWordSize,
_allocation_fraction.average(), _allocation_fraction.average(),

View File

@ -84,8 +84,6 @@
#include "classfile/sharedClassUtil.hpp" #include "classfile/sharedClassUtil.hpp"
#endif #endif
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
// Known objects // Known objects
Klass* Universe::_boolArrayKlassObj = NULL; Klass* Universe::_boolArrayKlassObj = NULL;
Klass* Universe::_byteArrayKlassObj = NULL; Klass* Universe::_byteArrayKlassObj = NULL;
@ -792,12 +790,12 @@ jint Universe::initialize_heap() {
void Universe::print_compressed_oops_mode() { void Universe::print_compressed_oops_mode() {
tty->cr(); tty->cr();
tty->print("heap address: " PTR_FORMAT ", size: " SIZE_FORMAT " MB", tty->print("heap address: " PTR_FORMAT ", size: " SIZE_FORMAT " MB",
Universe::heap()->base(), Universe::heap()->reserved_region().byte_size()/M); p2i(Universe::heap()->base()), Universe::heap()->reserved_region().byte_size()/M);
tty->print(", Compressed Oops mode: %s", narrow_oop_mode_to_string(narrow_oop_mode())); tty->print(", Compressed Oops mode: %s", narrow_oop_mode_to_string(narrow_oop_mode()));
if (Universe::narrow_oop_base() != 0) { if (Universe::narrow_oop_base() != 0) {
tty->print(": " PTR_FORMAT, Universe::narrow_oop_base()); tty->print(": " PTR_FORMAT, p2i(Universe::narrow_oop_base()));
} }
if (Universe::narrow_oop_shift() != 0) { if (Universe::narrow_oop_shift() != 0) {