< prev index next >

src/hotspot/share/services/gcNotifier.cpp

Print this page




 142                             &argsInt,
 143                             CHECK_NH);
 144 
 145   extra_array->obj_at_put(0,extra_arg_val());
 146 
 147   InstanceKlass* gcInfoklass = Management::com_sun_management_GcInfo_klass(CHECK_NH);
 148 
 149   JavaCallArguments constructor_args(16);
 150   constructor_args.push_oop(getGcInfoBuilder(gcManager,THREAD));
 151   constructor_args.push_long(gcStatInfo->gc_index());
 152   constructor_args.push_long(Management::ticks_to_ms(gcStatInfo->start_time()));
 153   constructor_args.push_long(Management::ticks_to_ms(gcStatInfo->end_time()));
 154   constructor_args.push_oop(usage_before_gc_ah);
 155   constructor_args.push_oop(usage_after_gc_ah);
 156   constructor_args.push_oop(extra_array);
 157 
 158   return JavaCalls::construct_new_instance(
 159                           gcInfoklass,
 160                           vmSymbols::com_sun_management_GcInfo_constructor_signature(),
 161                           &constructor_args,
 162                           CHECK_NH);
 163 }
 164 
 165 void GCNotifier::sendNotification(TRAPS) {
 166   GCNotifier::sendNotificationInternal(THREAD);
 167   // Clearing pending exception to avoid premature termination of
 168   // the service thread
 169   if (HAS_PENDING_EXCEPTION) {
 170     CLEAR_PENDING_EXCEPTION;
 171   }
 172 }
 173 
 174 class NotificationMark : public StackObj {
 175   // This class is used in GCNotifier::sendNotificationInternal to ensure that
 176   // the GCNotificationRequest object is properly cleaned up, whatever path
 177   // is used to exit the method.
 178   GCNotificationRequest* _request;
 179 public:
 180   NotificationMark(GCNotificationRequest* r) {
 181     _request = r;
 182   }




 142                             &argsInt,
 143                             CHECK_NH);
 144 
 145   extra_array->obj_at_put(0,extra_arg_val());
 146 
 147   InstanceKlass* gcInfoklass = Management::com_sun_management_GcInfo_klass(CHECK_NH);
 148 
 149   JavaCallArguments constructor_args(16);
 150   constructor_args.push_oop(getGcInfoBuilder(gcManager,THREAD));
 151   constructor_args.push_long(gcStatInfo->gc_index());
 152   constructor_args.push_long(Management::ticks_to_ms(gcStatInfo->start_time()));
 153   constructor_args.push_long(Management::ticks_to_ms(gcStatInfo->end_time()));
 154   constructor_args.push_oop(usage_before_gc_ah);
 155   constructor_args.push_oop(usage_after_gc_ah);
 156   constructor_args.push_oop(extra_array);
 157 
 158   return JavaCalls::construct_new_instance(
 159                           gcInfoklass,
 160                           vmSymbols::com_sun_management_GcInfo_constructor_signature(),
 161                           &constructor_args,
 162                           THREAD);
 163 }
 164 
 165 void GCNotifier::sendNotification(TRAPS) {
 166   GCNotifier::sendNotificationInternal(THREAD);
 167   // Clearing pending exception to avoid premature termination of
 168   // the service thread
 169   if (HAS_PENDING_EXCEPTION) {
 170     CLEAR_PENDING_EXCEPTION;
 171   }
 172 }
 173 
 174 class NotificationMark : public StackObj {
 175   // This class is used in GCNotifier::sendNotificationInternal to ensure that
 176   // the GCNotificationRequest object is properly cleaned up, whatever path
 177   // is used to exit the method.
 178   GCNotificationRequest* _request;
 179 public:
 180   NotificationMark(GCNotificationRequest* r) {
 181     _request = r;
 182   }


< prev index next >