void frame::copy_to( char* sp, char* caller, char* pc, bool adjust) { sparc_sp *new_sp = (sparc_sp*)sp; if (adjust) { // make sure all memoized blocks exist, then adjust their scope abstract_vframe* callee = NULL; OopOopTable* dummy = EMPTY; for ( abstract_vframe* vf = new_vframe(this); vf && vf->fr == this; callee = vf, vf = vf->sender()) { vf->createBlocks(callee, dummy); } frame* new_f = new_sp->as_callers_frame(); ResourceMark rm; // for RegisterLocator adjust_blocks(block_scope_of_home_frame(), new_f, RegisterLocator::for_frame(new_f)); } copy_oops(my_sp()->as_oops(), new_sp->as_oops(), frame_size()); new_sp->set_link( (sparc_fp*) caller ); new_sp->set_return_addr( pc ); }
void space::compact(OldWaterMark* mark) { // compute the new addresses for the live objects // Used by universe::mark_sweep_phase3() // %profiling note: // the garbage collectior spends 23% of its time in this function oop* q = bottom(); oop* t = top(); oop* new_top = mark->_point; while (q < t) { memOop m = as_memOop(q); if (m->mark()->is_smi()) { // lprintf("Expanding %#lx -> %#lx\n", q, *q); q = (oop*) *q; } else { int size = m->gc_retrieve_size(); if (q != new_top) { copy_oops(q, new_top, size); // lprintf("copy %#lx -> %#lx (%d)\n", q, new_top, size); assert((*new_top)->is_mark(), "should be header"); } mark->_space->update_offsets(new_top, new_top + size); q += size; new_top += size; } } mark->_point = new_top; mark->_space->set_top(new_top); set_top(new_top); }
void frame::copy_to( char* sp, char* caller, char* pc, bool adjust) { frame* new_f = (frame*)sp; if (SpendTimeForDebugging) warning("untested frame::copy_to:"); // need SIC to test this if (adjust) { // make sure all memoized blocks exist, then adjust their scope abstract_vframe* callee = NULL; OopOopTable* dummy = EMPTY; for ( abstract_vframe* vf = new_vframe(this); vf && vf->fr == this; callee = vf, vf = vf->sender()) { vf->createBlocks(callee, dummy); } ResourceMark rm; // for RegisterLocators adjust_blocks(block_scope_of_home_frame(), new_f, RegisterLocator::for_frame(new_f) ); } copy_oops( (oop*)this, (oop*)new_f, frame_size()); my_sp()->set_link( ((frame*)caller)->my_sp() ); set_return_addr( pc ); }
inline void copy_words(int* from, int* to, int count) { copy_oops((oop*) from, (oop*) to, count); }