src/share/vm/runtime/globals.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-jinfo-flags Sdiff src/share/vm/runtime

src/share/vm/runtime/globals.cpp

Print this page




 131      else st->print("%-16s", "");
 132   }
 133   st->print("%-20s", kind);
 134   if (withComments) {
 135 #ifndef PRODUCT
 136     st->print("%s", doc );
 137 #endif
 138   }
 139   st->cr();
 140 }
 141 
 142 void Flag::print_as_flag(outputStream* st) {
 143   if (is_bool()) {
 144     st->print("-XX:%s%s", get_bool() ? "+" : "-", name);
 145   } else if (is_intx()) {
 146     st->print("-XX:%s=" INTX_FORMAT, name, get_intx());
 147   } else if (is_uintx()) {
 148     st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx());
 149   } else if (is_uint64_t()) {
 150     st->print("-XX:%s=" UINT64_FORMAT, name, get_uint64_t());


 151   } else if (is_ccstr()) {
 152     st->print("-XX:%s=", name);
 153     const char* cp = get_ccstr();
 154     if (cp != NULL) {
 155       // Need to turn embedded '\n's back into separate arguments
 156       // Not so efficient to print one character at a time,
 157       // but the choice is to do the transformation to a buffer
 158       // and print that.  And this need not be efficient.
 159       for (; *cp != '\0'; cp += 1) {
 160         switch (*cp) {
 161           default:
 162             st->print("%c", *cp);
 163             break;
 164           case '\n':
 165             st->print(" -XX:%s=", name);
 166             break;
 167         }
 168       }
 169     }
 170   } else {




 131      else st->print("%-16s", "");
 132   }
 133   st->print("%-20s", kind);
 134   if (withComments) {
 135 #ifndef PRODUCT
 136     st->print("%s", doc );
 137 #endif
 138   }
 139   st->cr();
 140 }
 141 
 142 void Flag::print_as_flag(outputStream* st) {
 143   if (is_bool()) {
 144     st->print("-XX:%s%s", get_bool() ? "+" : "-", name);
 145   } else if (is_intx()) {
 146     st->print("-XX:%s=" INTX_FORMAT, name, get_intx());
 147   } else if (is_uintx()) {
 148     st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx());
 149   } else if (is_uint64_t()) {
 150     st->print("-XX:%s=" UINT64_FORMAT, name, get_uint64_t());
 151   } else if (is_double()) {
 152     st->print("-XX:%s=%f", name, get_double());
 153   } else if (is_ccstr()) {
 154     st->print("-XX:%s=", name);
 155     const char* cp = get_ccstr();
 156     if (cp != NULL) {
 157       // Need to turn embedded '\n's back into separate arguments
 158       // Not so efficient to print one character at a time,
 159       // but the choice is to do the transformation to a buffer
 160       // and print that.  And this need not be efficient.
 161       for (; *cp != '\0'; cp += 1) {
 162         switch (*cp) {
 163           default:
 164             st->print("%c", *cp);
 165             break;
 166           case '\n':
 167             st->print(" -XX:%s=", name);
 168             break;
 169         }
 170       }
 171     }
 172   } else {


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