src/share/vm/gc_implementation/shared/gcTraceSend.cpp

Print this page
rev 4873 : 8015972: Refactor the sending of the object count after GC event


 106 
 107 void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const {
 108   EventPromotionFailed e;
 109   if (e.should_commit()) {
 110     e.set_gcId(_shared_gc_info.id());
 111     e.set_data(to_trace_struct(pf_info));
 112     e.set_thread(pf_info.thread()->thread_id());
 113     e.commit();
 114   }
 115 }
 116 
 117 // Common to CMS and G1
 118 void OldGCTracer::send_concurrent_mode_failure_event() {
 119   EventConcurrentModeFailure e;
 120   if (e.should_commit()) {
 121     e.set_gcId(_shared_gc_info.id());
 122     e.commit();
 123   }
 124 }
 125 
 126 #if INCLUDE_SERVICES
 127 void GCTracer::send_object_count_after_gc_event(Klass* klass, jlong count, julong total_size) const {
 128   EventObjectCountAfterGC e;
 129   if (e.should_commit()) {
 130     e.set_gcId(_shared_gc_info.id());
 131     e.set_class(klass);
 132     e.set_count(count);
 133     e.set_totalSize(total_size);
 134     e.commit();
 135   }
 136 }
 137 #endif
 138 
 139 bool GCTracer::should_send_object_count_after_gc_event() const {
 140 #if INCLUDE_TRACE
 141   return Tracing::is_event_enabled(EventObjectCountAfterGC::eventId);
 142 #else
 143   return false;
 144 #endif
 145 }
 146 
 147 #if INCLUDE_ALL_GCS
 148 void G1NewTracer::send_g1_young_gc_event() {
 149   EventGCG1GarbageCollection e(UNTIMED);
 150   if (e.should_commit()) {
 151     e.set_gcId(_shared_gc_info.id());
 152     e.set_type(_g1_young_gc_info.type());
 153     e.set_starttime(_shared_gc_info.start_timestamp());
 154     e.set_endtime(_shared_gc_info.end_timestamp());
 155     e.commit();
 156   }
 157 }
 158 
 159 void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
 160   EventEvacuationInfo e;
 161   if (e.should_commit()) {
 162     e.set_gcId(_shared_gc_info.id());
 163     e.set_cSetRegions(info->collectionset_regions());
 164     e.set_cSetUsedBefore(info->collectionset_used_before());
 165     e.set_cSetUsedAfter(info->collectionset_used_after());
 166     e.set_allocationRegions(info->allocation_regions());




 106 
 107 void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const {
 108   EventPromotionFailed e;
 109   if (e.should_commit()) {
 110     e.set_gcId(_shared_gc_info.id());
 111     e.set_data(to_trace_struct(pf_info));
 112     e.set_thread(pf_info.thread()->thread_id());
 113     e.commit();
 114   }
 115 }
 116 
 117 // Common to CMS and G1
 118 void OldGCTracer::send_concurrent_mode_failure_event() {
 119   EventConcurrentModeFailure e;
 120   if (e.should_commit()) {
 121     e.set_gcId(_shared_gc_info.id());
 122     e.commit();
 123   }
 124 }
 125 





















 126 #if INCLUDE_ALL_GCS
 127 void G1NewTracer::send_g1_young_gc_event() {
 128   EventGCG1GarbageCollection e(UNTIMED);
 129   if (e.should_commit()) {
 130     e.set_gcId(_shared_gc_info.id());
 131     e.set_type(_g1_young_gc_info.type());
 132     e.set_starttime(_shared_gc_info.start_timestamp());
 133     e.set_endtime(_shared_gc_info.end_timestamp());
 134     e.commit();
 135   }
 136 }
 137 
 138 void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
 139   EventEvacuationInfo e;
 140   if (e.should_commit()) {
 141     e.set_gcId(_shared_gc_info.id());
 142     e.set_cSetRegions(info->collectionset_regions());
 143     e.set_cSetUsedBefore(info->collectionset_used_before());
 144     e.set_cSetUsedAfter(info->collectionset_used_after());
 145     e.set_allocationRegions(info->allocation_regions());