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

Should disable Escape Analysis if JVMTI capability can_get_owned_monitor_info was taken

XMLWordPrintable

    • b18
    • generic
    • generic

        The JVMTI functions GetOwnedMonitorInfo() and GetOwnedMonitorStackDepthInfo() can be used to
        retrieve objects locked by a thread. In terms of escape analysis those references escape and
        optimizations like scalar replacement become invalid.

        The runtime currently does not revert optimizations based on escape analysis before objects escape
        through JVMTI (try included tests). Therefore escape analysis should be disabled if an agent
        requests the capabilities can_get_owned_monitor_info or can_get_owned_monitor_stack_depth_info.

        can_get_owned_monitor_info and can_get_owned_monitor_stack_depth_info are both OnLoad capabilities
        that cannot be changed once the VM is executing the Java program.

        With JDK-8227745 escape analysis can remain enabled.

              rrich Richard Reingruber
              rrich Richard Reingruber
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: