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 #ifndef SHARE_GC_SHARED_WORKERMANAGER_HPP
26 #define SHARE_GC_SHARED_WORKERMANAGER_HPP
27
28 #include "logging/log.hpp"
29 #include "memory/allocation.hpp"
30 #include "runtime/os.inline.hpp"
31 #include "runtime/thread.inline.hpp"
32 #include "utilities/globalDefinitions.hpp"
33
34 class WorkerManager : public AllStatic {
35 public:
36 // Create additional workers as needed.
37 // active_workers - number of workers being requested for an upcoming
38 // parallel task.
39 // total_workers - total number of workers. This is the maximum
40 // number possible.
41 // created_workers - number of workers already created. This maybe
42 // less than, equal to, or greater than active workers. If greater than
43 // or equal to active_workers, nothing is done.
44 // worker_type - type of thread.
45 // initializing - true if this is called to get the initial number of
46 // GC workers.
47 // If initializing is true, do a vm exit if the workers cannot be created.
48 // The initializing = true case is for JVM start up and failing to
49 // create all the worker at start should considered a problem so exit.
50 // If initializing = false, there are already some number of worker
51 // threads and a failure would not be optimal but should not be fatal.
|
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 #ifndef SHARE_GC_SHARED_WORKERMANAGER_HPP
26 #define SHARE_GC_SHARED_WORKERMANAGER_HPP
27
28 #include "logging/log.hpp"
29 #include "memory/allocation.hpp"
30 #include "runtime/os.hpp"
31 #include "runtime/thread.hpp"
32 #include "utilities/globalDefinitions.hpp"
33
34 class WorkerManager : public AllStatic {
35 public:
36 // Create additional workers as needed.
37 // active_workers - number of workers being requested for an upcoming
38 // parallel task.
39 // total_workers - total number of workers. This is the maximum
40 // number possible.
41 // created_workers - number of workers already created. This maybe
42 // less than, equal to, or greater than active workers. If greater than
43 // or equal to active_workers, nothing is done.
44 // worker_type - type of thread.
45 // initializing - true if this is called to get the initial number of
46 // GC workers.
47 // If initializing is true, do a vm exit if the workers cannot be created.
48 // The initializing = true case is for JVM start up and failing to
49 // create all the worker at start should considered a problem so exit.
50 // If initializing = false, there are already some number of worker
51 // threads and a failure would not be optimal but should not be fatal.
|