JDK-8006430 : TraceTypeProfile is a product flag while it should be a diagnostic flag
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs24,hs25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-01-16
  • Updated: 2014-07-21
  • Resolved: 2013-02-11
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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Related Reports
Relates :  
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.
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.