void NotificationThread::notification_thread_entry(JavaThread* jt, TRAPS) { while (true) { bool sensors_changed = false; bool has_dcmd_notification_event = false; bool has_gc_notification_event = false;
{ // Need state transition ThreadBlockInVM so that this thread // will be handled by safepoint correctly when this thread is // notified at a safepoint.
ThreadBlockInVM tbivm(jt);
MonitorLocker ml(Notification_lock, Mutex::_no_safepoint_check_flag); // Process all available work on each (outer) iteration, rather than // only the first recognized bit of work, to avoid frequently true early // tests from potentially starving later work. Hence the use of // arithmetic-or to combine results; we don't want short-circuiting. while (((sensors_changed = LowMemoryDetector::has_pending_requests()) |
(has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification()) |
(has_gc_notification_event = GCNotifier::has_event()))
== 0) { // Wait until notified that there is some work to do.
ml.wait(0);
}
}
if (sensors_changed) {
LowMemoryDetector::process_sensor_changes(jt);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.