--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Tue Feb 23 10:44:05 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Tue Feb 23 14:14:29 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());
--- a/hotspot/src/share/vm/gc/shared/workgroup.hpp Tue Feb 23 10:44:05 2016 +0100
+++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp Tue Feb 23 14:14:29 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.