Class.getClassLoader() can't be trivially intrinsified because of the SecurityManager.
This issue is to track the idea that Christian Thalinger has (seeJDK-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
This issue is to track the idea that Christian Thalinger has (see
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
- duplicates
-
JDK-8191053 Provide a mechanism to make system's security manager immutable
- Resolved
- relates to
-
JDK-6642881 Improve performance of Class.getClassLoader()
- Resolved