comparison src/share/vm/gc_implementation/shared/markSweep.hpp @ 10179:a08c80e9e1e5

8012687: Remove unused is_root checks and closures Reviewed-by: tschatzl, jmasa
author stefank
date Mon, 22 Apr 2013 20:27:36 +0200
parents b735136e0d82
children 12f651e29f6b
comparison
equal deleted inserted replaced
10178:d391427ddc29 10179:a08c80e9e1e5
78 public: 78 public:
79 virtual void do_void(); 79 virtual void do_void();
80 }; 80 };
81 81
82 class AdjustPointerClosure: public OopsInGenClosure { 82 class AdjustPointerClosure: public OopsInGenClosure {
83 private: 83 public:
84 bool _is_root;
85 public:
86 AdjustPointerClosure(bool is_root) : _is_root(is_root) {}
87 virtual void do_oop(oop* p); 84 virtual void do_oop(oop* p);
88 virtual void do_oop(narrowOop* p); 85 virtual void do_oop(narrowOop* p);
89 }; 86 };
90 87
91 // Used for java/lang/ref handling 88 // Used for java/lang/ref handling
144 static FollowRootClosure follow_root_closure; 141 static FollowRootClosure follow_root_closure;
145 static CodeBlobToOopClosure follow_code_root_closure; // => follow_root_closure 142 static CodeBlobToOopClosure follow_code_root_closure; // => follow_root_closure
146 static MarkAndPushClosure mark_and_push_closure; 143 static MarkAndPushClosure mark_and_push_closure;
147 static FollowKlassClosure follow_klass_closure; 144 static FollowKlassClosure follow_klass_closure;
148 static FollowStackClosure follow_stack_closure; 145 static FollowStackClosure follow_stack_closure;
149 static AdjustPointerClosure adjust_root_pointer_closure;
150 static AdjustPointerClosure adjust_pointer_closure; 146 static AdjustPointerClosure adjust_pointer_closure;
151 static AdjustKlassClosure adjust_klass_closure; 147 static AdjustKlassClosure adjust_klass_closure;
152 148
153 // Accessors 149 // Accessors
154 static unsigned int total_invocations() { return _total_invocations; } 150 static unsigned int total_invocations() { return _total_invocations; }
177 static void preserve_mark(oop p, markOop mark); 173 static void preserve_mark(oop p, markOop mark);
178 // Save the mark word so it can be restored later 174 // Save the mark word so it can be restored later
179 static void adjust_marks(); // Adjust the pointers in the preserved marks table 175 static void adjust_marks(); // Adjust the pointers in the preserved marks table
180 static void restore_marks(); // Restore the marks that we saved in preserve_mark 176 static void restore_marks(); // Restore the marks that we saved in preserve_mark
181 177
182 template <class T> static inline void adjust_pointer(T* p, bool isroot); 178 template <class T> static inline void adjust_pointer(T* p);
183
184 static void adjust_root_pointer(oop* p) { adjust_pointer(p, true); }
185 static void adjust_pointer(oop* p) { adjust_pointer(p, false); }
186 static void adjust_pointer(narrowOop* p) { adjust_pointer(p, false); }
187
188 }; 179 };
189 180
190 class PreservedMark VALUE_OBJ_CLASS_SPEC { 181 class PreservedMark VALUE_OBJ_CLASS_SPEC {
191 private: 182 private:
192 oop _obj; 183 oop _obj;