JDK-7040410 : -Xloggc: incorrectly enables TraceClassUnloading causing tracing on tty
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-04-28
  • Updated: 2011-07-29
  • Resolved: 2011-05-16
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 Other
7Fixed hs21Fixed
Related Reports
Relates :  
Description
While running the crypto benchmarks with -Xloggc I obtained the following tracing on stdout:

--- --- --- --- --- --- --- --- ---

  Benchmark:   crypto.aes
  Run mode:    timed run
  Test type:   multi
  Threads:     64
  Warmup:      120s
  Iterations:  1
  Run length:  240s

Warmup (120s) begins: Thu Apr 28 11:13:45 PDT 2011
[Unloading class sun.reflect.GeneratedConstructorAccessor43]
[Unloading class sun.reflect.GeneratedConstructorAccessor17]
[Unloading class sun.reflect.GeneratedConstructorAccessor39]
[Unloading class sun.reflect.GeneratedConstructorAccessor6]
[Unloading class sun.reflect.GeneratedConstructorAccessor14]
[Unloading class sun.reflect.GeneratedConstructorAccessor16]
[Unloading class sun.reflect.GeneratedConstructorAccessor36]
[Unloading class sun.reflect.GeneratedConstructorAccessor30]
[Unloading class sun.reflect.GeneratedConstructorAccessor11]
[Unloading class sun.reflect.GeneratedConstructorAccessor40]
[Unloading class sun.reflect.GeneratedConstructorAccessor10]
[Unloading class sun.reflect.GeneratedConstructorAccessor22]
[Unloading class sun.reflect.GeneratedConstructorAccessor50]
[Unloading class sun.reflect.GeneratedConstructorAccessor20]
[Unloading class sun.reflect.GeneratedConstructorAccessor31]
[Unloading class sun.reflect.GeneratedConstructorAccessor35]
[Unloading class sun.reflect.GeneratedConstructorAccessor41]
[Unloading class sun.reflect.GeneratedConstructorAccessor48]
[Unloading class sun.reflect.GeneratedConstructorAccessor47]
[Unloading class sun.reflect.GeneratedConstructorAccessor52]
[Unloading class sun.reflect.GeneratedConstructorAccessor34]
[Unloading class sun.reflect.GeneratedConstructorAccessor42]
[Unloading class sun.reflect.GeneratedConstructorAccessor29]
[Unloading class sun.reflect.GeneratedConstructorAccessor23]
[Unloading class sun.reflect.GeneratedConstructorAccessor32]
[Unloading class sun.reflect.GeneratedConstructorAccessor53]
[Unloading class sun.reflect.GeneratedConstructorAccessor46]
[Unloading class sun.reflect.GeneratedConstructorAccessor51]
[Unloading class sun.reflect.GeneratedConstructorAccessor27]
[Unloading class sun.reflect.GeneratedConstructorAccessor26]
[Unloading class sun.reflect.GeneratedConstructorAccessor28]
[Unloading class sun.reflect.GeneratedConstructorAccessor7]
[Unloading class sun.reflect.GeneratedConstructorAccessor5]
[Unloading class sun.reflect.GeneratedConstructorAccessor9]
[Unloading class sun.reflect.GeneratedConstructorAccessor18]
[Unloading class sun.reflect.GeneratedConstructorAccessor13]
[Unloading class sun.reflect.GeneratedConstructorAccessor15]
[Unloading class sun.reflect.GeneratedConstructorAccessor3]
[Unloading class sun.reflect.GeneratedConstructorAccessor4]
[Unloading class sun.reflect.GeneratedConstructorAccessor33]
[Unloading class sun.reflect.GeneratedConstructorAccessor37]
[Unloading class sun.reflect.GeneratedConstructorAccessor8]
[Unloading class sun.reflect.GeneratedConstructorAccessor25]
[Unloading class sun.reflect.GeneratedConstructorAccessor56]
[Unloading class sun.reflect.GeneratedConstructorAccessor12]
[Unloading class sun.reflect.GeneratedConstructorAccessor19]
[Unloading class sun.reflect.GeneratedConstructorAccessor44]
[Unloading class sun.reflect.GeneratedConstructorAccessor21]
[Unloading class sun.reflect.GeneratedConstructorAccessor49]

with both products and fastdebug builds.

The flags I ran with are:

-d64 -server -XX:+UnlockDiagnosticVMOptions -XX:-EnableInvokeDynamic -XX:+PrintGCDetails -XX:-PrintGCTimeStamps -XX:+PrintGC -XX:+PrintReferenceGC -Xloggc:/home/jc234399/SPECjvm2008/gclogs_with_fix/gclog.$$.$n -jar SPECjvm2008.jar -ikv crypto.aes crypto.rsa crypto.signverify

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/da0fffdcc453
29-04-2011

SUGGESTED FIX arguments.cpp: } else if (match_option(option, "-Xloggc:", &tail)) { // Redirect GC output to the file. -Xloggc:<filename> // ostream_init_log(), when called will use this filename // to initialize a fileStream. _gc_log_filename = strdup(tail); FLAG_SET_CMDLINE(bool, PrintGC, true); FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true); - FLAG_SET_CMDLINE(bool, TraceClassUnloading, true);
28-04-2011

EVALUATION -Xloggc incorrectly enables TraceClassUnloading
28-04-2011