< prev index next >

src/hotspot/share/gc/shared/gcTraceSend.cpp

Print this page
rev 53385 : [mq]: 8217374-rename-g1evacuationinfo


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/copyFailedInfo.hpp"
  27 #include "gc/shared/gcHeapSummary.hpp"
  28 #include "gc/shared/gcTimer.hpp"
  29 #include "gc/shared/gcTrace.hpp"
  30 #include "gc/shared/gcWhen.hpp"
  31 #include "jfr/jfrEvents.hpp"
  32 #include "runtime/os.hpp"
  33 #include "utilities/macros.hpp"
  34 #if INCLUDE_G1GC
  35 #include "gc/g1/evacuationInfo.hpp"
  36 #include "gc/g1/g1YCTypes.hpp"
  37 #endif
  38 
  39 // All GC dependencies against the trace framework is contained within this file.
  40 
  41 typedef uintptr_t TraceAddress;
  42 
  43 void GCTracer::send_garbage_collection_event() const {
  44   EventGarbageCollection event(UNTIMED);
  45   if (event.should_commit()) {
  46     event.set_gcId(GCId::current());
  47     event.set_name(_shared_gc_info.name());
  48     event.set_cause((u2) _shared_gc_info.cause());
  49     event.set_sumOfPauses(_shared_gc_info.sum_of_pauses());
  50     event.set_longestPause(_shared_gc_info.longest_pause());
  51     event.set_starttime(_shared_gc_info.start_timestamp());
  52     event.set_endtime(_shared_gc_info.end_timestamp());
  53     event.commit();
  54   }
  55 }


 192   if (e.should_commit()) {
 193     e.set_gcId(GCId::current());
 194     e.set_type(_g1_young_gc_info.type());
 195     e.set_starttime(_shared_gc_info.start_timestamp());
 196     e.set_endtime(_shared_gc_info.end_timestamp());
 197     e.commit();
 198   }
 199 }
 200 
 201 void G1MMUTracer::send_g1_mmu_event(double time_slice_ms, double gc_time_ms, double max_time_ms) {
 202   EventG1MMU e;
 203   if (e.should_commit()) {
 204     e.set_gcId(GCId::current());
 205     e.set_timeSlice(time_slice_ms);
 206     e.set_gcTime(gc_time_ms);
 207     e.set_pauseTarget(max_time_ms);
 208     e.commit();
 209   }
 210 }
 211 
 212 void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
 213   EventEvacuationInformation e;
 214   if (e.should_commit()) {
 215     e.set_gcId(GCId::current());
 216     e.set_cSetRegions(info->collectionset_regions());
 217     e.set_cSetUsedBefore(info->collectionset_used_before());
 218     e.set_cSetUsedAfter(info->collectionset_used_after());
 219     e.set_allocationRegions(info->allocation_regions());
 220     e.set_allocationRegionsUsedBefore(info->alloc_regions_used_before());
 221     e.set_allocationRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_copied());
 222     e.set_bytesCopied(info->bytes_copied());
 223     e.set_regionsFreed(info->regions_freed());
 224     e.commit();
 225   }
 226 }
 227 
 228 void G1NewTracer::send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const {
 229   EventEvacuationFailed e;
 230   if (e.should_commit()) {
 231     e.set_gcId(GCId::current());
 232     e.set_evacuationFailed(to_struct(ef_info));




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/copyFailedInfo.hpp"
  27 #include "gc/shared/gcHeapSummary.hpp"
  28 #include "gc/shared/gcTimer.hpp"
  29 #include "gc/shared/gcTrace.hpp"
  30 #include "gc/shared/gcWhen.hpp"
  31 #include "jfr/jfrEvents.hpp"
  32 #include "runtime/os.hpp"
  33 #include "utilities/macros.hpp"
  34 #if INCLUDE_G1GC
  35 #include "gc/g1/g1EvacuationInfo.hpp"
  36 #include "gc/g1/g1YCTypes.hpp"
  37 #endif
  38 
  39 // All GC dependencies against the trace framework is contained within this file.
  40 
  41 typedef uintptr_t TraceAddress;
  42 
  43 void GCTracer::send_garbage_collection_event() const {
  44   EventGarbageCollection event(UNTIMED);
  45   if (event.should_commit()) {
  46     event.set_gcId(GCId::current());
  47     event.set_name(_shared_gc_info.name());
  48     event.set_cause((u2) _shared_gc_info.cause());
  49     event.set_sumOfPauses(_shared_gc_info.sum_of_pauses());
  50     event.set_longestPause(_shared_gc_info.longest_pause());
  51     event.set_starttime(_shared_gc_info.start_timestamp());
  52     event.set_endtime(_shared_gc_info.end_timestamp());
  53     event.commit();
  54   }
  55 }


 192   if (e.should_commit()) {
 193     e.set_gcId(GCId::current());
 194     e.set_type(_g1_young_gc_info.type());
 195     e.set_starttime(_shared_gc_info.start_timestamp());
 196     e.set_endtime(_shared_gc_info.end_timestamp());
 197     e.commit();
 198   }
 199 }
 200 
 201 void G1MMUTracer::send_g1_mmu_event(double time_slice_ms, double gc_time_ms, double max_time_ms) {
 202   EventG1MMU e;
 203   if (e.should_commit()) {
 204     e.set_gcId(GCId::current());
 205     e.set_timeSlice(time_slice_ms);
 206     e.set_gcTime(gc_time_ms);
 207     e.set_pauseTarget(max_time_ms);
 208     e.commit();
 209   }
 210 }
 211 
 212 void G1NewTracer::send_evacuation_info_event(G1EvacuationInfo* info) {
 213   EventEvacuationInformation e;
 214   if (e.should_commit()) {
 215     e.set_gcId(GCId::current());
 216     e.set_cSetRegions(info->collectionset_regions());
 217     e.set_cSetUsedBefore(info->collectionset_used_before());
 218     e.set_cSetUsedAfter(info->collectionset_used_after());
 219     e.set_allocationRegions(info->allocation_regions());
 220     e.set_allocationRegionsUsedBefore(info->alloc_regions_used_before());
 221     e.set_allocationRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_copied());
 222     e.set_bytesCopied(info->bytes_copied());
 223     e.set_regionsFreed(info->regions_freed());
 224     e.commit();
 225   }
 226 }
 227 
 228 void G1NewTracer::send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const {
 229   EventEvacuationFailed e;
 230   if (e.should_commit()) {
 231     e.set_gcId(GCId::current());
 232     e.set_evacuationFailed(to_struct(ef_info));


< prev index next >