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

Clarify the DumpSharedSpaces condition in InstanceKlass::verify_on

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • None
    • hotspot
    • b22

      In InstanceKlass::verify_on for verifying the method ordering:

        // Verify method ordering
        if (method_ordering() != NULL) {
          Array<int>* method_ordering = this->method_ordering();
          int length = method_ordering->length();
          if (JvmtiExport::can_maintain_original_method_order() ||
              ((UseSharedSpaces || DumpSharedSpaces) && length != 0)) {
            guarantee(length == methods()->length(), "invalid method ordering length");

      The (UseSharedSpaces || DumpSharedSpaces) condition covers the dynamic CDS dumping case as well because the UseSharedSpaces is set to true by default. To make the code easier to read, the DumpSharedSpaces should be changed to Arguments::is_dumping_archive().

            ccheung Calvin Cheung
            ccheung Calvin Cheung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: