- 
    Enhancement 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    17
- 
        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/
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/
 
        