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

Clarify the DumpSharedSpaces condition in InstanceKlass::verify_on

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      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().

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: