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

x64: Assembler::reachable redundantly call Relocation::type() more than once

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • None
    • hotspot
    • b13
    • x86

      The various calls to adr.reloc() are not hoisted by the compiler, due calling into the virtual method Relocation::type().

      Refactoring the method so that we only call adr.reloc() once reduces the number of calls made by Address::reachable on x64 a small but reproducible improvement on startup tests:

      Before:
             111,608,658 instructions # 0.81 insns per cycle ( +- 0.06% )
              22,099,654 branches # 419.240 M/sec ( +- 0.06% )
                 764,733 branch-misses # 3.46% of all branches ( +- 0.14% )

      After:
             111,172,754 instructions # 0.81 insns per cycle ( +- 0.07% )
              21,969,414 branches # 419.493 M/sec ( +- 0.08% )
                 761,295 branch-misses # 3.47% of all branches ( +- 0.14% )

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: