KlassInfoHisto::print_julong should print spaces instead of using str_fmt

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P5
    • 10
    • Affects Version/s: 9
    • Component/s: hotspot

      Instead of using str_fmt this method should just print a space num_spaces times:

        // returns a format string to print a julong with the given width. E.g,
        // printf(num_fmt(6), julong(10)) would print out the number 10 with 4
        // leading spaces.
      PRAGMA_DIAG_PUSH
      PRAGMA_FORMAT_NONLITERAL_IGNORED

        static void print_julong(outputStream* st, int width, julong n) {
          int num_spaces = width - julong_width(n);
          if (num_spaces > 0) {
            st->print(str_fmt(num_spaces), "");
          }
          st->print(JULONG_FORMAT, n);
        }
      PRAGMA_DIAG_POP

            Assignee:
            Unassigned
            Reporter:
            Christian Thalinger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: