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

Remove check_safepoint_and_suspend_for_native_trans()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b20

    Description

      This method can just be removed and the code moved directly to check_special_condition_for_native_trans() since it doesn't add any value.
      The other caller, transition_from_native(), can be simplified and can just call SafepointMechanism::process_if_requested_with_exit_check() after transitioning to _thread_in_native_trans. Then we can only add the assert() about not having a last java frame or being walkable since we should have added that in transition_from_native() regardless.

      Also has_special_runtime_exit_condition() should be changed so that only one comparison is made against the _suspend_flags, like we do in is_suspend_after_native(), instead of letting the compiler generate code for three different checks (external suspend, jfr suspend, object deoptimization). Since transition_from_native() will call process_if_requested_with_exit_check() which in turns calls has_special_runtime_exit_condition(), making the generated code for the latter as small as possible makes more likely that ThreadInVMfromNative constructor is inlined and the fast case (no need to process anything) avoids making any calls to other methods.

      Attachments

        Issue Links

          Activity

            People

              pchilanomate Patricio Chilano Mateo
              pchilanomate Patricio Chilano Mateo
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: