Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8043789

KlassInfoHisto::print_julong should print spaces instead of using str_fmt

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • 10
    • 9
    • 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

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

              Created:
              Updated:
              Resolved: