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

hotspot metadata classes shouldn't use HeapWordSize or heap related macros like align_object_size

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b107

      Description

      Often code for operating on the metadata classes such as InstanceKlass need to align to a 64-bit size. They use align_object_size() to do this, but really shouldn't since it is meant for aligning java heap objects. In fact if ObjectAlignmentInBytes is not the default of 8, it will align to something much greater than 64-bit, which is unnecessary. What is needed here is a new align macro intended for use by metadata classes that aligns specifically to 64-bits.

      Also, many sizes used by the metadata are converted to "word" size. HeapWordsSize is used to do this, but shouldn't be. HeapWordSize is intended for the size of words in the java heap. wordSize should be used instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: