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

SecurityManager being mutable impedes the optimization of Class.getClassLoader

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Class.getClassLoader() can't be trivially intrinsified because of the SecurityManager.

      This issue is to track the idea that Christian Thalinger has (see JDK-6642881) to replace the System.security field with a VolatileCallSite. Combined with intrinsification of Class.getClassLoader() (or better moving the class loader field up into Java) we could constant fold two security related checks.

      Attachd patch [1] is not working properly yet because of bootstrapping issues but the idea is that CallSite optimizations in the JIT compilers can constant fold the System.getSecurityManager() call.

      [1] https://bugs.openjdk.java.net/secure/attachment/18729/system-getsecuritymanager.patch

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mchung Mandy Chung
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: