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

Using both heap and native segments can degrade performance

    XMLWordPrintable

Details

    Description

      See attached benchmark.

      If we run a simple sum loop benchmark using both a heap and a native segment in the same benchmark, performance degrades. But, when one of them is commented out (including the initialization), the performance of the other is fast again. This also affects the buffer_crazy case, but only one-way (when we have a native segment the buffer_crazy case degrades, but not the other way around)

      The common factor between these things seems to be ScopedMemoryAccess. Perhaps some profile pollution occurs there.

      As a result, various checks are not hoisted from the loop (perhaps due to Unsafe memory barriers, since the base is not known to be null/non-null)

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              jvernee Jorn Vernee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: