void constMethodKlass::oop_follow_contents(oop obj) { assert (obj->is_constMethod(), "object must be constMethod"); constMethodOop cm = constMethodOop(obj); MarkSweep::mark_and_push(cm->adr_method()); MarkSweep::mark_and_push(cm->adr_stackmap_data()); MarkSweep::mark_and_push(cm->adr_exception_table()); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::constMethodKlassObj never moves. }
int constMethodKlass::oop_oop_iterate(oop obj, OopClosure* blk) { assert (obj->is_constMethod(), "object must be constMethod"); constMethodOop cm = constMethodOop(obj); blk->do_oop(cm->adr_method()); blk->do_oop(cm->adr_stackmap_data()); blk->do_oop(cm->adr_exception_table()); // Get size before changing pointers. // Don't call size() or oop_size() since that is a virtual call. int size = cm->object_size(); return size; }
int constMethodKlass::oop_adjust_pointers(oop obj) { assert(obj->is_constMethod(), "should be constMethod"); constMethodOop cm = constMethodOop(obj); MarkSweep::adjust_pointer(cm->adr_method()); MarkSweep::adjust_pointer(cm->adr_stackmap_data()); MarkSweep::adjust_pointer(cm->adr_exception_table()); // Get size before changing pointers. // Don't call size() or oop_size() since that is a virtual call. int size = cm->object_size(); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::constMethodKlassObj never moves. return size; }
int constMethodKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) { assert (obj->is_constMethod(), "object must be constMethod"); constMethodOop cm = constMethodOop(obj); oop* adr; adr = cm->adr_method(); if (mr.contains(adr)) blk->do_oop(adr); adr = cm->adr_stackmap_data(); if (mr.contains(adr)) blk->do_oop(adr); adr = cm->adr_exception_table(); if (mr.contains(adr)) blk->do_oop(adr); // Get size before changing pointers. // Don't call size() or oop_size() since that is a virtual call. int size = cm->object_size(); // Performance tweak: We skip iterating over the klass pointer since we // know that Universe::constMethodKlassObj never moves. return size; }