From 0c6e197f62e7174d87d416e330a81d4405540533 Mon Sep 17 00:00:00 2001 From: johnc Date: Wed, 21 Sep 2011 15:24:07 -0700 Subject: [PATCH] 7092245: G1: Wrong format specifier in G1PrintRegionLivenessInfo header output Summary: Cast HeapRegion::GrainBytes to size_t in output statement. Reviewed-by: ysr, brutisso, pbk, tonyp --- src/share/vm/gc_implementation/g1/concurrentMark.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 183bd2b44..61adccb10 100644 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -4566,7 +4566,7 @@ G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name) G1PPRL_SUM_BYTE_FORMAT("region-size"), g1_committed.start(), g1_committed.end(), g1_reserved.start(), g1_reserved.end(), - HeapRegion::GrainBytes); + (size_t)HeapRegion::GrainBytes); _out->print_cr(G1PPRL_LINE_PREFIX); _out->print_cr(G1PPRL_LINE_PREFIX G1PPRL_TYPE_H_FORMAT @@ -4577,6 +4577,15 @@ G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name) G1PPRL_DOUBLE_H_FORMAT, "type", "address-range", "used", "prev-live", "next-live", "gc-eff"); + _out->print_cr(G1PPRL_LINE_PREFIX + G1PPRL_TYPE_H_FORMAT + G1PPRL_ADDR_BASE_H_FORMAT + G1PPRL_BYTE_H_FORMAT + G1PPRL_BYTE_H_FORMAT + G1PPRL_BYTE_H_FORMAT + G1PPRL_DOUBLE_H_FORMAT, + "", "", + "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)"); } // It takes as a parameter a reference to one of the _hum_* fields, it -- GitLab