void do_object(oop obj) { if (obj->is_shared()) { return; } if (obj->is_gc_marked() && obj->forwardee() == NULL) { int s = obj->size(); oop sh_obj = (oop)_space->allocate(s); if (sh_obj == NULL) { if (_read_only) { warning("\nThe permanent generation read only space is not large " "enough to \npreload requested classes. Use " "-XX:SharedReadOnlySize= to increase \nthe initial " "size of the read only space.\n"); } else { warning("\nThe permanent generation read write space is not large " "enough to \npreload requested classes. Use " "-XX:SharedReadWriteSize= to increase \nthe initial " "size of the read write space.\n"); } exit(2); } if (PrintSharedSpaces && Verbose && WizardMode) { tty->print_cr("\nMoveMarkedObjects: " PTR_FORMAT " -> " PTR_FORMAT " %s", obj, sh_obj, (_read_only ? "ro" : "rw")); } Copy::aligned_disjoint_words((HeapWord*)obj, (HeapWord*)sh_obj, s); obj->forward_to(sh_obj); if (_read_only) { // Readonly objects: set hash value to self pointer and make gc_marked. sh_obj->forward_to(sh_obj); } else { sh_obj->init_mark(); } } }
void do_object(oop obj) { if (!obj->is_shared() && !obj->is_forwarded()) { ++count; if (Verbose) { tty->print("Unreferenced object: "); obj->print_on(tty); } } }
static bool mark_object(oop obj) { if (obj != NULL && !obj->is_shared() && !obj->is_forwarded() && !obj->is_gc_marked()) { obj->set_mark(markOopDesc::prototype()->set_marked()); return true; } return false; }