JDK-8336258 : Document the behavior of 'exclude' and 'compileonly' with respect to inlining
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-07-11
  • Updated: 2024-07-29
  • Resolved: 2024-07-19
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 24
24 b08Fixed
Related Reports
Relates :  
Relates :  
Description
The long-standing behavior of the `exclude` CompileCommand is to also apply to inlined versions of a method. On the other hand, the `compileonly` CompileCommand only affects top-level compilations of a method and not its inlining behavior.

The rational behind this decision is that `exclude` is intended to be used in production to workaround compiler crashes or bad compilations for certain methods and in these scenarios it usually doesn't matter if a "bad" method is getting compiled on the top level or if it gets inlined into another compilation unit.

The "inconsistent inlining behavior with CompileOnly" thread on hotspot-compiler-dev discusses this behavior (see [1]). The answer [2] specifically describes this long-standing behavior.

I think it would be good to document this behavior in the output of `-XX_CompileCommand=help`

[1] https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2016-June/thread.html#23575
[2] https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2016-June/023583.html
Comments
Changeset: 84bc4767 Branch: master Author: Volker Simonis <simonis@openjdk.org> Date: 2024-07-19 11:26:44 +0000 URL: https://git.openjdk.org/jdk/commit/84bc4767a4cd68fb52a36c6644bbec67c24b0e1d
19-07-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20142 Date: 2024-07-11 16:40:46 +0000
11-07-2024