--- old/src/hotspot/share/memory/iterator.hpp 2018-04-26 11:18:09.042244302 +0200 +++ new/src/hotspot/share/memory/iterator.hpp 2018-04-26 11:18:08.417225860 +0200 @@ -318,8 +318,10 @@ // by means of checking the return value from the polling // call. class YieldClosure : public StackObj { - public: - virtual bool should_return() = 0; +public: + virtual bool should_return() = 0; + // Yield on a fine-grain level. The check in case of not yielding should be very fast. + virtual bool should_return_fine_grain() { return false; } }; // Abstract closure for serializing data (read or write).