Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • hs19
    • Affects Version/s: hs17
    • Component/s: hotspot
    • b03
    • sparc
    • solaris_10
    • Verified

        Whenever we decide to use Compressed Oops with 64Gb heap AT LEAST next changes should be made to build VM which support it.
        Note: more complex changes needed to use a VM option. I don't see benefits on N2 with it so I am putting it on shelf.

        src/share/vm/utilities/globalDefinitions.hpp
        @@ -288,11 +288,11
         // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and
         // reference fields can be naturally aligned.
         
        -const int MinObjAlignment = HeapWordsPerLong;
        +const int MinObjAlignment = HeapWordsPerLong * 2; // *2 for 16 bytes alignment
         const int MinObjAlignmentInBytes = MinObjAlignment * HeapWordSize;
         const int MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1;
         
        -const int LogMinObjAlignment = LogHeapWordsPerLong;
        +const int LogMinObjAlignment = LogHeapWordsPerLong + 1; // +1 for 16 bytes alignment
         const int LogMinObjAlignmentInBytes = LogMinObjAlignment + LogHeapWordSize;

              Assignee:
              Vladimir Kozlov
              Reporter:
              Vladimir Kozlov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: