< prev index next > src/hotspot/share/gc/shared/workgroup.cpp
behaviours
#include "memory/allocation.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#include "runtime/semaphore.hpp"
#include "runtime/thread.inline.hpp"
+#include "utilities/behaviours.hpp"
// Definitions of WorkGang methods.
// The current implementation will exit if the allocation
// of any worker fails.
delete _end_semaphore;
}
void coordinator_execute_on_workers(AbstractGangTask* task, uint num_workers) {
// No workers are allowed to read the state variables until they have been signaled.
+ task->set_provider(Behaviours::get_provider());
_task = task;
_not_finished = num_workers;
// Dispatch 'num_workers' number of tasks.
_start_semaphore->signal(num_workers);
}
void coordinator_execute_on_workers(AbstractGangTask* task, uint num_workers) {
MutexLockerEx ml(_monitor, Mutex::_no_safepoint_check_flag);
+ task->set_provider(Behaviours::get_provider());
_task = task;
_num_workers = num_workers;
// Tell the workers to get to work.
_monitor->notify_all();
void GangWorker::signal_task_done() {
gang()->dispatcher()->worker_done_with_task();
}
void GangWorker::run_task(WorkData data) {
+ ForwardingProviderMark behaviour_provider_mark(data._task->provider());
GCIdMark gc_id_mark(data._task->gc_id());
log_develop_trace(gc, workgang)("Running work gang: %s task: %s worker: %u", name(), data._task->name(), data._worker_id);
data._task->work(data._worker_id);
< prev index next >