--- old/src/share/vm/gc_implementation/g1/concurrentMark.hpp 2013-04-12 11:10:27.116732001 +0100 +++ new/src/share/vm/gc_implementation/g1/concurrentMark.hpp 2013-04-12 11:10:27.016732009 +0100 @@ -546,8 +546,6 @@ void clear_has_overflown() { _has_overflown = false; } bool restart_for_overflow() { return _restart_for_overflow; } - bool has_aborted() { return _has_aborted; } - // Methods to enter the two overflow sync barriers void enter_first_sync_barrier(int task_num); void enter_second_sync_barrier(int task_num); @@ -795,6 +793,8 @@ // Called to abort the marking cycle after a Full GC takes palce. void abort(); + bool has_aborted() { return _has_aborted; } + // This prints the global/local fingers. It is used for debugging. NOT_PRODUCT(void print_finger();) --- old/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2013-04-12 11:10:27.556732002 +0100 +++ new/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2013-04-12 11:10:27.456731999 +0100 @@ -2518,6 +2518,9 @@ if (_concurrent_cycle_started) { _gc_timer_cm->register_gc_end(os::elapsed_counter()); + if (_cm->has_aborted()) { + _gc_tracer_cm->report_concurrent_mode_failure(); + } _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions()); _concurrent_cycle_started = false; --- old/src/share/vm/gc_implementation/shared/gcTrace.cpp 2013-04-12 11:10:28.036732001 +0100 +++ new/src/share/vm/gc_implementation/shared/gcTrace.cpp 2013-04-12 11:10:27.936732008 +0100 @@ -161,7 +161,7 @@ _parallel_old_gc_info.report_dense_prefix(dense_prefix); } -void CMSTracer::report_concurrent_mode_failure() { +void OldGCTracer::report_concurrent_mode_failure() { assert_set_gc_id(); send_concurrent_mode_failure_event(); --- old/src/share/vm/gc_implementation/shared/gcTrace.hpp 2013-04-12 11:10:28.356732009 +0100 +++ new/src/share/vm/gc_implementation/shared/gcTrace.hpp 2013-04-12 11:10:28.266732003 +0100 @@ -162,8 +162,12 @@ OldGCTracer(GCName name) : GCTracer(name) {} virtual void report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions); + public: + void report_concurrent_mode_failure(); + private: void send_old_gc_event() const; + void send_concurrent_mode_failure_event(); }; class ParallelOldTracer : public OldGCTracer { @@ -220,11 +224,6 @@ class CMSTracer : public OldGCTracer { public: CMSTracer() : OldGCTracer(ConcurrentMarkSweep) {} - - void report_concurrent_mode_failure(); - - private: - void send_concurrent_mode_failure_event(); }; class G1OldTracer : public OldGCTracer { --- old/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2013-04-12 11:10:28.716731999 +0100 +++ new/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2013-04-12 11:10:28.616732003 +0100 @@ -114,7 +114,8 @@ } } -void CMSTracer::send_concurrent_mode_failure_event() { +// Common to CMS and G1 +void OldGCTracer::send_concurrent_mode_failure_event() { EventConcurrentModeFailure e; if (e.should_commit()) { e.set_gcId(_shared_gc_info.id());