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

AArch64: the const STUB_THRESHOLD in macroAssembler_aarch64.cpp needs to be tuned

XMLWordPrintable

    • b03
    • aarch64
    • linux

      MacroAssembler::string_compare intrinsic has a STUB_THRESHOLD
      = 64 + 8 to control the stub replacement.

      http://hg.openjdk.java.net/jdk/jdk/file/4aea554692aa/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#l4848

      Per JMH string benchmarks testing, with Ampere eMAG system, the stub code can be beneficial to shorter Strings (less than 72 chars for UTF16, or 72 bytes for Latin if COMPACT_STRING is on) as well, up to 1.5x gain in some cases.

      Suggest to make it tunable so one can configure it per systems once the performance impact (positive or negative) got proved via testing. And this can avoid potential side-effect caused by a fixed value on different aarch64 systems.

            qpzhang Patrick Zhang
            qpzhang Patrick Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: