106 };
107
108 //
109 // A single VMThread (the primordial thread) spawns all other threads
110 // and is itself used by other threads to offload heavy vm operations
111 // like scavenge, garbage_collect etc.
112 //
113
114 class VMThread: public NamedThread {
115 private:
116 static ThreadPriority _current_priority;
117
118 static bool _should_terminate;
119 static bool _terminated;
120 static Monitor * _terminate_lock;
121 static PerfCounter* _perf_accumulated_vm_operation_time;
122 static uint64_t _coalesced_count;
123
124 static VMOperationTimeoutTask* _timeout_task;
125
126 static VM_Operation* no_op_safepoint(bool check_time);
127
128 void evaluate_operation(VM_Operation* op);
129
130 public:
131 // Constructor
132 VMThread();
133
134 // No destruction allowed
135 ~VMThread() {
136 guarantee(false, "VMThread deletion must fix the race with VM termination");
137 }
138
139
140 // Tester
141 bool is_VM_thread() const { return true; }
142 bool is_GC_thread() const { return true; }
143
144 // The ever running loop for the VMThread
145 void loop();
146
|
106 };
107
108 //
109 // A single VMThread (the primordial thread) spawns all other threads
110 // and is itself used by other threads to offload heavy vm operations
111 // like scavenge, garbage_collect etc.
112 //
113
114 class VMThread: public NamedThread {
115 private:
116 static ThreadPriority _current_priority;
117
118 static bool _should_terminate;
119 static bool _terminated;
120 static Monitor * _terminate_lock;
121 static PerfCounter* _perf_accumulated_vm_operation_time;
122 static uint64_t _coalesced_count;
123
124 static VMOperationTimeoutTask* _timeout_task;
125
126 static VM_Operation* no_op_safepoint();
127
128 void evaluate_operation(VM_Operation* op);
129
130 public:
131 // Constructor
132 VMThread();
133
134 // No destruction allowed
135 ~VMThread() {
136 guarantee(false, "VMThread deletion must fix the race with VM termination");
137 }
138
139
140 // Tester
141 bool is_VM_thread() const { return true; }
142 bool is_GC_thread() const { return true; }
143
144 // The ever running loop for the VMThread
145 void loop();
146
|