United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8006430 : TraceTypeProfile is a product flag while it should be a diagnostic flag

Details
Type:
Bug
Submit Date:
2013-01-16
Status:
Resolved
Updated Date:
2014-07-21
Project Name:
JDK
Resolved Date:
2013-02-11
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs24,hs25
Fixed Versions:
hs25 (b19)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
According to JDK-7198499 TraceTypeProfile flag had to become diagnostic (previously it was a develop flag).

However, it could be used as regular product flag even if diagnostic flags are explicitly locked:

jdk1.7.0_12/bin/java -XX:-UnlockDiagnosticVMOptions -XX:+TraceTypeProfile -version
java version "1.7.0_12-ea"
Java(TM) SE Runtime Environment (build 1.7.0_12-ea-b01)
Java HotSpot(TM) Server VM (build 24.0-b24, mixed mode)

jdk1.8.0/bin/java -XX:-UnlockDiagnosticVMOptions -XX:+TraceTypeProfile -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b59)
Java HotSpot(TM) Server VM (build 25.0-b03, mixed mode)

In examples above an error was expected, but not occurred.
Both hs24 and hs25 are affected.
                                    

Comments
This bug is actually not a regression from JDK-7198499, but a long time issue that C2 diagnostic flags were never treated as being "diagnostic" since Mercurial repo history began (duke@0).

The problem is, C2 diagnostic flags have the kind "{C2 diagnostic}", but Flag::is_unlocked() only cared to test "{diagnostic}". So the fix is straighforward -- check "{C2 diagnostic}" as well.

Care has to be taken if new diagnostic/experimental flag kinds are added to other components in the future, e.g. C1.
                                     
2013-02-08
URL:   http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/64d2a0a39954
User:  kmo
Date:  2013-02-11 14:13:25 +0000

                                     
2013-02-11
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/64d2a0a39954
User:  amurillo
Date:  2013-02-15 23:33:19 +0000

                                     
2013-02-15



Hardware and Software, Engineered to Work Together