--- old/src/share/vm/memory/iterator.hpp 2016-03-06 20:43:11.631223645 -0500 +++ new/src/share/vm/memory/iterator.hpp 2016-03-06 20:43:11.511222938 -0500 @@ -285,9 +285,12 @@ protected: void do_nmethod(nmethod* nm); public: + // If fix_relocations(), then cl must copy objects to their new location immediately to avoid + // patching nmethods with the old locations. CodeBlobToOopClosure(OopClosure* cl, bool fix_relocations) : _cl(cl), _fix_relocations(fix_relocations) {} virtual void do_code_blob(CodeBlob* cb); + bool fix_relocations() const { return _fix_relocations; } const static bool FixRelocations = true; };