--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.inline.hpp Wed Apr 06 13:32:48 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.inline.hpp Wed Apr 06 13:41:59 2016 +0200
@@ -27,6 +27,7 @@
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1ConcurrentMark.hpp"
+#include "gc/g1/suspendibleThreadSet.hpp"
#include "gc/shared/taskqueue.inline.hpp"
inline bool G1ConcurrentMark::par_mark(oop obj) {
@@ -258,4 +259,13 @@
}
}
+inline bool G1ConcurrentMark::do_yield_check() {
+ if (SuspendibleThreadSet::should_yield()) {
+ SuspendibleThreadSet::yield();
+ return true;
+ } else {
+ return false;
+ }
+}
+
#endif // SHARE_VM_GC_G1_G1CONCURRENTMARK_INLINE_HPP