< prev index next >

src/hotspot/share/memory/iterator.cpp

CLD claiming v2

14  * You should have received a copy of the GNU General Public License version                                                         
15  * 2 along with this work; if not, write to the Free Software Foundation,                                                            
16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.                                                                     
17  *                                                                                                                                   
18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA                                                           
19  * or visit www.oracle.com if you need additional information or have any                                                            
20  * questions.                                                                                                                        
21  *                                                                                                                                   
22  */                                                                                                                                  
23 
24 #include "precompiled.hpp"                                                                                                           
25 #include "memory/iterator.inline.hpp"                                                                                                
26 #include "memory/universe.hpp"                                                                                                       
27 #include "oops/oop.inline.hpp"                                                                                                       
28 #include "utilities/debug.hpp"                                                                                                       
29 #include "utilities/globalDefinitions.hpp"                                                                                           
30 
31 DoNothingClosure do_nothing_cl;                                                                                                      
32 
33 void CLDToOopClosure::do_cld(ClassLoaderData* cld) {                                                                                 
34   cld->oops_do(_oop_closure, _cld_claim_value);                                                                                      
35 }                                                                                                                                    
36 
37 void ObjectToOopClosure::do_object(oop obj) {                                                                                        
38   obj->oop_iterate(_cl);                                                                                                             
39 }                                                                                                                                    
40 
41 void VoidClosure::do_void() {                                                                                                        
42   ShouldNotCallThis();                                                                                                               
43 }                                                                                                                                    
44 
45 void CodeBlobToOopClosure::do_nmethod(nmethod* nm) {                                                                                 
46   nm->oops_do(_cl);                                                                                                                  
47   if (_fix_relocations) {                                                                                                            
48     nm->fix_oop_relocations();                                                                                                       
49   }                                                                                                                                  
50 }                                                                                                                                    
51 
52 void CodeBlobToOopClosure::do_code_blob(CodeBlob* cb) {                                                                              
53   nmethod* nm = cb->as_nmethod_or_null();                                                                                            

14  * You should have received a copy of the GNU General Public License version
15  * 2 along with this work; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19  * or visit www.oracle.com if you need additional information or have any
20  * questions.
21  *
22  */
23 
24 #include "precompiled.hpp"
25 #include "memory/iterator.inline.hpp"
26 #include "memory/universe.hpp"
27 #include "oops/oop.inline.hpp"
28 #include "utilities/debug.hpp"
29 #include "utilities/globalDefinitions.hpp"
30 
31 DoNothingClosure do_nothing_cl;
32 
33 void CLDToOopClosure::do_cld(ClassLoaderData* cld) {
34   cld->oops_do(_oop_closure, _cld_claim);
35 }
36 
37 void ObjectToOopClosure::do_object(oop obj) {
38   obj->oop_iterate(_cl);
39 }
40 
41 void VoidClosure::do_void() {
42   ShouldNotCallThis();
43 }
44 
45 void CodeBlobToOopClosure::do_nmethod(nmethod* nm) {
46   nm->oops_do(_cl);
47   if (_fix_relocations) {
48     nm->fix_oop_relocations();
49   }
50 }
51 
52 void CodeBlobToOopClosure::do_code_blob(CodeBlob* cb) {
53   nmethod* nm = cb->as_nmethod_or_null();
< prev index next >