8144605: Invalid format specifier when printing in_cset_state_t
Summary: Use existing CSETSTATE_FORMAT macro in format string
Reviewed-by: kbarrett, tschatzl
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Sun Dec 06 06:08:48 2015 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Fri Dec 04 09:36:16 2015 -0800
@@ -5498,36 +5498,36 @@
return true;
}
if (cset_state.is_in_cset()) {
- gclog_or_tty->print_cr("\n## inconsistent cset state %d for humongous region %u", cset_state.value(), i);
+ gclog_or_tty->print_cr("\n## inconsistent cset state " CSETSTATE_FORMAT " for humongous region %u", cset_state.value(), i);
_failures = true;
return true;
}
if (hr->is_continues_humongous() && cset_state.is_humongous()) {
- gclog_or_tty->print_cr("\n## inconsistent cset state %d for continues humongous region %u", cset_state.value(), i);
+ gclog_or_tty->print_cr("\n## inconsistent cset state " CSETSTATE_FORMAT " for continues humongous region %u", cset_state.value(), i);
_failures = true;
return true;
}
} else {
if (cset_state.is_humongous()) {
- gclog_or_tty->print_cr("\n## inconsistent cset state %d for non-humongous region %u", cset_state.value(), i);
+ gclog_or_tty->print_cr("\n## inconsistent cset state " CSETSTATE_FORMAT " for non-humongous region %u", cset_state.value(), i);
_failures = true;
return true;
}
if (hr->in_collection_set() != cset_state.is_in_cset()) {
- gclog_or_tty->print_cr("\n## in CSet %d / cset state %d inconsistency for region %u",
+ gclog_or_tty->print_cr("\n## in CSet %d / cset state " CSETSTATE_FORMAT " inconsistency for region %u",
hr->in_collection_set(), cset_state.value(), i);
_failures = true;
return true;
}
if (cset_state.is_in_cset()) {
if (hr->is_young() != (cset_state.is_young())) {
- gclog_or_tty->print_cr("\n## is_young %d / cset state %d inconsistency for region %u",
+ gclog_or_tty->print_cr("\n## is_young %d / cset state " CSETSTATE_FORMAT " inconsistency for region %u",
hr->is_young(), cset_state.value(), i);
_failures = true;
return true;
}
if (hr->is_old() != (cset_state.is_old())) {
- gclog_or_tty->print_cr("\n## is_old %d / cset state %d inconsistency for region %u",
+ gclog_or_tty->print_cr("\n## is_old %d / cset state " CSETSTATE_FORMAT " inconsistency for region %u",
hr->is_old(), cset_state.value(), i);
_failures = true;
return true;