src/hotspot/share/services/gcNotifier.cpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54623 1126f0607c70
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
    52   GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
    52   GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
    53   addRequest(request);
    53   addRequest(request);
    54  }
    54  }
    55 
    55 
    56 void GCNotifier::addRequest(GCNotificationRequest *request) {
    56 void GCNotifier::addRequest(GCNotificationRequest *request) {
    57   MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
    57   MutexLocker ml(Notification_lock, Mutex::_no_safepoint_check_flag);
    58   if(first_request == NULL) {
    58   if(first_request == NULL) {
    59     first_request = request;
    59     first_request = request;
    60   } else {
    60   } else {
    61     last_request->next = request;
    61     last_request->next = request;
    62   }
    62   }
    63   last_request = request;
    63   last_request = request;
    64   Service_lock->notify_all();
    64   Notification_lock->notify_all();
    65 }
    65 }
    66 
    66 
    67 GCNotificationRequest *GCNotifier::getRequest() {
    67 GCNotificationRequest *GCNotifier::getRequest() {
    68   MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
    68   MutexLocker ml(Notification_lock, Mutex::_no_safepoint_check_flag);
    69   GCNotificationRequest *request = first_request;
    69   GCNotificationRequest *request = first_request;
    70   if(first_request != NULL) {
    70   if(first_request != NULL) {
    71     first_request = first_request->next;
    71     first_request = first_request->next;
    72   }
    72   }
    73   return request;
    73   return request;
   157 
   157 
   158   return JavaCalls::construct_new_instance(
   158   return JavaCalls::construct_new_instance(
   159                           gcInfoklass,
   159                           gcInfoklass,
   160                           vmSymbols::com_sun_management_GcInfo_constructor_signature(),
   160                           vmSymbols::com_sun_management_GcInfo_constructor_signature(),
   161                           &constructor_args,
   161                           &constructor_args,
   162                           CHECK_NH);
   162                           THREAD);
   163 }
   163 }
   164 
   164 
   165 void GCNotifier::sendNotification(TRAPS) {
   165 void GCNotifier::sendNotification(TRAPS) {
   166   GCNotifier::sendNotificationInternal(THREAD);
   166   GCNotifier::sendNotificationInternal(THREAD);
   167   // Clearing pending exception to avoid premature termination of
   167   // Clearing pending exception to avoid premature termination of