JDK-4833712 : COMPILE FAILED print out from the debug VM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_2.6
  • CPU: generic
  • Submitted: 2003-03-17
  • Updated: 2003-06-05
  • Resolved: 2003-06-05
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.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Relates :  
Description
the debug VM prints out "COMPILE FAILED" on simple programs even though the behavior is correct :

public class HiMom {
    public static void main(String[] args) {
        System.out.println("HiMom!");
    }
}

reproduced with 1.4.2 build 18:

bash-2.00$ /java/re/jdk/1.4.2/latest/binaries/solaris-sparc/bin/java_g 
-server -Xcomp -XX:+PrintCompilation -XX:CompileOnly=.main HiMom


VM option '+PrintCompilation'
VM option 'CompileOnly=.main'
  1   b   HiMom::main (9 bytes)
  1   COMPILE FAILED
HiMom!

Comments
SUGGESTED FIX See IMGR webrev: file:/net/prt-archiver/data/imgr_archive/main/c2_baseline/2003/20030513175616.jrose.tiger/webrev/index.html ###@###.### 2005-04-15 22:46:54 GMT
15-04-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b08 tiger-b21
14-06-2004

EVALUATION This is known behavoir, and the compiler will bailout of a compile if the first bci tries to access an unloaded class. Will fix in Tiger, not a real bug. ###@###.### 2003-03-18 -Xcomp is an undocumented feature and is known to cause performance problems. If the customer wants performance, -Xcomp is the wrong way to ask for it. Try -server, or -Xbatch. About "COMPILE FAILED": When this prints, the method in question will never again be compiled, and will run slowly in the interpreter. This can cause performance problems, and is something to be avoided. When running -Xcomp, there are circumstances that cause this message to occur more frequently. Specifically, if a method has never been run before, it is still in an unlinked ("unquickened") state. When it is handed like this to the compiler, the compiler sometimes (not usually) panics into "COMPILE FAILED". This panic can be made less drastic; it should be a simple uncommon trap, followed by a recompilation. I will fix this. In general, though, -Xcomp forces compilation of code before the VM has had a chance to observe where the "hot spot" is, and before the VM can collect statistics which normally drive delicate optimization decisions. We use -Xcomp for shaking out the compiler, but it's not at all a ticket to better performance. ###@###.### 2003-03-18
18-03-2003