--- a/hotspot/src/share/vm/memory/iterator.hpp Mon Mar 07 19:17:35 2016 +0100
+++ b/hotspot/src/share/vm/memory/iterator.hpp Mon Mar 07 14:41:31 2016 -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;
};