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

jtreg: Fix failing TestRTMAbortRatio on PPC64

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      ppc
    • OS:
      linux

      Backports

        Description

        Currently native method pageSize() used to cause deliberate transactional aborts is not marked to be compiled and so that method is never called through the code path of SharedRuntime::generate_native_wrapper() as it's excluded from compilation (passing -XX:+PrintCompilation):

        ### Excluding generation of native wrapper: jdk.internal.misc.Unsafe::pageSize
        made not compilable on levels 0 1 2 3 4 jdk.internal.misc.Unsafe::pageSize excluded by CompileCommand
         
        It means that the abort due to calling a native method never takes place and programmed aborts in TestRTMAbortRatio never in fact occur.

        I can't for sure say way that test is getting the correct number of aborts on x86. however I can confirm that even on x86 the aborts do not come from the native wrapper. I suspect the aborts on x86 are occurring a bit latter when the native function is called and a "Far Call" is executed in the native method by chance and not deliberately (in a controlled way).

        Anyway, just marking the pageSize() native method as compilable makes it pass on Power (as expected) and causes no regression on Intel since the abort in SharedRuntime::generate_native_wrapper() takes effect.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gromero Gustavo Romero
                  Reporter:
                  gromero Gustavo Romero
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: