JDK-8068183 : Add isTieredSupported method to c.o.j.t.Platforms
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-12-23
  • Updated: 2024-05-14
  • Resolved: 2014-12-24
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 8 JDK 9
8u431Fixed 9 b47Fixed
Related Reports
Blocks :  
Description
Some tests may depend on tested JVM's tiered compilation support.
At the moment the only way to check it is to start a new JVM with +TieredCompilation and check if it's output contain message about "unsupported option" or to run tested JVM with +TieredCompilation and check that TieredCompilation flag is disabled.

These approaches are far from ideal because it either increase test's execution time, or require additional dependencies (like JMX or WhiteBox API).

Fortunately there is a "sun.management.compiler" property that contain compier(s) name and in case when TieredCompilation is supported it contain "Tiered Compilers" substring.

A new method "isTieredSupported" should be added to c.o.j.t.Platforms in order to check tiered compilation availability by looking at "sun.management.compiler" value.
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/d536758aa7bb User: lana Date: 2015-01-21 21:54:46 +0000
21-01-2015

URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/d536758aa7bb User: iignatyev Date: 2014-12-24 18:25:59 +0000
24-12-2014

RFR: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2014-December/016718.html
24-12-2014

sun.management.compiler is initialized by JVM depending on TIERED/COMPILER1/COMPILER2 definitions: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/file/7f062b70a344/src/share/vm/prims/jvm.cpp#l366
23-12-2014