hotspot/src/share/vm/gc/shared/workgroup.hpp
changeset 30875 f98008e14939
parent 30873 4e2d1bd16703
child 30881 7a3899d7cea0
--- a/hotspot/src/share/vm/gc/shared/workgroup.hpp	Fri May 22 10:57:53 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp	Fri May 22 10:58:04 2015 +0200
@@ -322,7 +322,13 @@
     _active_workers(UseDynamicNumberOfGCThreads ? 1U : workers) {}
 
   // Accessors for fields.
-  virtual uint active_workers() const { return _active_workers; }
+  virtual uint active_workers() const {
+    assert(_active_workers <= _total_workers,
+           err_msg("_active_workers: %u > _total_workers: %u", _active_workers, _total_workers));
+    assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
+           "Unless dynamic should use total workers");
+    return _active_workers;
+  }
   void set_active_workers(uint v) {
     assert(v <= _total_workers,
            "Trying to set more workers active than there are");