JDK-6923043 : failed nightly tests which use -XX:+PrintCompilation -Xcomp -XX:CompileOnly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2010-02-03
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
Related Reports
Relates :  
I added the next change for 6614597:

 // call this when compiler finds that this method is not compilable
void methodOopDesc::set_not_compilable(int comp_level) {
+ if (PrintCompilation) {
+   ttyLocker ttyl;
+   tty->print("made not compilable ");
+   this->print_short_name(tty);
+   int size = this->code_size();
+   if (size > 0)
+   tty->print(" (%d bytes)", size);
+   tty->cr();
+ }

And when "-XX:+PrintCompilation -Xcomp and -XX:CompileOnly=Test.test"
flags are specified we get a lot of lines like this:

made not compilable  java.lang.Thread::<init> (49 bytes)
made not compilable  java.lang.System::getProperty (25 bytes)
made not compilable  java.lang.Exception::<init> (7 bytes)

As result some tests in Nightly failed because they grep for exceptions:

grep "java.lang.Exception" test.out

if [ $? = 0 ]
    echo "Test Failed"
    exit 1
    echo "Test Passed"
    exit 0

It seems, I need to modify the print code to check for Xcomp -XX:CompileOnly combination.

PUBLIC COMMENTS The intention of changes in 6614597 was to print "made not compilable" line for methods for which compilation was disabled due to frequent deoptimizations. But it prints such line also for methods for which compilation was disabled due to CompilerOracle options (Exclude, CompileOnly, CIStart, CIStop). The fix is to path flag to methodOopDesc::set_not_compilable() to print the line only for deoptimizations.

EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/cef333a48af6,ChangeRequest=6923043