src/share/vm/memory/iterator.hpp

changeset 9661
379a59bf685d
parent 6992
2c6ef90f030a
child 9665
a8441ccaff15
equal deleted inserted replaced
9660:f54baa81b631 9661:379a59bf685d
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
289 OopClosure* _cl; 289 OopClosure* _cl;
290 bool _fix_relocations; 290 bool _fix_relocations;
291 protected: 291 protected:
292 void do_nmethod(nmethod* nm); 292 void do_nmethod(nmethod* nm);
293 public: 293 public:
294 // If fix_relocations(), then cl must copy objects to their new location immediately to avoid
295 // patching nmethods with the old locations.
294 CodeBlobToOopClosure(OopClosure* cl, bool fix_relocations) : _cl(cl), _fix_relocations(fix_relocations) {} 296 CodeBlobToOopClosure(OopClosure* cl, bool fix_relocations) : _cl(cl), _fix_relocations(fix_relocations) {}
295 virtual void do_code_blob(CodeBlob* cb); 297 virtual void do_code_blob(CodeBlob* cb);
296 298
299 bool fix_relocations() const { return _fix_relocations; }
297 const static bool FixRelocations = true; 300 const static bool FixRelocations = true;
298 }; 301 };
299 302
300 class MarkingCodeBlobClosure : public CodeBlobToOopClosure { 303 class MarkingCodeBlobClosure : public CodeBlobToOopClosure {
301 public: 304 public:

mercurial