--- old/src/share/vm/memory/gcLocker.hpp 2014-02-07 17:50:16.902298765 +0100 +++ new/src/share/vm/memory/gcLocker.hpp 2014-02-07 17:50:16.806299435 +0100 @@ -91,7 +91,8 @@ assert(SafepointSynchronize::is_at_safepoint(), "only read at safepoint"); return is_active_internal(); } - static bool needs_gc() { return _needs_gc; } + static bool needs_gc() { return _needs_gc; } + static bool fail_on_gc() { return _lock_count > 0; } // Shorthand static bool is_active_and_needs_gc() {