61 if(initializing) {
62 vm_exit_out_of_memory(0, OOM_MALLOC_ERROR,
63 "Cannot create worker GC thread. Out of system resources.");
64 }
65 }
66 created_workers++;
67 os::start_thread(new_worker);
68 }
69
70 return created_workers;
71 }
72
73 // Log (at trace level) a change in the number of created workers.
74 template <class WorkerType>
75 static void log_worker_creation(WorkerType* holder,
76 uint previous_created_workers,
77 uint active_workers,
78 uint created_workers,
79 bool initializing) {
80 if (previous_created_workers < created_workers) {
81 const char* initializing_msg = initializing ? "Adding initial" : "";
82 log_trace(gc, task)("AdaptiveSizePolicy::add_workers() : %s "
83 "active_workers: %u created_workers: %u for %s to #%u",
84 initializing_msg, active_workers, created_workers,
85 holder->worker_name(previous_created_workers), created_workers - 1);
86 }
87 }
88 };
89 #endif // SHARE_VM_GC_SHARED_WORKERMANAGER_HPP
|
61 if(initializing) {
62 vm_exit_out_of_memory(0, OOM_MALLOC_ERROR,
63 "Cannot create worker GC thread. Out of system resources.");
64 }
65 }
66 created_workers++;
67 os::start_thread(new_worker);
68 }
69
70 return created_workers;
71 }
72
73 // Log (at trace level) a change in the number of created workers.
74 template <class WorkerType>
75 static void log_worker_creation(WorkerType* holder,
76 uint previous_created_workers,
77 uint active_workers,
78 uint created_workers,
79 bool initializing) {
80 if (previous_created_workers < created_workers) {
81 const char* initializing_msg = initializing ? "Adding initial" : "Creating additional";
82 log_trace(gc, task)("%s %s(s) active workers %u created workers %u",
83 initializing_msg, holder->group_name(), active_workers, created_workers);
84 }
85 }
86 };
87 #endif // SHARE_VM_GC_SHARED_WORKERMANAGER_HPP
|