# HG changeset patch # User brutisso # Date 1456217566 -3600 # Node ID 8d947f31586e32e6a1e517771908c983d52e37e0 # Parent d18466a7dcee65b8852f7d3cbc94a77f9c91176e 8150367: Add back information about the number of GC workers Reviewed-by: sjohanss, tschatzl diff -r d18466a7dcee -r 8d947f31586e hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp --- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Mon Feb 22 19:25:32 2016 +0000 +++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Tue Feb 23 09:52:46 2016 +0100 @@ -3235,10 +3235,6 @@ GCTraceCPUTime tcpu; - uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(), - workers()->active_workers(), - Threads::number_of_non_daemon_threads()); - workers()->set_active_workers(active_workers); FormatBuffer<> gc_string("Pause "); if (collector_state()->during_initial_mark_pause()) { gc_string.append("Initial Mark"); @@ -3249,6 +3245,11 @@ } GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true); + uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(), + workers()->active_workers(), + Threads::number_of_non_daemon_threads()); + workers()->set_active_workers(active_workers); + g1_policy()->note_gc_start(active_workers); TraceCollectorStats tcs(g1mm()->incremental_collection_counters()); diff -r d18466a7dcee -r 8d947f31586e hotspot/src/share/vm/gc/shared/workgroup.hpp --- a/hotspot/src/share/vm/gc/shared/workgroup.hpp Mon Feb 22 19:25:32 2016 +0000 +++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp Tue Feb 23 09:52:46 2016 +0100 @@ -29,6 +29,7 @@ #include "runtime/globals.hpp" #include "runtime/thread.hpp" #include "gc/shared/gcId.hpp" +#include "logging/log.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" @@ -151,6 +152,7 @@ _active_workers = MAX2(1U, _active_workers); assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers, "Unless dynamic should use total workers"); + log_info(gc, task)("GC Workers: %d", _active_workers); } // Return the Ith worker.