JDK-8256718 : Obsolete the long term deprecated and aliased Trace flags
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-11-20
  • Updated: 2020-12-11
  • Resolved: 2020-12-03
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 16
16 b28Fixed
Related Reports
CSR :  
Relates :  
Sub Tasks
JDK-8257429 :  
Description
When unified logging was introduced we aliased numerous Print/TraceXXX flags to turn on their UL counterpart. For example:

-XX:+PrintSharedSpaces is deprecated. Will use -Xlog:cds=info instead.

UL has been around long enough now that we can obsolete and then expire these aliases. The affected flags are:

  { "PrintSharedSpaces",         LogLevel::Info,  true,  LOG_TAGS(cds) },
  { "TraceBiasedLocking",        LogLevel::Info,  true,  LOG_TAGS(biasedlocking) },
  { "TraceClassLoading",         LogLevel::Info,  true,  LOG_TAGS(class, load) },
  { "TraceClassLoadingPreorder", LogLevel::Debug, true,  LOG_TAGS(class, preorder) },
  { "TraceClassPaths",           LogLevel::Info,  true,  LOG_TAGS(class, path) },
  { "TraceClassResolution",      LogLevel::Debug, true,  LOG_TAGS(class, resolve) },
  { "TraceClassUnloading",       LogLevel::Info,  true,  LOG_TAGS(class, unload) },
  { "TraceExceptions",           LogLevel::Info,  true,  LOG_TAGS(exceptions) },
  { "TraceInvokeDynamic",        LogLevel::Debug, true,  LOG_TAGS(methodhandles, indy) },
  { "TraceLoaderConstraints",    LogLevel::Info,  true,  LOG_TAGS(class, loader, constraints) },
  { "TraceMethodHandles",        LogLevel::Info,  true,  LOG_TAGS(methodhandles) },
  { "TraceMonitorInflation",     LogLevel::Trace, true,  LOG_TAGS(monitorinflation) },
  { "TraceSafepointCleanupTime", LogLevel::Info,  true,  LOG_TAGS(safepoint, cleanup) },
  { "TraceJVMTIObjectTagging",   LogLevel::Debug, true,  LOG_TAGS(jvmti, objecttagging) },
  { "TraceRedefineClasses",      LogLevel::Info,  false, LOG_TAGS(redefine, class) },
  { "PrintJNIResolving",         LogLevel::Debug, true,  LOG_TAGS(jni, resolve) },

As noted in the source:

// NOTE: A compatibility request will be necessary for each alias to be removed.

We can continue to print what the equivalent -Xlog configuration is, but in-line with these flags being obsolete we will not set that Xlog configuration. (obsolete flags are ignored other than to produce a usage warning.)

Comments
Changeset: e4497c9e Author: Harold Seigel <hseigel@openjdk.org> Date: 2020-12-03 13:14:57 +0000 URL: https://git.openjdk.java.net/jdk/commit/e4497c9e
03-12-2020