Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/gcTraceSend.cpp @ 11113:2cbc8f3011a0
8015972: Refactor the sending of the object count after GC event
Reviewed-by: brutisso, pliden
author | ehelin |
---|---|
date | Wed, 05 Jun 2013 09:44:03 +0200 |
parents | f2110083203d |
children | f175e3678be2 |
comparison
equal
deleted
inserted
replaced
11088:ea4d24c1e0c6 | 11113:2cbc8f3011a0 |
---|---|
121 e.set_gcId(_shared_gc_info.id()); | 121 e.set_gcId(_shared_gc_info.id()); |
122 e.commit(); | 122 e.commit(); |
123 } | 123 } |
124 } | 124 } |
125 | 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 | 126 #if INCLUDE_ALL_GCS |
148 void G1NewTracer::send_g1_young_gc_event() { | 127 void G1NewTracer::send_g1_young_gc_event() { |
149 EventGCG1GarbageCollection e(UNTIMED); | 128 EventGCG1GarbageCollection e(UNTIMED); |
150 if (e.should_commit()) { | 129 if (e.should_commit()) { |
151 e.set_gcId(_shared_gc_info.id()); | 130 e.set_gcId(_shared_gc_info.id()); |