JDK-8235981 : Introduce a flag to enable JVM intrinsics
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-12-16
  • Updated: 2021-03-22
  • Resolved: 2020-04-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 15
15Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Introduce a way to enable JVM intrinsics from command-line.

Right now, there's no way to introduce experimental intrinsics which are turned off by default and let users enable them on their side.

There's -XX:DisableIntrinsic= present to *disable* intrinsics. Instead of introducing -XX:EnableIntrinsic= equivalent, it would be nice to have a new option which supersede both and supports both enabling and disabling arbitrary set of intrinsics. As an example:
  -XX:ControlIntrinsic=+_dabs,-_fabs,-_getClass

It makes sense to require -XX:+UnlockExperimentalVMOptions when enabling intrinsics.

Comments
Yes thank you [~xliu]
22-03-2021

Sorry, I overlook your comment. It's done in JDK-8151779, so close it as a duplication. .
22-03-2021

Hi [~xliu], Request help with this task. For now assigning to you. Please close as duplicate if the same requirement is covered in your work done for JDK-8151779. You may please unassign yourself if related. Thanks.
26-02-2020

> Right now, there's no way to introduce experimental intrinsics which are turned off by default and let users enable them on their side. isn't adding 'experimental(bool, UseXIntrinsics, false, "use intrinsics for x") \ ' and guarding usage of intrinsics x by this flag a way to do it right now?
03-01-2020

Duplicates JDK-8151779?
02-01-2020

Also, worth considering turning the following flags (or part of them) into intrinsics: diagnostic(bool, InlineArrayCopy, true, \ "Inline arraycopy native that is known to be part of " \ "base library DLL") \ \ diagnostic(bool, InlineObjectHash, true, \ "Inline Object::hashCode() native that is known to be part " \ "of base library DLL") \ \ diagnostic(bool, InlineNatives, true, \ "Inline natives that are known to be part of base library DLL") \ \ diagnostic(bool, InlineMathNatives, true, \ "Inline SinD, CosD, etc.") \ \ diagnostic(bool, InlineClassNatives, true, \ "Inline Class.isInstance, etc") \ \ diagnostic(bool, InlineThreadNatives, true, \ "Inline Thread.currentThread, etc") \ \ diagnostic(bool, InlineUnsafeOps, true, \ "Inline memory ops (native methods) from Unsafe") \
16-12-2019

Proposed flag makes existing per-intrinsic flags obsolete: diagnostic(bool, UseAESIntrinsics, false, \ "Use intrinsics for AES versions of crypto") \ \ diagnostic(bool, UseAESCTRIntrinsics, false, \ "Use intrinsics for the paralleled version of AES/CTR crypto") \ \ diagnostic(bool, UseSHA1Intrinsics, false, \ "Use intrinsics for SHA-1 crypto hash function. " \ "Requires that UseSHA is enabled.") \ \ diagnostic(bool, UseSHA256Intrinsics, false, \ "Use intrinsics for SHA-224 and SHA-256 crypto hash functions. " \ "Requires that UseSHA is enabled.") \ \ diagnostic(bool, UseSHA512Intrinsics, false, \ "Use intrinsics for SHA-384 and SHA-512 crypto hash functions. " \ "Requires that UseSHA is enabled.") \ \ diagnostic(bool, UseCRC32Intrinsics, false, \ "use intrinsics for java.util.zip.CRC32") \ \ diagnostic(bool, UseCRC32CIntrinsics, false, \ "use intrinsics for java.util.zip.CRC32C") \ \ diagnostic(bool, UseAdler32Intrinsics, false, \ "use intrinsics for java.util.zip.Adler32") \ \ diagnostic(bool, UseVectorizedMismatchIntrinsic, false, \ "Enables intrinsification of ArraysSupport.vectorizedMismatch()") \ \
16-12-2019