United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7040410 -Xloggc:<file> incorrectly enables TraceClassUnloading causing tracing on tty
JDK-7040410 : -Xloggc: incorrectly enables TraceClassUnloading causing tracing on tty

Details
Type:
Bug
Submit Date:
2011-04-28
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-05-16
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs21 (b12)

Related Reports
Backport:
Relates:

Sub Tasks

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
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);
                                     
2011-04-28
EVALUATION

-Xloggc incorrectly enables TraceClassUnloading
                                     
2011-04-28
EVALUATION

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



Hardware and Software, Engineered to Work Together