--- old/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2013-03-25 14:37:12.168253093 +0100 +++ new/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2013-03-25 14:37:12.104253095 +0100 @@ -28,7 +28,11 @@ #include "gc_implementation/shared/gcTrace.hpp" #include "gc_implementation/shared/gcWhen.hpp" #include "gc_implementation/shared/promotionFailedInfo.hpp" +#include "memory/heapInspection.hpp" +#include "memory/iterator.hpp" +#include "trace/traceBackend.hpp" #include "trace/tracing.hpp" +#include "utilities/globalDefinitions.hpp" #ifndef SERIALGC #include "gc_implementation/g1/g1YCTypes.hpp" #endif @@ -105,6 +109,25 @@ } } +void GCTracer::send_object_count_after_gc_event(klassOop klass, jlong count, julong total_size) const { + EventObjectCountAfterGC e; + if (e.should_commit()) { + e.set_gcId(_shared_gc_info.id()); + e.set_class(klass); + e.set_count(count); + e.set_totalSize(total_size); + e.commit(); + } +} + +bool GCTracer::should_send_object_count_after_gc_event() const { +#if INCLUDE_TRACE + return Tracing::enabled(EventObjectCountAfterGC::eventId); +#else + return false; +#endif +} + #ifndef SERIALGC void G1NewTracer::send_g1_young_gc_event() { EventGCG1GarbageCollection e(UNTIMED);