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

AArch64: Provide a means to eliminate all STREX family of instructions

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 17
    • hotspot
    • b06
    • aarch64
    • linux

      The rr reverse debugger[1] is a valuable debugging tool, but it does not support STREX instructions on the arm platform. Before the LSE stubs for `Atomic` are generated, hotspot uses the default stubs which contain STREX instructions (LL/SC, for example). The LSE stubs are generated relatively late in the initialization sequence, enough that 500+ STREX instructions are issued. Granted, this is a drop in the bucket considering the lifetime of the program, but a single STREX instruction is enough to thwart rr.

      We are currently using the `zero` build configuration to workaround the issue, but this also disables JIT compilation and does not fairly represent customer usage. We would like to see a compile time option (perhaps even only for debug builds) to enable the use of the builtin atomics for the `Atomic` class. Alternatively, if the LSE stub generation happened before any STREX instructions were issued, that would also work.

      [1] https://rr-project.org/

            dchuyko Dmitry Chuyko
            wkemper William Kemper
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: