JDK-8071652 : -XX:CompileOnly does not behave as documented
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-01-27
  • Updated: 2024-07-11
  • Resolved: 2016-07-20
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 b131Fixed
Related Reports
Relates :  
Relates :  
Description
The implementation of the CompileOnly command does not behave as specified in [1].
There are 2 possible solutions to this:

1) Deprecate the flag (my preferred solution)
2) Change the behavior according to the documentation


Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/b029389f5ede User: lana Date: 2016-08-10 20:19:27 +0000
10-08-2016

URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/b029389f5ede User: dpochepk Date: 2016-07-20 18:43:27 +0000
20-07-2016

ILW = docs/product inconsistency of debug tool; affects CompileOnly option; none = LMH = P5
23-06-2016

ILW = docs/product inconsistency; affects CompileOnly option; none = MMH = P3
08-06-2016

Note, CompileOnly flag allow easy specify several methods in one option: -XX:CompileOnly=java.lang.String::length,java.util.List::size CompileCommand allow only one method as I know. So I think there is benefit to keep CompileOnly flag. I would vote to fix the behavior of this flag instead of removing it.
27-01-2015

java -Xcomp -XX:+PrintCompilation -XX:CompileOnly=A.add -version Output: 67 1 b 3 java.util.ArrayList::add (29 bytes) 68 2 b 4 java.util.ArrayList::add (29 bytes) 70 1 3 java.util.ArrayList::add (29 bytes) made not entrant 91 3 !b 3 java.util.concurrent.CopyOnWriteArrayList::add (59 bytes) 91 4 !b 4 java.util.concurrent.CopyOnWriteArrayList::add (59 bytes) 93 3 ! 3 java.util.concurrent.CopyOnWriteArrayList::add (59 bytes) made not entrant 131 5 b 3 A::add (1 bytes) 132 6 b 1 A::add (1 bytes) 132 5 3 A::add (1 bytes) made not entrant 133 7 b 3 AA::add (1 bytes) 134 8 b 1 AA::add (1 bytes) 134 7 3 AA::add (1 bytes) made not entrant 135 9 b 3 AAA::add (1 bytes) 135 10 b 1 AAA::add (1 bytes) 135 9 3 AAA::add (1 bytes) made not entrant
27-01-2015

Nils, I assign the bug to you, since you worked on the CompileCommand recently. You can assign it back to me, if you want. Thanks, Albert
27-01-2015