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

Shenandoah: test_in_cset can use more efficient encoding

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8-shenandoah, 11-shenandoah, 14, 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b25

      Description

      After JDK-8245464, we have this shape of cset check:

        ...65: mov %rax,%r10
        ...68: shr $0x17,%r10
        ...6c: mov $0x10000,%r11d
        ...72: cmpb $0x0,(%r11,%r10,1)
        ...77: je 0x00007f868c8ef355

      But the immediate is very small, so there is no reason why it should take %r11. If we massage the code a bit with:
        https://cr.openjdk.java.net/~shade/8245465/webrev.02/

        ...e5: mov %rax,%r10
        ...e8: shr $0x17,%r10
        ...ec: cmpb $0x0,0x10000(%r10)
        ...f4: je 0x00007f6be48f7ed5

      Then we save the register there, and LRB midpath is also 3 bytes more compact.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: