--- old/src/share/vm/runtime/jniHandles.cpp 2015-11-19 15:35:28.510128522 +0100 +++ new/src/share/vm/runtime/jniHandles.cpp 2015-11-19 15:35:28.394128526 +0100 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/systemDictionary.hpp" +#include "logging/log.hpp" #include "oops/oop.inline.hpp" #include "prims/jvmtiExport.hpp" #include "runtime/jniHandles.hpp" @@ -393,9 +394,7 @@ f->do_oop(root); } else { // The weakly referenced object is not alive, clear the reference by storing NULL - if (TraceReferenceGC) { - tty->print_cr("Clearing JNI weak reference (" INTPTR_FORMAT ")", p2i(root)); - } + log_develop(gc, ref)("Clearing JNI weak reference (" INTPTR_FORMAT ")", p2i(root)); *root = NULL; } }