OpenJDK / aarch32-port / jdk9-arm3264 / hotspot
changeset 10737:d480f32efee5
8153186: Convert TraceGCTaskThread to use unified logging
Reviewed-by: mgerdin, tschatzl
author | brutisso |
---|---|
date | Fri, 01 Apr 2016 07:08:30 +0200 |
parents | e32b24aec9b1 |
children | ec619fe64be0 |
files | src/share/vm/gc/parallel/gcTaskManager.cpp src/share/vm/gc/parallel/gcTaskThread.cpp src/share/vm/runtime/globals.hpp |
diffstat | 3 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/gc/parallel/gcTaskManager.cpp Fri Apr 01 03:33:39 2016 +0000 +++ b/src/share/vm/gc/parallel/gcTaskManager.cpp Fri Apr 01 07:08:30 2016 +0200 @@ -30,6 +30,7 @@ #include "logging/log.hpp" #include "memory/allocation.hpp" #include "memory/allocation.inline.hpp" +#include "memory/resourceArea.hpp" #include "runtime/mutex.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/orderAccess.inline.hpp" @@ -404,12 +405,15 @@ for (uint t = 0; t < workers(); t += 1) { set_thread(t, GCTaskThread::create(this, t, processor_assignment[t])); } - if (TraceGCTaskThread) { - tty->print("GCTaskManager::initialize: distribution:"); + LogHandle(gc, task, thread) log; + if (log.is_trace()) { + ResourceMark rm; + outputStream* out = log.trace_stream(); + out->print("GCTaskManager::initialize: distribution:"); for (uint t = 0; t < workers(); t += 1) { - tty->print(" %u", processor_assignment[t]); + out->print(" %u", processor_assignment[t]); } - tty->cr(); + out->cr(); } FREE_C_HEAP_ARRAY(uint, processor_assignment); }
--- a/src/share/vm/gc/parallel/gcTaskThread.cpp Fri Apr 01 03:33:39 2016 +0000 +++ b/src/share/vm/gc/parallel/gcTaskThread.cpp Fri Apr 01 07:08:30 2016 +0200 @@ -107,10 +107,7 @@ this->initialize_named_thread(); // Bind yourself to your processor. if (processor_id() != GCTaskManager::sentinel_worker()) { - if (TraceGCTaskThread) { - tty->print_cr("GCTaskThread::run: " - " binding to processor %u", processor_id()); - } + log_trace(gc, task, thread)("GCTaskThread::run: binding to processor %u", processor_id()); if (!os::bind_to_processor(processor_id())) { DEBUG_ONLY( log_warning(gc)("Couldn't bind GCTaskThread %u to processor %u",
--- a/src/share/vm/runtime/globals.hpp Fri Apr 01 03:33:39 2016 +0000 +++ b/src/share/vm/runtime/globals.hpp Fri Apr 01 07:08:30 2016 +0200 @@ -2411,9 +2411,6 @@ develop(bool, TraceGCTaskQueue, false, \ "Trace actions of the GC task queues") \ \ - diagnostic(bool, TraceGCTaskThread, false, \ - "Trace actions of the GC task threads") \ - \ develop(bool, TraceParallelOldGCMarkingPhase, false, \ "Trace marking phase in ParallelOldGC") \ \