hotspot/src/share/vm/runtime/globals.cpp
changeset 33604 ad1cd9269bd4
parent 33592 ceda4a796f5d
child 33775 3ae47fa978ea
equal deleted inserted replaced
33603:450d454670a7 33604:ad1cd9269bd4
   347 // are external/stable and change this function accordingly.
   347 // are external/stable and change this function accordingly.
   348 bool Flag::is_external() const {
   348 bool Flag::is_external() const {
   349   return is_manageable() || is_external_ext();
   349   return is_manageable() || is_external_ext();
   350 }
   350 }
   351 
   351 
   352 
       
   353 // Length of format string (e.g. "%.1234s") for printing ccstr below
       
   354 #define FORMAT_BUFFER_LEN 16
       
   355 
       
   356 PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
       
   357 void Flag::print_on(outputStream* st, bool withComments, bool printRanges) {
   352 void Flag::print_on(outputStream* st, bool withComments, bool printRanges) {
   358   // Don't print notproduct and develop flags in a product build.
   353   // Don't print notproduct and develop flags in a product build.
   359   if (is_constant_in_binary()) {
   354   if (is_constant_in_binary()) {
   360     return;
   355     return;
   361   }
   356   }
   383     } else if (is_ccstr()) {
   378     } else if (is_ccstr()) {
   384       const char* cp = get_ccstr();
   379       const char* cp = get_ccstr();
   385       if (cp != NULL) {
   380       if (cp != NULL) {
   386         const char* eol;
   381         const char* eol;
   387         while ((eol = strchr(cp, '\n')) != NULL) {
   382         while ((eol = strchr(cp, '\n')) != NULL) {
   388           char format_buffer[FORMAT_BUFFER_LEN];
       
   389           size_t llen = pointer_delta(eol, cp, sizeof(char));
   383           size_t llen = pointer_delta(eol, cp, sizeof(char));
   390           jio_snprintf(format_buffer, FORMAT_BUFFER_LEN,
   384           st->print("%.*s", (int)llen, cp);
   391                        "%%." SIZE_FORMAT "s", llen);
       
   392           PRAGMA_DIAG_PUSH
       
   393           PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
       
   394           st->print(format_buffer, cp);
       
   395           PRAGMA_DIAG_POP
       
   396           st->cr();
   385           st->cr();
   397           cp = eol+1;
   386           cp = eol+1;
   398           st->print("%5s %-35s += ", "", _name);
   387           st->print("%5s %-35s += ", "", _name);
   399         }
   388         }
   400         st->print("%-16s", cp);
   389         st->print("%-16s", cp);