863 |
863 |
864 // Iteration functions. |
864 // Iteration functions. |
865 |
865 |
866 // Iterate over all the ref-containing fields of all objects, calling |
866 // Iterate over all the ref-containing fields of all objects, calling |
867 // "cl.do_oop" on each. |
867 // "cl.do_oop" on each. |
868 virtual void oop_iterate(OopClosure* cl); |
868 virtual void oop_iterate(OopClosure* cl) { |
|
869 oop_iterate(cl, true); |
|
870 } |
|
871 void oop_iterate(OopClosure* cl, bool do_perm); |
869 |
872 |
870 // Same as above, restricted to a memory region. |
873 // Same as above, restricted to a memory region. |
871 virtual void oop_iterate(MemRegion mr, OopClosure* cl); |
874 virtual void oop_iterate(MemRegion mr, OopClosure* cl) { |
|
875 oop_iterate(mr, cl, true); |
|
876 } |
|
877 void oop_iterate(MemRegion mr, OopClosure* cl, bool do_perm); |
872 |
878 |
873 // Iterate over all objects, calling "cl.do_object" on each. |
879 // Iterate over all objects, calling "cl.do_object" on each. |
874 virtual void object_iterate(ObjectClosure* cl); |
880 virtual void object_iterate(ObjectClosure* cl) { |
875 virtual void safe_object_iterate(ObjectClosure* cl) { object_iterate(cl); } |
881 object_iterate(cl, true); |
|
882 } |
|
883 virtual void safe_object_iterate(ObjectClosure* cl) { |
|
884 object_iterate(cl, true); |
|
885 } |
|
886 void object_iterate(ObjectClosure* cl, bool do_perm); |
876 |
887 |
877 // Iterate over all objects allocated since the last collection, calling |
888 // Iterate over all objects allocated since the last collection, calling |
878 // "cl.do_object" on each. The heap must have been initialized properly |
889 // "cl.do_object" on each. The heap must have been initialized properly |
879 // to support this function, or else this call will fail. |
890 // to support this function, or else this call will fail. |
880 virtual void object_iterate_since_last_GC(ObjectClosure* cl); |
891 virtual void object_iterate_since_last_GC(ObjectClosure* cl); |