changeset 11727:b029389f5ede

8071652: -XX:CompileOnly does not behave as documented Reviewed-by: kvn
author dpochepk
date Wed, 20 Jul 2016 19:35:08 +0300
parents d001a6099482
children fbd5edf4d6e3 19dd4534b4f6
files src/share/vm/compiler/compilerOracle.cpp test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java
diffstat 5 files changed, 20 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/compiler/compilerOracle.cpp	Wed Jul 20 19:33:22 2016 +0300
+++ b/src/share/vm/compiler/compilerOracle.cpp	Wed Jul 20 19:35:08 2016 +0300
@@ -819,7 +819,6 @@
 
       if (className == NULL) {
         className = newName;
-        c_match = MethodMatcher::Prefix;
       } else {
         methodName = newName;
       }
@@ -829,26 +828,15 @@
       if (className == NULL) {
         className = "";
         c_match = MethodMatcher::Any;
-      } else {
-        // foo/bar.blah is an exact match on foo/bar, bar.blah is a suffix match on bar
-        if (strchr(className, '/') != NULL) {
-          c_match = MethodMatcher::Exact;
-        } else {
-          c_match = MethodMatcher::Suffix;
-        }
       }
     } else {
       // got foo or foo/bar
       if (className == NULL) {
         ShouldNotReachHere();
       } else {
-        // got foo or foo/bar
-        if (strchr(className, '/') != NULL) {
-          c_match = MethodMatcher::Prefix;
-        } else if (className[0] == '\0') {
+        // missing class name handled as "Any" class match
+        if (className[0] == '\0') {
           c_match = MethodMatcher::Any;
-        } else {
-          c_match = MethodMatcher::Substring;
         }
       }
     }
--- a/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java	Wed Jul 20 19:33:22 2016 +0300
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java	Wed Jul 20 19:35:08 2016 +0300
@@ -38,7 +38,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_224.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA256Intrinsics
  *                   -Dalgorithm=SHA-224
  *                   compiler.intrinsics.sha.sanity.TestSHA256Intrinsics
@@ -47,7 +47,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_224.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:-UseSHA256Intrinsics
  *                   -Dalgorithm=SHA-224
  *                   compiler.intrinsics.sha.sanity.TestSHA256Intrinsics
@@ -56,7 +56,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_256.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA256Intrinsics
  *                   -Dalgorithm=SHA-256
  *                   compiler.intrinsics.sha.sanity.TestSHA256Intrinsics
@@ -65,7 +65,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_256.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:-UseSHA256Intrinsics
  *                   -Dalgorithm=SHA-256
  *                   compiler.intrinsics.sha.sanity.TestSHA256Intrinsics
--- a/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java	Wed Jul 20 19:33:22 2016 +0300
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java	Wed Jul 20 19:35:08 2016 +0300
@@ -38,7 +38,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_224.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA256Intrinsics -XX:-UseSHA1Intrinsics
  *                   -XX:-UseSHA512Intrinsics
  *                   -Dalgorithm=SHA-224
@@ -48,7 +48,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_224_def.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA256Intrinsics -Dalgorithm=SHA-224
  *                   compiler.intrinsics.sha.sanity.TestSHA256MultiBlockIntrinsics
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -56,7 +56,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_224.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA -XX:-UseSHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2 -XX:-UseSHA
  *                   -Dalgorithm=SHA-224
  *                   compiler.intrinsics.sha.sanity.TestSHA256MultiBlockIntrinsics
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -64,7 +64,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_256.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA256Intrinsics -XX:-UseSHA1Intrinsics
  *                   -XX:-UseSHA512Intrinsics
  *                   -Dalgorithm=SHA-256
--- a/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java	Wed Jul 20 19:33:22 2016 +0300
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java	Wed Jul 20 19:35:08 2016 +0300
@@ -38,7 +38,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_384.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA512Intrinsics
  *                   -Dalgorithm=SHA-384
  *                   compiler.intrinsics.sha.sanity.TestSHA512Intrinsics
@@ -47,7 +47,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_384.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:-UseSHA512Intrinsics
  *                   -Dalgorithm=SHA-384
  *                   compiler.intrinsics.sha.sanity.TestSHA512Intrinsics
@@ -56,7 +56,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_512.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA512Intrinsics
  *                   -Dalgorithm=SHA-512
  *                   compiler.intrinsics.sha.sanity.TestSHA512Intrinsics
@@ -65,7 +65,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_512.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:-UseSHA512Intrinsics
  *                   -Dalgorithm=SHA-512
  *                   compiler.intrinsics.sha.sanity.TestSHA512Intrinsics
--- a/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java	Wed Jul 20 19:33:22 2016 +0300
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java	Wed Jul 20 19:35:08 2016 +0300
@@ -38,7 +38,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_384.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA512Intrinsics -XX:-UseSHA1Intrinsics
  *                   -XX:-UseSHA256Intrinsics
  *                   -Dalgorithm=SHA-384
@@ -48,7 +48,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_384_def.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA512Intrinsics -Dalgorithm=SHA-384
  *                   compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -56,7 +56,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_384.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA -XX:-UseSHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2 -XX:-UseSHA
  *                   -Dalgorithm=SHA-384
  *                   compiler.intrinsics.sha.sanity.TestSHA1Intrinsics
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -64,7 +64,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_512.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA512Intrinsics -XX:-UseSHA1Intrinsics
  *                   -XX:-UseSHA256Intrinsics
  *                   -Dalgorithm=SHA-512
@@ -74,7 +74,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=positive_512_def.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2
  *                   -XX:+UseSHA512Intrinsics -Dalgorithm=SHA-512
  *                   compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -82,7 +82,7 @@
  *                   -XX:Tier4InvocationThreshold=500
  *                   -XX:+LogCompilation -XX:LogFile=negative_512.log
  *                   -XX:CompileOnly=sun/security/provider/DigestBase
- *                   -XX:CompileOnly=sun/security/provider/SHA -XX:-UseSHA
+ *                   -XX:CompileOnly=sun/security/provider/SHA2 -XX:-UseSHA
  *                   -Dalgorithm=SHA-512
  *                   compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics
  * @run main/othervm -DverificationStrategy=VERIFY_INTRINSIC_USAGE