--- old/src/share/vm/memory/heapInspection.cpp 2014-04-29 16:54:46.000000000 -0400 +++ new/src/share/vm/memory/heapInspection.cpp 2014-04-29 16:54:45.000000000 -0400 @@ -35,6 +35,8 @@ #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" #endif // INCLUDE_ALL_GCS +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC + // HeapInspection int KlassInfoEntry::compare(KlassInfoEntry* e1, KlassInfoEntry* e2) { @@ -270,6 +272,7 @@ return true; } +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL void KlassInfoHisto::print_title(outputStream* st, bool csv_format, bool selected[], int width_table[], const char *name_table[]) { @@ -282,7 +285,10 @@ } else { st->print("Index Super"); for (int c=0; cprint(str_fmt(width_table[c]), name_table[c]);} +PRAGMA_DIAG_POP } st->print(" ClassName"); } @@ -395,12 +401,18 @@ case KlassSizeStats::_index_inst_size: case KlassSizeStats::_index_inst_count: case KlassSizeStats::_index_method_count: +PRAGMA_DIAG_PUSH +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL st->print(str_fmt(width_table[c]), "-"); +PRAGMA_DIAG_POP break; default: { double perc = (double)(100) * (double)(colsum_table[c]) / (double)sz_sum._total_bytes; +PRAGMA_DIAG_PUSH +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL st->print(perc_fmt(width_table[c]), perc); +PRAGMA_DIAG_POP } } }