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

SecurityManager being mutable impedes the optimization of Class.getClassLoader

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      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

            mchung Mandy Chung (Inactive)
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: