changeset 4576:ad45d4e37837

6637203: Classunloading messages go to stdout rather than Xloggc file, causing hangs when stdout is closed Summary: Decoupled TraceClassUnloading from verbose:gc, JVMTI_VERBOSE_GC and PrintGC[Details], making it settable in a manner identical to TraceClassLoading. Reverted an inadvertent change of TraceClassUnloading output in a previous changeset from gclog back to tty. Reviewed-by: coleenp, dholmes, jmasa, poonam
author ysr
date Mon, 04 Jan 2010 14:51:26 -0800
parents 7458d5831c21
children 18d854d28d4e
files hotspot/src/share/vm/prims/jvmtiEnv.cpp hotspot/src/share/vm/runtime/arguments.cpp hotspot/src/share/vm/services/classLoadingService.cpp
diffstat 3 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp	Mon Jan 04 07:58:42 2010 -0800
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp	Mon Jan 04 14:51:26 2010 -0800
@@ -592,7 +592,6 @@
     break;
   case JVMTI_VERBOSE_GC:
     PrintGC = value != 0;
-    TraceClassUnloading = value != 0;
     break;
   case JVMTI_VERBOSE_JNI:
     PrintJNIResolving = value != 0;
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jan 04 07:58:42 2010 -0800
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jan 04 14:51:26 2010 -0800
@@ -1866,7 +1866,6 @@
         FLAG_SET_CMDLINE(bool, TraceClassUnloading, true);
       } else if (!strcmp(tail, ":gc")) {
         FLAG_SET_CMDLINE(bool, PrintGC, true);
-        FLAG_SET_CMDLINE(bool, TraceClassUnloading, true);
       } else if (!strcmp(tail, ":jni")) {
         FLAG_SET_CMDLINE(bool, PrintJNIResolving, true);
       }
@@ -2720,9 +2719,6 @@
   if (PrintGCDetails) {
     // Turn on -verbose:gc options as well
     PrintGC = true;
-    if (FLAG_IS_DEFAULT(TraceClassUnloading)) {
-      TraceClassUnloading = true;
-    }
   }
 
 #if defined(_LP64) && defined(COMPILER1)
--- a/hotspot/src/share/vm/services/classLoadingService.cpp	Mon Jan 04 07:58:42 2010 -0800
+++ b/hotspot/src/share/vm/services/classLoadingService.cpp	Mon Jan 04 14:51:26 2010 -0800
@@ -128,7 +128,7 @@
 
   if (TraceClassUnloading) {
     ResourceMark rm;
-    gclog_or_tty->print_cr("[Unloading class %s]", k->external_name());
+    tty->print_cr("[Unloading class %s]", k->external_name());
   }
 }