changeset 10299:c35381ecd2da

8150367: Add back information about the number of GC workers Reviewed-by: sjohanss, tschatzl
author brutisso
date Tue, 23 Feb 2016 09:52:46 +0100
parents 5624ea45bbd7
children d015eb5b230c
files src/share/vm/gc/g1/g1CollectedHeap.cpp src/share/vm/gc/shared/workgroup.hpp
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Feb 22 19:25:32 2016 +0000
+++ b/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());
--- a/src/share/vm/gc/shared/workgroup.hpp	Mon Feb 22 19:25:32 2016 +0000
+++ b/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.