67 // Length of format string (e.g. "%.1234s") for printing ccstr below |
67 // Length of format string (e.g. "%.1234s") for printing ccstr below |
68 #define FORMAT_BUFFER_LEN 16 |
68 #define FORMAT_BUFFER_LEN 16 |
69 |
69 |
70 void Flag::print_on(outputStream* st) { |
70 void Flag::print_on(outputStream* st) { |
71 st->print("%5s %-35s %c= ", type, name, (origin != DEFAULT ? ':' : ' ')); |
71 st->print("%5s %-35s %c= ", type, name, (origin != DEFAULT ? ':' : ' ')); |
72 if (is_bool()) st->print("%-16s", get_bool() ? "true" : "false"); |
72 if (is_bool()) st->print("%-16s", get_bool() ? "true" : "false"); |
73 if (is_intx()) st->print("%-16ld", get_intx()); |
73 if (is_intx()) st->print("%-16ld", get_intx()); |
74 if (is_uintx()) st->print("%-16lu", get_uintx()); |
74 if (is_uintx()) st->print("%-16lu", get_uintx()); |
|
75 if (is_uint64_t()) st->print("%-16lu", get_uint64_t()); |
75 if (is_ccstr()) { |
76 if (is_ccstr()) { |
76 const char* cp = get_ccstr(); |
77 const char* cp = get_ccstr(); |
77 if (cp != NULL) { |
78 if (cp != NULL) { |
78 const char* eol; |
79 const char* eol; |
79 while ((eol = strchr(cp, '\n')) != NULL) { |
80 while ((eol = strchr(cp, '\n')) != NULL) { |
98 st->print("-XX:%s%s", get_bool() ? "+" : "-", name); |
99 st->print("-XX:%s%s", get_bool() ? "+" : "-", name); |
99 } else if (is_intx()) { |
100 } else if (is_intx()) { |
100 st->print("-XX:%s=" INTX_FORMAT, name, get_intx()); |
101 st->print("-XX:%s=" INTX_FORMAT, name, get_intx()); |
101 } else if (is_uintx()) { |
102 } else if (is_uintx()) { |
102 st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx()); |
103 st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx()); |
|
104 } else if (is_uint64_t()) { |
|
105 st->print("-XX:%s=" UINT64_FORMAT, name, get_uint64_t()); |
103 } else if (is_ccstr()) { |
106 } else if (is_ccstr()) { |
104 st->print("-XX:%s=", name); |
107 st->print("-XX:%s=", name); |
105 const char* cp = get_ccstr(); |
108 const char* cp = get_ccstr(); |
106 if (cp != NULL) { |
109 if (cp != NULL) { |
107 // Need to turn embedded '\n's back into separate arguments |
110 // Need to turn embedded '\n's back into separate arguments |