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

Change CDS dumping tty->print_cr() to unified logging

    Details

    • Subcomponent:
    • Resolved In Build:
      b03

      Description

      There are a bunch of tty->print/print_cr() calls during CDS dumping. These should be changed to use unified logging.

      open/src/hotspot/share/memory$ grep tty.*print *.cpp
      ./filemap.cpp: tty->print("[");
      ./filemap.cpp: tty->vprint(msg, ap);
      ./filemap.cpp: tty->print_cr("]");
      ./metaspaceShared.cpp: tty->print_cr("%-3s space: " SIZE_FORMAT_W(9) " [ %4.1f%% of total] out of " SIZE_FORMAT_W(9) " bytes [%5.1f%% used] at " INTPTR_FORMAT,
      ./metaspaceShared.cpp: tty->print("[%-8s] " PTR_FORMAT " - " PTR_FORMAT " capacity =%9d, allocated =%9d",
      ./metaspaceShared.cpp: tty->print_cr(" required = %d", int(needed_bytes));
      ./metaspaceShared.cpp: tty->print_cr("Allocated shared space: " SIZE_FORMAT " bytes at " PTR_FORMAT,
      ./metaspaceShared.cpp: tty->print_cr("Scanning all metaspace objects ... ");
      ./metaspaceShared.cpp: tty->print_cr("Allocating RW objects ... ");
      ./metaspaceShared.cpp: tty->print_cr("Allocating RO objects ... ");
      ./metaspaceShared.cpp: tty->print_cr("Relocating embedded pointers ... ");
      ./metaspaceShared.cpp: tty->print_cr("Relocating external roots ... ");
      ./metaspaceShared.cpp: tty->print_cr("Verifying external roots ... ");
      ./metaspaceShared.cpp: tty->print_cr("Relocating SystemDictionary::_well_known_klasses[] ... ");
      ./metaspaceShared.cpp: tty->print_cr("Dumping symbol table ...");
      ./metaspaceShared.cpp: tty->print("Removing java_mirror ... ");
      ./metaspaceShared.cpp: tty->print_cr("done. ");
      ./metaspaceShared.cpp: tty->print_cr("Number of classes %d", _global_klass_objects->length());
      ./metaspaceShared.cpp: tty->print_cr(" instance classes = %5d", num_inst);
      ./metaspaceShared.cpp: tty->print_cr(" obj array classes = %5d", num_obj_array);
      ./metaspaceShared.cpp: tty->print_cr(" type array classes = %5d", num_type_array);
      ./metaspaceShared.cpp: tty->print("Updating ConstMethods ... ");
      ./metaspaceShared.cpp: tty->print_cr("done. ");
      ./metaspaceShared.cpp: tty->print("Removing unshareable information ... ");
      ./metaspaceShared.cpp: tty->print_cr("done. ");
      ./metaspaceShared.cpp: tty->print_cr("total : " SIZE_FORMAT_W(9) " [100.0%% of total] out of " SIZE_FORMAT_W(9) " bytes [%5.1f%% used]",
      ./metaspaceShared.cpp: tty->print_cr("bm space: " SIZE_FORMAT_W(9) " [ %4.1f%% of total] out of " SIZE_FORMAT_W(9) " bytes [100.0%% used] at " INTPTR_FORMAT,
      ./metaspaceShared.cpp: tty->print_cr("%s%d space: " SIZE_FORMAT_W(9) " [ %4.1f%% of total] out of " SIZE_FORMAT_W(9) " bytes [100.0%% used] at " INTPTR_FORMAT,
      ./metaspaceShared.cpp: tty->print_cr("Loading classes to share ...");
      ./metaspaceShared.cpp: tty->print_cr("Loading classes to share: done.");
      ./metaspaceShared.cpp: tty->print_cr("Reading extra data from %s ...", SharedArchiveConfigFile);
      ./metaspaceShared.cpp: tty->print_cr("Reading extra data: done.");
      ./metaspaceShared.cpp: tty->print_cr("Rewriting and linking classes ...");
      ./metaspaceShared.cpp: tty->print_cr("Rewriting and linking classes: done");
      ./metaspaceShared.cpp: tty->print_cr("\nShared classes:\n");
      ./metaspaceShared.cpp: tty->print_cr("archive is invalid");
      ./metaspaceShared.cpp: tty->print_cr("archive is valid");
      ./universe.cpp: tty->print_cr("Unable to link/verify VirtualMachineError class");
      ./metaspace.cpp: tty->print_cr("MetaspaceUtils::verify_metrics: counter mismatch for mdtype=%u:", mdtype);
      ./metaspace.cpp: tty->print_cr("Expected cap " SIZE_FORMAT ", used " SIZE_FORMAT ", overhead " SIZE_FORMAT ".",
      ./metaspace.cpp: tty->print_cr("Got cap " SIZE_FORMAT ", used " SIZE_FORMAT ", overhead " SIZE_FORMAT ".",
      ./heapShared.cpp: tty->print_cr("Dumping objects to closed archive heap region ...");
      ./heapShared.cpp: tty->print_cr("Dumping objects to open archive heap region ...");

        Attachments

          Activity

            People

            • Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: