src/share/vm/runtime/globals.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/globals.cpp	Wed Apr  2 16:52:00 2008
--- new/src/share/vm/runtime/globals.cpp	Wed Apr  2 16:51:59 2008

*** 66,75 **** --- 66,76 ---- if (is_bool()) st->print("%-16s", get_bool() ? "true" : "false"); if (is_intx()) st->print("%-16ld", get_intx()); if (is_uintx()) st->print("%-16lu", get_uintx()); if (is_ccstr()) { const char* cp = get_ccstr(); + if (cp != NULL) { const char* eol; while ((eol = strchr(cp, '\n')) != NULL) { char format_buffer[FORMAT_BUFFER_LEN]; size_t llen = pointer_delta(eol, cp, sizeof(char)); jio_snprintf(format_buffer, FORMAT_BUFFER_LEN,
*** 79,88 **** --- 80,90 ---- cp = eol+1; st->print("%5s %-35s += ", "", name); } st->print("%-16s", cp); } + } st->print(" %s", kind); st->cr(); } void Flag::print_as_flag(outputStream* st) {
*** 92,115 **** --- 94,120 ---- st->print("-XX:%s=" INTX_FORMAT, name, get_intx()); } else if (is_uintx()) { st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx()); } else if (is_ccstr()) { st->print("-XX:%s=", name); + const char* cp = get_ccstr(); + if (cp != NULL) { // Need to turn embedded '\n's back into separate arguments // Not so efficient to print one character at a time, // but the choice is to do the transformation to a buffer // and print that. And this need not be efficient. ! for (const char* cp = get_ccstr(); *cp != '\0'; cp += 1) { ! for (; *cp != '\0'; cp += 1) { switch (*cp) { default: st->print("%c", *cp); break; case '\n': st->print(" -XX:%s=", name); break; } } + } } else { ShouldNotReachHere(); } }

src/share/vm/runtime/globals.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File