1.1 --- a/src/share/vm/runtime/serviceThread.cpp Wed May 01 09:00:39 2013 -0700 1.2 +++ b/src/share/vm/runtime/serviceThread.cpp Fri May 03 05:05:31 2013 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -29,6 +29,8 @@ 1.11 #include "runtime/mutexLocker.hpp" 1.12 #include "prims/jvmtiImpl.hpp" 1.13 #include "services/gcNotifier.hpp" 1.14 +#include "services/diagnosticArgument.hpp" 1.15 +#include "services/diagnosticFramework.hpp" 1.16 1.17 ServiceThread* ServiceThread::_instance = NULL; 1.18 1.19 @@ -83,6 +85,7 @@ 1.20 bool sensors_changed = false; 1.21 bool has_jvmti_events = false; 1.22 bool has_gc_notification_event = false; 1.23 + bool has_dcmd_notification_event = false; 1.24 JvmtiDeferredEvent jvmti_event; 1.25 { 1.26 // Need state transition ThreadBlockInVM so that this thread 1.27 @@ -98,7 +101,8 @@ 1.28 MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag); 1.29 while (!(sensors_changed = LowMemoryDetector::has_pending_requests()) && 1.30 !(has_jvmti_events = JvmtiDeferredEventQueue::has_events()) && 1.31 - !(has_gc_notification_event = GCNotifier::has_event())) { 1.32 + !(has_gc_notification_event = GCNotifier::has_event()) && 1.33 + !(has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification())) { 1.34 // wait until one of the sensors has pending requests, or there is a 1.35 // pending JVMTI event or JMX GC notification to post 1.36 Service_lock->wait(Mutex::_no_safepoint_check_flag); 1.37 @@ -120,6 +124,10 @@ 1.38 if(has_gc_notification_event) { 1.39 GCNotifier::sendNotification(CHECK); 1.40 } 1.41 + 1.42 + if(has_dcmd_notification_event) { 1.43 + DCmdFactory::send_notification(CHECK); 1.44 + } 1.45 } 1.46 } 1.47