< prev index next >

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

Print this page
rev 9314 : imported patch 8136679-jfr-event-for-dynamic-ihop
rev 9315 : imported patch sangheon-review

*** 33,42 **** --- 33,43 ---- #include "trace/tracing.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS #include "gc/g1/evacuationInfo.hpp" #include "gc/g1/g1YCTypes.hpp" + #include "tracefiles/traceEventClasses.hpp" #endif // All GC dependencies against the trace framework is contained within this file. typedef uintptr_t TraceAddress;
*** 263,272 **** --- 264,310 ---- if (old_evt.should_commit()) { old_evt.set_stats(create_g1_evacstats(GCId::current(), summary)); old_evt.commit(); } } + + void G1NewTracer::send_basic_ihop_statistics(size_t threshold, + size_t target_occupancy, + size_t current_occupancy, + size_t last_allocation_size, + double last_allocation_duration, + double last_marking_length) { + EventGCG1BasicIHOP evt; + if (evt.should_commit()) { + evt.set_gcId(GCId::current()); + evt.set_threshold(threshold); + evt.set_targetOccupancy(target_occupancy); + evt.set_thresholdPercentage(target_occupancy > 0 ? threshold * 100.0 / target_occupancy : 0.0); + evt.set_currentOccupancy(current_occupancy); + evt.set_lastAllocationSize(last_allocation_size); + evt.set_lastAllocationDuration(last_allocation_duration); + evt.set_lastAllocationRate(last_allocation_duration != 0.0 ? last_allocation_size / last_allocation_duration : 0.0); + evt.set_lastMarkingLength(last_marking_length); + evt.commit(); + } + } + + void G1NewTracer::send_adaptive_ihop_statistics(size_t additional_buffer_size, + double predicted_allocation_rate, + double predicted_marking_length, + bool prediction_active) { + EventGCG1AdaptiveIHOP evt; + if (evt.should_commit()) { + evt.set_gcId(GCId::current()); + evt.set_additionalBufferSize(additional_buffer_size); + evt.set_predictedAllocationRate(predicted_allocation_rate); + evt.set_predictedMarkingLength(predicted_marking_length); + evt.set_predictionActive(prediction_active); + evt.commit(); + } + } + #endif static TraceStructVirtualSpace to_trace_struct(const VirtualSpaceSummary& summary) { TraceStructVirtualSpace space; space.set_start((TraceAddress)summary.start());
< prev index next >