RVM
  1. RVM
  2. RVM-512

Experiment with freezing bucket array in VM_HashMap/VM_HashSet

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      VM_HashMap and VM_HashSet perform open hashing, first having an array of buckets and then linking together buckets that are in the same array location. When the size of the HashMap/HashSet grows then the original array becomes garbage, which as the array is often/initially in the boot image, creates an array that is never reclaimed but always scanned in a stop-the-world GC. If we want to avoid the array becoming garbage then we can prevent a new one from being allocated. This will still let the open hashing work as elements will be linked together, the length of the links will get longer and make the average case use slower. The amount of space used in a development image for bucket arrays is 132KB or under 33,110 references. There is a trade-off in making the HashMap/HashSet slower after boot image creation and avoiding creating a unreclaimable garbage bucket array that is scanned during stop-the-world GC.

        Issue Links

          Activity

          Hide
          Ian Rogers added a comment -

          The attached file implements not resizing of hashmaps and hashsets at runtime that are immortal but allows resizing of all others.

          Show
          Ian Rogers added a comment - The attached file implements not resizing of hashmaps and hashsets at runtime that are immortal but allows resizing of all others.
          Ian Rogers made changes -
          Field Original Value New Value
          Attachment RVM-512.patch [ 34701 ]
          Ian Rogers made changes -
          Link This issue is related to RVM-513 [ RVM-513 ]
          Hide
          Ian Rogers added a comment -

          Fixed in r14318

          Show
          Ian Rogers added a comment - Fixed in r14318
          Ian Rogers made changes -
          Fix Version/s 3.0 [ 13530 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 1000 [ 14184 ]
          Assignee Ian Rogers [ ianrogers ]
          Status Open [ 1 ] Resolved [ 5 ]
          Ian Rogers made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ian Rogers
              Reporter:
              Ian Rogers
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: