src/share/vm/utilities/workgroup.cpp

Print this page
rev 6521 : 8044775: Improve usage of umbrella header atomic.inline.hpp.
Reviewed-by: stefank, kvn


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.hpp"
  27 #include "memory/allocation.inline.hpp"

  28 #include "runtime/os.hpp"
  29 #include "utilities/workgroup.hpp"
  30 
  31 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  32 
  33 // Definitions of WorkGang methods.
  34 
  35 AbstractWorkGang::AbstractWorkGang(const char* name,
  36                                    bool  are_GC_task_threads,
  37                                    bool  are_ConcurrentGC_threads) :
  38   _name(name),
  39   _are_GC_task_threads(are_GC_task_threads),
  40   _are_ConcurrentGC_threads(are_ConcurrentGC_threads) {
  41 
  42   assert(!(are_GC_task_threads && are_ConcurrentGC_threads),
  43          "They cannot both be STW GC and Concurrent threads" );
  44 
  45   // Other initialization.
  46   _monitor = new Monitor(/* priority */       Mutex::leaf,
  47                          /* name */           "WorkGroup monitor",




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.hpp"
  27 #include "memory/allocation.inline.hpp"
  28 #include "runtime/atomic.inline.hpp"
  29 #include "runtime/os.hpp"
  30 #include "utilities/workgroup.hpp"
  31 
  32 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  33 
  34 // Definitions of WorkGang methods.
  35 
  36 AbstractWorkGang::AbstractWorkGang(const char* name,
  37                                    bool  are_GC_task_threads,
  38                                    bool  are_ConcurrentGC_threads) :
  39   _name(name),
  40   _are_GC_task_threads(are_GC_task_threads),
  41   _are_ConcurrentGC_threads(are_ConcurrentGC_threads) {
  42 
  43   assert(!(are_GC_task_threads && are_ConcurrentGC_threads),
  44          "They cannot both be STW GC and Concurrent threads" );
  45 
  46   // Other initialization.
  47   _monitor = new Monitor(/* priority */       Mutex::leaf,
  48                          /* name */           "WorkGroup monitor",