JDK-8145348 : Make intrinsics flags diagnostic
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-12-14
  • Updated: 2020-03-06
  • Resolved: 2016-03-29
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 9
9 b114Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8169585 :  
Description
Currently most of flags which control instrinsics generation and usage are product:

  product(bool, UseAESIntrinsics, false,                                    \
          "Use intrinsics for AES versions of crypto")                      \

and some diagnostic:

  diagnostic(ccstrlist, DisableIntrinsic, "",                               \
          "do not expand intrinsics whose (internal) names appear here")    \

By default  runtime  enables intrinsics on platforms which support them.
The flags are used on command line only when we need to disable intrinsics (or for testing). It is fine to convert all intrinsics flags to diagnostic.

Comments
No release note required because this change is already documented in the Tools Reference Guide.
20-03-2017

Thanks, Rahul The problem is that some tests fork an other VM and pass different flags from what is on @run command line. It is easy to miss unfortunately. And in Nightly we test only fastdebug VM where UnlockDiagnosticVMOptions is enabled by default. So it is hard to catch such failures. May be we should add product VM testing to our PIT (RBT) testing. Currently we back out this changes. Apply this changes again when working on JDK-8153655 and make them part of the fix.
08-04-2016

[~kvn] At present not sure how I missed adding -XX:+UnlockDiagnosticVMOptions to some required tests! Remember checking the tests (open and closed sources) and could find only two tests, which were updated. Please let me check this, JDK-8153655 in detail and will update with results, Thanks.
08-04-2016

"Also need to add -XX:+UnlockDiagnosticVMOptions to tests which use intrinsics flags." Why it was not done: JDK-8153655 ?
08-04-2016

Done.
02-03-2016

[~twisti] [~kvn] okay, I will work to file CCC request.
01-03-2016

If we are changing product flags too we need a CCC request.
29-02-2016

[~kvn], Thank you for the points. All changes, testing done and review request sent to open. RFR: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-February/021715.html
29-02-2016

Also need to add -XX:+UnlockDiagnosticVMOptions to tests which use intrinsics flags.
25-02-2016

Correct. Convert develop intrinsic flags to diagnostic too to be consistent. Please, try to run debug VM with these (develop) flags switched off - it could cause some problems since they were always enabled before. File new bugs if you found problems - we have to support all these flags to work on and off.
24-02-2016

[~kvn], Request help confirmation - As mentioned in my above notes comments along with the existing "product" intrinsics flags, we need to convert even the "develop" ones also to "diagnostic" type, right? e.g.: develop(bool, InlineObjectHash, true....
24-02-2016

Notes: -- identified flags which control intrinsics generation, from vmIntrinsics::is_disabled_by_flags(). -- checking converting following flags from 'product or develop' to 'diagnostic'. [globals.hpp] UseGHASHIntrinsics InlineArrayCopy InlineObjectHash InlineNatives InlineMathNatives InlineClassNatives InlineThreadNatives InlineUnsafeOps UseAESIntrinsics UseAESCTRIntrinsics UseSHA1Intrinsics UseSHA256Intrinsics UseSHA512Intrinsics UseCRC32Intrinsics UseCRC32CIntrinsics UseAdler32Intrinsics UseVectorizedMismatchIntrinsic [c1_globals.hpp] InlineNIOCheckIndex [c2_globals.hpp] InlineReflectionGetCallerClass InlineObjectCopy SpecialStringCompareTo SpecialStringIndexOf SpecialStringEquals SpecialArraysEquals SpecialEncodeISOArray UseMathExactIntrinsics UseMultiplyToLenIntrinsic UseSquareToLenIntrinsic UseMulAddIntrinsic UseMontgomeryMultiplyIntrinsic UseMontgomerySquareIntrinsic -- Webrev, RFR to be done.
24-02-2016