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

The CDS compact symbol table range check should be improved

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 9
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      The following range check limits the total shared space to be less than MAX_SHARED_DELTA unnecessarily. The shared symbols are allocated from the RO space at dump time. The max_delta can be calculated from the 'base_address - end_of_RO_space'.

      juint* CompactHashtableWriter::dump_buckets() {
        uintx base_address = 0;
        uintx max_delta = 0;
        int num_compact_buckets = 0;
        if (_type == CompactHashtable<Symbol*, char>::_symbol_table) {
          base_address = uintx(MetaspaceShared::shared_rs()->base());
          max_delta = uintx(MetaspaceShared::shared_rs()->size());
          assert(max_delta <= MAX_SHARED_DELTA, "range check");

      Also, it might even be better to just use the start address of RO space as the 'base_address'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jiangli Jiangli Zhou
              Reporter:
              jiangli Jiangli Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: