JDK-8251462 : Simplify compilation policy
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-08-12
  • Updated: 2024-09-17
  • Resolved: 2021-01-28
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 17
17 b08Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Remove SimpleCompPolicy.

Remove relevant parts of:
1. InvocationCounters.
2. Parts of the interpreter managing these counters.
3. Remove TIERED define.

Emulate -XX:-TieredCompilation with -XX:CompilationMode=high-only.
Make sure JVM can build with C1 only and C2 only, add appropriate compilation policy modes.

As a result there should be just the TieredCompilationPolicy that can function with 0 C1 threads or 0 C2 threads.
Comments
URL: https://github.com/openjdk/jdk/commit/15196325977254ee73d96bf99be62c520de59af9 Author: Igor Veresov <iveresov@openjdk.org> Date: Thu Jan 28 20:51:12 2021 +0000
25-12-2023

Ah, I found https://github.com/openjdk/jdk/pull/5238#issuecomment-905051702. +1 to remove UseCounterDecay and related flags.
03-02-2023

Hello, we noticed that this change removed the logic related to -XX:+UseCounterDecay. The flag UseCounterDecay currently has no effect. The logic was in SimpleCompPolicy::do_safepoint_work() in compilationPolicy.cpp. After this change, the equivalent is CompilationPolicy::do_safepoint_work(), which is an empty method and was later removed by JDK-8227060. We don't have a solid case of regression due to the removal of UseCounterDecay yet. One potentially effect is higher code cache usage, as more methods are compiled without UseCounterDecay. This may actually improve performance at a small cost of higher memory usage. Is the removal of UseCounterDecay intentional? Could you provide some rationale? If so, we should probably deprecate/remove the flag UseCounterDecay and any related flags.
03-02-2023

Changeset: 15196325 Author: Igor Veresov <iveresov@openjdk.org> Date: 2021-01-28 20:51:12 +0000 URL: https://git.openjdk.java.net/jdk/commit/15196325
28-01-2021

[~iveresov] please, run performance testing too.
25-01-2021