8153582: Logging of ConcGCThreads is done too early
authorjprovino
Thu, 19 May 2016 10:48:28 -0400
changeset 38637 dba1e7561542
parent 38636 0a04aee4e7a6
child 38638 c053db913695
8153582: Logging of ConcGCThreads is done too early Summary: ConcGCThreads is logged as 0 because it hasn't been initialized yet. Reviewed-by: tschatzl, dfazunen
hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
hotspot/src/share/vm/runtime/arguments.cpp
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Thu May 19 11:43:21 2016 +0200
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Thu May 19 10:48:28 2016 -0400
@@ -545,6 +545,8 @@
   }
   assert((_conc_workers != NULL) == (ConcGCThreads > 1),
          "Inconsistency");
+  log_debug(gc)("ConcGCThreads: %u", ConcGCThreads);
+  log_debug(gc)("ParallelGCThreads: %u", ParallelGCThreads);
 
   // Parallel task queues; these are shared for the
   // concurrent and stop-world phases of CMS, but
--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Thu May 19 11:43:21 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Thu May 19 10:48:28 2016 -0400
@@ -438,6 +438,8 @@
   }
 
   assert(ConcGCThreads > 0, "Should have been set");
+  log_debug(gc)("ConcGCThreads: %u", ConcGCThreads);
+  log_debug(gc)("ParallelGCThreads: %u", ParallelGCThreads);
   _parallel_marking_threads = ConcGCThreads;
   _max_parallel_marking_threads = _parallel_marking_threads;
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu May 19 11:43:21 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu May 19 10:48:28 2016 -0400
@@ -1641,7 +1641,6 @@
   }
 
   log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
-  log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
 }
 #endif // INCLUDE_ALL_GCS
 
@@ -1949,7 +1948,6 @@
   }
 
   log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
-  log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
 }
 
 void Arguments::set_gc_specific_flags() {