comparison src/share/vm/utilities/workgroup.cpp @ 2369:92da084fefc9

6668573: CMS: reference processing crash if ParallelCMSThreads > ParallelGCThreads Summary: Use _max_num_q = max(discovery_degree, processing_degree), and let balance_queues() redistribute from discovery_degree to processing_degree of queues. This should also allow a more dynamic and flexible parallelism policy in the future. Reviewed-by: jmasa, johnc
author ysr
date Thu, 17 Mar 2011 10:32:46 -0700
parents f95d63e2154a
children bca17e38de00
comparison
equal deleted inserted replaced
2368:dde920245681 2369:92da084fefc9
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
154 _task = NULL; 154 _task = NULL;
155 if (TraceWorkGang) { 155 if (TraceWorkGang) {
156 tty->print_cr("/nFinished work gang %s: %d/%d sequence %d", 156 tty->print_cr("/nFinished work gang %s: %d/%d sequence %d",
157 name(), finished_workers(), total_workers(), 157 name(), finished_workers(), total_workers(),
158 _sequence_number); 158 _sequence_number);
159 } 159 }
160 } 160 }
161 161
162 void AbstractWorkGang::stop() { 162 void AbstractWorkGang::stop() {
163 // Tell all workers to terminate, then wait for them to become inactive. 163 // Tell all workers to terminate, then wait for them to become inactive.
164 MutexLockerEx ml(monitor(), Mutex::_no_safepoint_check_flag); 164 MutexLockerEx ml(monitor(), Mutex::_no_safepoint_check_flag);