src/share/vm/oops/methodKlass.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 110,135 **** m->set_prev_time(0); #endif assert(m->is_parsable(), "must be parsable here."); assert(m->size() == size, "wrong size for object"); - // We should not publish an uprasable object's reference - // into one that is parsable, since that presents problems - // for the concurrent parallel marking and precleaning phases - // of concurrent gc (CMS). - xconst->set_method(m); return m; } void methodKlass::oop_follow_contents(oop obj) { assert (obj->is_method(), "object must be method"); methodOop m = methodOop(obj); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::methodKlassObj never moves. MarkSweep::mark_and_push(m->adr_constMethod()); - MarkSweep::mark_and_push(m->adr_constants()); if (m->method_data() != NULL) { MarkSweep::mark_and_push(m->adr_method_data()); } } --- 110,129 ----
*** 139,149 **** assert (obj->is_method(), "object must be method"); methodOop m = methodOop(obj); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::methodKlassObj never moves. PSParallelCompact::mark_and_push(cm, m->adr_constMethod()); - PSParallelCompact::mark_and_push(cm, m->adr_constants()); #ifdef COMPILER2 if (m->method_data() != NULL) { PSParallelCompact::mark_and_push(cm, m->adr_method_data()); } #endif // COMPILER2 --- 133,142 ----
*** 157,167 **** // Don't call size() or oop_size() since that is a virtual call. int size = m->object_size(); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::methodKlassObj never moves blk->do_oop(m->adr_constMethod()); - blk->do_oop(m->adr_constants()); if (m->method_data() != NULL) { blk->do_oop(m->adr_method_data()); } return size; } --- 150,159 ----
*** 176,187 **** // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::methodKlassObj never moves. oop* adr; adr = m->adr_constMethod(); if (mr.contains(adr)) blk->do_oop(adr); - adr = m->adr_constants(); - if (mr.contains(adr)) blk->do_oop(adr); if (m->method_data() != NULL) { adr = m->adr_method_data(); if (mr.contains(adr)) blk->do_oop(adr); } return size; --- 168,177 ----
*** 195,205 **** // Don't call size() or oop_size() since that is a virtual call. int size = m->object_size(); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::methodKlassObj never moves. MarkSweep::adjust_pointer(m->adr_constMethod()); - MarkSweep::adjust_pointer(m->adr_constants()); if (m->method_data() != NULL) { MarkSweep::adjust_pointer(m->adr_method_data()); } return size; } --- 185,194 ----
*** 211,221 **** int methodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { assert(obj->is_method(), "should be method"); methodOop m = methodOop(obj); PSParallelCompact::adjust_pointer(m->adr_constMethod()); - PSParallelCompact::adjust_pointer(m->adr_constants()); #ifdef COMPILER2 if (m->method_data() != NULL) { PSParallelCompact::adjust_pointer(m->adr_method_data()); } #endif // COMPILER2 --- 200,209 ----
*** 337,348 **** Klass::oop_verify_on(obj, st); guarantee(obj->is_method(), "object must be method"); if (!obj->partially_loaded()) { methodOop m = methodOop(obj); guarantee(m->is_perm(), "should be in permspace"); - guarantee(m->constants()->is_perm(), "should be in permspace"); - guarantee(m->constants()->is_constantPool(), "should be constant pool"); guarantee(m->constMethod()->is_constMethod(), "should be constMethodOop"); guarantee(m->constMethod()->is_perm(), "should be in permspace"); methodDataOop method_data = m->method_data(); guarantee(method_data == NULL || method_data->is_perm(), "should be in permspace"); --- 325,334 ----