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

Facilitate disabling intrinsics on a per-class level

XMLWordPrintable

      Currently, the DisableIntrinsic command line flag can be used to disable individual intrinsics. There are three ways to disable intrinsics using the DisableIntrinsic flag:

      (1) -XX:DisableIntrinsic=_hashCode,_getClass
      Disables intrinsification of _hashCode and _getClass globally (i.e., the intrinsified version the methods will not be used at all).

      (2) -XX:CompileCommand=option,aClass::aMethod,DisableIntrinsic,_hashCode
      Disables intrinsification of _hashCode when it is called from aClass::aMethod (but not for any other call site of _hashCode)

      (3) -XX:CompileCommand=option,java.lang.ref.Reference::get,DisableIntrinsic,_Reference_get
      Some methods are not compiled by C2. Instead, the C2 compiler returns directly the intrinsified version of these methods. The command above forces C2 to compile _Reference_get, but allows using the intrinsified version of _Reference_get at all other call sites.

      From the above modes, (1) disable intrinsics globally, (2) and (3) disable intrinsics on a per-method basis. In cases (2) and (3) the compilation context is aClass::aMethod and java.lang.ref.Reference::get, respectively.

      This enhancement proposes an extension that facilitates disabling intrinsics also for particular class (a fourth way to disable intrinsics).

            Unassigned Unassigned
            zmajo Zoltan Majo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: