提交 0698402e 编写于 作者: Y ysr

6637203: Classunloading messages go to stdout rather than Xloggc file, causing...

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
上级 fe414dae
......@@ -592,7 +592,6 @@ JvmtiEnv::SetVerboseFlag(jvmtiVerboseFlag flag, jboolean value) {
break;
case JVMTI_VERBOSE_GC:
PrintGC = value != 0;
TraceClassUnloading = value != 0;
break;
case JVMTI_VERBOSE_JNI:
PrintJNIResolving = value != 0;
......
......@@ -1866,7 +1866,6 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
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 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
if (PrintGCDetails) {
// Turn on -verbose:gc options as well
PrintGC = true;
if (FLAG_IS_DEFAULT(TraceClassUnloading)) {
TraceClassUnloading = true;
}
}
#if defined(_LP64) && defined(COMPILER1)
......
......@@ -128,7 +128,7 @@ void ClassLoadingService::notify_class_unloaded(instanceKlass* k) {
if (TraceClassUnloading) {
ResourceMark rm;
gclog_or_tty->print_cr("[Unloading class %s]", k->external_name());
tty->print_cr("[Unloading class %s]", k->external_name());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册