< prev index next >

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

Print this page

        

*** 42,52 **** typedef uintptr_t TraceAddress; void GCTracer::send_garbage_collection_event() const { EventGCGarbageCollection event(UNTIMED); if (event.should_commit()) { ! event.set_gcId(_shared_gc_info.gc_id().id()); event.set_name(_shared_gc_info.name()); event.set_cause((u2) _shared_gc_info.cause()); event.set_sumOfPauses(_shared_gc_info.sum_of_pauses()); event.set_longestPause(_shared_gc_info.longest_pause()); event.set_starttime(_shared_gc_info.start_timestamp()); --- 42,52 ---- typedef uintptr_t TraceAddress; void GCTracer::send_garbage_collection_event() const { EventGCGarbageCollection event(UNTIMED); if (event.should_commit()) { ! event.set_gcId(GCId::current()); event.set_name(_shared_gc_info.name()); event.set_cause((u2) _shared_gc_info.cause()); event.set_sumOfPauses(_shared_gc_info.sum_of_pauses()); event.set_longestPause(_shared_gc_info.longest_pause()); event.set_starttime(_shared_gc_info.start_timestamp());
*** 56,77 **** } void GCTracer::send_reference_stats_event(ReferenceType type, size_t count) const { EventGCReferenceStatistics e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_type((u1)type); e.set_count(count); e.commit(); } } void GCTracer::send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const { EventMetaspaceChunkFreeListSummary e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_when(when); e.set_metadataType(mdtype); e.set_specializedChunks(summary.num_specialized_chunks()); e.set_specializedChunksTotalSize(summary.specialized_chunks_size_in_bytes()); --- 56,77 ---- } void GCTracer::send_reference_stats_event(ReferenceType type, size_t count) const { EventGCReferenceStatistics e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_type((u1)type); e.set_count(count); e.commit(); } } void GCTracer::send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype, const MetaspaceChunkFreeListSummary& summary) const { EventMetaspaceChunkFreeListSummary e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_when(when); e.set_metadataType(mdtype); e.set_specializedChunks(summary.num_specialized_chunks()); e.set_specializedChunksTotalSize(summary.specialized_chunks_size_in_bytes());
*** 90,111 **** } void ParallelOldTracer::send_parallel_old_event() const { EventGCParallelOld e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_densePrefix((TraceAddress)_parallel_old_gc_info.dense_prefix()); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } } void YoungGCTracer::send_young_gc_event() const { EventGCYoungGarbageCollection e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_tenuringThreshold(_tenuring_threshold); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } --- 90,111 ---- } void ParallelOldTracer::send_parallel_old_event() const { EventGCParallelOld e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_densePrefix((TraceAddress)_parallel_old_gc_info.dense_prefix()); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } } void YoungGCTracer::send_young_gc_event() const { EventGCYoungGarbageCollection e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_tenuringThreshold(_tenuring_threshold); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); }
*** 123,133 **** uint age, bool tenured, size_t plab_size) const { EventPromoteObjectInNewPLAB event; if (event.should_commit()) { ! event.set_gcId(_shared_gc_info.gc_id().id()); event.set_class(klass); event.set_objectSize(obj_size); event.set_tenured(tenured); event.set_tenuringAge(age); event.set_plabSize(plab_size); --- 123,133 ---- uint age, bool tenured, size_t plab_size) const { EventPromoteObjectInNewPLAB event; if (event.should_commit()) { ! event.set_gcId(GCId::current()); event.set_class(klass); event.set_objectSize(obj_size); event.set_tenured(tenured); event.set_tenuringAge(age); event.set_plabSize(plab_size);
*** 138,148 **** void YoungGCTracer::send_promotion_outside_plab_event(Klass* klass, size_t obj_size, uint age, bool tenured) const { EventPromoteObjectOutsidePLAB event; if (event.should_commit()) { ! event.set_gcId(_shared_gc_info.gc_id().id()); event.set_class(klass); event.set_objectSize(obj_size); event.set_tenured(tenured); event.set_tenuringAge(age); event.commit(); --- 138,148 ---- void YoungGCTracer::send_promotion_outside_plab_event(Klass* klass, size_t obj_size, uint age, bool tenured) const { EventPromoteObjectOutsidePLAB event; if (event.should_commit()) { ! event.set_gcId(GCId::current()); event.set_class(klass); event.set_objectSize(obj_size); event.set_tenured(tenured); event.set_tenuringAge(age); event.commit();
*** 150,160 **** } void OldGCTracer::send_old_gc_event() const { EventGCOldGarbageCollection e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } } --- 150,160 ---- } void OldGCTracer::send_old_gc_event() const { EventGCOldGarbageCollection e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } }
*** 169,221 **** } void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const { EventPromotionFailed e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_data(to_trace_struct(pf_info)); e.set_thread(pf_info.thread()->thread_id()); e.commit(); } } // Common to CMS and G1 void OldGCTracer::send_concurrent_mode_failure_event() { EventConcurrentModeFailure e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.commit(); } } #if INCLUDE_ALL_GCS void G1NewTracer::send_g1_young_gc_event() { EventGCG1GarbageCollection e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_type(_g1_young_gc_info.type()); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } } ! void G1MMUTracer::send_g1_mmu_event(const GCId& gcId, double timeSlice, double gcTime, double maxTime) { EventGCG1MMU e; if (e.should_commit()) { ! e.set_gcId(gcId.id()); e.set_timeSlice(timeSlice); e.set_gcTime(gcTime); e.set_maxGcTime(maxTime); e.commit(); } } void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) { EventEvacuationInfo e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_cSetRegions(info->collectionset_regions()); e.set_cSetUsedBefore(info->collectionset_used_before()); e.set_cSetUsedAfter(info->collectionset_used_after()); e.set_allocationRegions(info->allocation_regions()); e.set_allocRegionsUsedBefore(info->alloc_regions_used_before()); --- 169,221 ---- } void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const { EventPromotionFailed e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_data(to_trace_struct(pf_info)); e.set_thread(pf_info.thread()->thread_id()); e.commit(); } } // Common to CMS and G1 void OldGCTracer::send_concurrent_mode_failure_event() { EventConcurrentModeFailure e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.commit(); } } #if INCLUDE_ALL_GCS void G1NewTracer::send_g1_young_gc_event() { EventGCG1GarbageCollection e(UNTIMED); if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_type(_g1_young_gc_info.type()); e.set_starttime(_shared_gc_info.start_timestamp()); e.set_endtime(_shared_gc_info.end_timestamp()); e.commit(); } } ! void G1MMUTracer::send_g1_mmu_event(double timeSlice, double gcTime, double maxTime) { EventGCG1MMU e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_timeSlice(timeSlice); e.set_gcTime(gcTime); e.set_maxGcTime(maxTime); e.commit(); } } void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) { EventEvacuationInfo e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_cSetRegions(info->collectionset_regions()); e.set_cSetUsedBefore(info->collectionset_used_before()); e.set_cSetUsedAfter(info->collectionset_used_after()); e.set_allocationRegions(info->allocation_regions()); e.set_allocRegionsUsedBefore(info->alloc_regions_used_before());
*** 227,237 **** } void G1NewTracer::send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const { EventEvacuationFailed e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_data(to_trace_struct(ef_info)); e.commit(); } } --- 227,237 ---- } void G1NewTracer::send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const { EventEvacuationFailed e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_data(to_trace_struct(ef_info)); e.commit(); } }
*** 251,269 **** } void G1NewTracer::send_young_evacuation_statistics(const G1EvacSummary& summary) const { EventGCG1EvacuationYoungStatistics surv_evt; if (surv_evt.should_commit()) { ! surv_evt.set_stats(create_g1_evacstats(_shared_gc_info.gc_id().id(), summary)); surv_evt.commit(); } } void G1NewTracer::send_old_evacuation_statistics(const G1EvacSummary& summary) const { EventGCG1EvacuationOldStatistics old_evt; if (old_evt.should_commit()) { ! old_evt.set_stats(create_g1_evacstats(_shared_gc_info.gc_id().id(), summary)); old_evt.commit(); } } #endif --- 251,269 ---- } void G1NewTracer::send_young_evacuation_statistics(const G1EvacSummary& summary) const { EventGCG1EvacuationYoungStatistics surv_evt; if (surv_evt.should_commit()) { ! surv_evt.set_stats(create_g1_evacstats(GCId::current(), summary)); surv_evt.commit(); } } void G1NewTracer::send_old_evacuation_statistics(const G1EvacSummary& summary) const { EventGCG1EvacuationOldStatistics old_evt; if (old_evt.should_commit()) { ! old_evt.set_stats(create_g1_evacstats(GCId::current(), summary)); old_evt.commit(); } } #endif
*** 285,305 **** space.set_size(summary.size()); return space; } class GCHeapSummaryEventSender : public GCHeapSummaryVisitor { - GCId _gc_id; GCWhen::Type _when; public: ! GCHeapSummaryEventSender(GCId gc_id, GCWhen::Type when) : _gc_id(gc_id), _when(when) {} void visit(const GCHeapSummary* heap_summary) const { const VirtualSpaceSummary& heap_space = heap_summary->heap(); EventGCHeapSummary e; if (e.should_commit()) { ! e.set_gcId(_gc_id.id()); e.set_when((u1)_when); e.set_heapSpace(to_trace_struct(heap_space)); e.set_heapUsed(heap_summary->used()); e.commit(); } --- 285,304 ---- space.set_size(summary.size()); return space; } class GCHeapSummaryEventSender : public GCHeapSummaryVisitor { GCWhen::Type _when; public: ! GCHeapSummaryEventSender(GCWhen::Type when) : _when(when) {} void visit(const GCHeapSummary* heap_summary) const { const VirtualSpaceSummary& heap_space = heap_summary->heap(); EventGCHeapSummary e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_when((u1)_when); e.set_heapSpace(to_trace_struct(heap_space)); e.set_heapUsed(heap_summary->used()); e.commit(); }
*** 308,318 **** void visit(const G1HeapSummary* g1_heap_summary) const { visit((GCHeapSummary*)g1_heap_summary); EventG1HeapSummary e; if (e.should_commit()) { ! e.set_gcId(_gc_id.id()); e.set_when((u1)_when); e.set_edenUsedSize(g1_heap_summary->edenUsed()); e.set_edenTotalSize(g1_heap_summary->edenCapacity()); e.set_survivorUsedSize(g1_heap_summary->survivorUsed()); e.commit(); --- 307,317 ---- void visit(const G1HeapSummary* g1_heap_summary) const { visit((GCHeapSummary*)g1_heap_summary); EventG1HeapSummary e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_when((u1)_when); e.set_edenUsedSize(g1_heap_summary->edenUsed()); e.set_edenTotalSize(g1_heap_summary->edenCapacity()); e.set_survivorUsedSize(g1_heap_summary->survivorUsed()); e.commit();
*** 329,339 **** const SpaceSummary& from_space = ps_heap_summary->from(); const SpaceSummary& to_space = ps_heap_summary->to(); EventPSHeapSummary e; if (e.should_commit()) { ! e.set_gcId(_gc_id.id()); e.set_when((u1)_when); e.set_oldSpace(to_trace_struct(ps_heap_summary->old())); e.set_oldObjectSpace(to_trace_struct(ps_heap_summary->old_space())); e.set_youngSpace(to_trace_struct(ps_heap_summary->young())); --- 328,338 ---- const SpaceSummary& from_space = ps_heap_summary->from(); const SpaceSummary& to_space = ps_heap_summary->to(); EventPSHeapSummary e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_when((u1)_when); e.set_oldSpace(to_trace_struct(ps_heap_summary->old())); e.set_oldObjectSpace(to_trace_struct(ps_heap_summary->old_space())); e.set_youngSpace(to_trace_struct(ps_heap_summary->young()));
*** 344,354 **** } } }; void GCTracer::send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const { ! GCHeapSummaryEventSender visitor(_shared_gc_info.gc_id(), when); heap_summary.accept(&visitor); } static TraceStructMetaspaceSizes to_trace_struct(const MetaspaceSizes& sizes) { TraceStructMetaspaceSizes meta_sizes; --- 343,353 ---- } } }; void GCTracer::send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary& heap_summary) const { ! GCHeapSummaryEventSender visitor(when); heap_summary.accept(&visitor); } static TraceStructMetaspaceSizes to_trace_struct(const MetaspaceSizes& sizes) { TraceStructMetaspaceSizes meta_sizes;
*** 361,390 **** } void GCTracer::send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const { EventMetaspaceSummary e; if (e.should_commit()) { ! e.set_gcId(_shared_gc_info.gc_id().id()); e.set_when((u1) when); e.set_gcThreshold(meta_space_summary.capacity_until_GC()); e.set_metaspace(to_trace_struct(meta_space_summary.meta_space())); e.set_dataSpace(to_trace_struct(meta_space_summary.data_space())); e.set_classSpace(to_trace_struct(meta_space_summary.class_space())); e.commit(); } } class PhaseSender : public PhaseVisitor { - GCId _gc_id; public: - PhaseSender(GCId gc_id) : _gc_id(gc_id) {} - template<typename T> void send_phase(PausePhase* pause) { T event(UNTIMED); if (event.should_commit()) { ! event.set_gcId(_gc_id.id()); event.set_name(pause->name()); event.set_starttime(pause->start()); event.set_endtime(pause->end()); event.commit(); } --- 360,386 ---- } void GCTracer::send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const { EventMetaspaceSummary e; if (e.should_commit()) { ! e.set_gcId(GCId::current()); e.set_when((u1) when); e.set_gcThreshold(meta_space_summary.capacity_until_GC()); e.set_metaspace(to_trace_struct(meta_space_summary.meta_space())); e.set_dataSpace(to_trace_struct(meta_space_summary.data_space())); e.set_classSpace(to_trace_struct(meta_space_summary.class_space())); e.commit(); } } class PhaseSender : public PhaseVisitor { public: template<typename T> void send_phase(PausePhase* pause) { T event(UNTIMED); if (event.should_commit()) { ! event.set_gcId(GCId::current()); event.set_name(pause->name()); event.set_starttime(pause->start()); event.set_endtime(pause->end()); event.commit(); }
*** 404,414 **** } } }; void GCTracer::send_phase_events(TimePartitions* time_partitions) const { ! PhaseSender phase_reporter(_shared_gc_info.gc_id()); TimePartitionPhasesIterator iter(time_partitions); while (iter.has_next()) { GCPhase* phase = iter.next(); phase->accept(&phase_reporter); --- 400,410 ---- } } }; void GCTracer::send_phase_events(TimePartitions* time_partitions) const { ! PhaseSender phase_reporter; TimePartitionPhasesIterator iter(time_partitions); while (iter.has_next()) { GCPhase* phase = iter.next(); phase->accept(&phase_reporter);
< prev index next >