changeset 8445:a20b51d96bf3

8080869: FlexibleWorkGang initializes _active_workers to more than _total_workers Reviewed-by: kbarrett, jmasa
author stefank
date Thu, 21 May 2015 14:10:15 +0200
parents 3e9cfe1b6af3
children 824abbd9bbf9
files src/share/vm/gc/shared/workgroup.hpp
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/shared/workgroup.hpp	Thu May 21 09:35:59 2015 +0200
+++ b/src/share/vm/gc/shared/workgroup.hpp	Thu May 21 14:10:15 2015 +0200
@@ -315,15 +315,13 @@
   uint _active_workers;
  public:
   // Constructor and destructor.
-  // Initialize active_workers to a minimum value.  Setting it to
-  // the parameter "workers" will initialize it to a maximum
-  // value which is not desirable.
   FlexibleWorkGang(const char* name, uint workers,
                    bool are_GC_task_threads,
                    bool  are_ConcurrentGC_threads) :
     WorkGang(name, workers, are_GC_task_threads, are_ConcurrentGC_threads),
-    _active_workers(UseDynamicNumberOfGCThreads ? 1U : ParallelGCThreads) {}
-  // Accessors for fields
+    _active_workers(UseDynamicNumberOfGCThreads ? 1U : workers) {}
+
+  // Accessors for fields.
   virtual uint active_workers() const { return _active_workers; }
   void set_active_workers(uint v) {
     assert(v <= _total_workers,