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

Asserts against MinObjectAlignment should avoid integer division

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      fastdebug builds performance is important to minimize testing time. In GC tests, we have a big hotspot at this line in oop::size_given_klass():
        assert(s % MinObjAlignment == 0, "Oop size is not properly aligned: %d", s);

      The hotspot is because of the integer division. Alas, the divisor is not known at compile time, because it can be set from the JVM command line, so compiler cannot optimize it. There is an easy fix, use the MinObjectAlignmentMask to assert:
       http://cr.openjdk.java.net/~shade/8184753/webrev.01

        Attachments

          Activity

            People

            Assignee:
            shade Aleksey Shipilev
            Reporter:
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: