oop vframeMap::clone(oop obj, bool mustAllocate, oop genObj) { vframeOop theClone= vframeOop(obj)->basic_clone(mustAllocate, genObj); if (oop(theClone) != failedAllocationOop && theClone->is_live()) { // link clone into list after the original vframeOop(obj)->set_next(theClone); } return theClone; }
void vframeMap::dummy_initialize(oop obj, oop filler) { assert( obj->is_vframe(), "a vframeOop is expected"); vframeOop(obj)->set_next(NULL); vframeOop(obj)->set_method(filler); vframeOop(obj)->set_locals(NULL); vframeOop(obj)->set_process(NULL); vframeOop(obj)->set_descOffset(0); }
oop processOopClass::TWAINS_prim(objVectorOop resultArg, bool stepping, oop stop, void *FH) { if (SignalInterface::are_self_signals_blocked()) warning("_TWAINS: signals are blocked (with _BlockSignals)"); Process* proc= TWAINS_receiver_check(FH); if (proc == NULL) return NULL; if (!TWAINS_result_vector_check( resultArg, FH)) return NULL; vframeOop stop_vfo= TWAINS_stop_activation_check(proc, stop, FH); if (stop_vfo == vframeOop(badOop)) return NULL; if (!TWAINS_parallel_check(FH)) return NULL; preemptCause = cNoCause; twainsProcess = currentProcess; if (PendingSelfSignals::are_any_pending() && !SignalInterface::are_self_signals_blocked()) { // return immediately - have unhandled signals preemptCause = cSignal; } else if (proc != twainsProcess) { TWAINS_transfer_to_another_process(proc, resultArg, stepping, stop_vfo); } else { TWAINS_await_signal(); } twainsProcess = NULL; oop res = get_result(resultArg); LOG_EVENT3("TWAINS: res = %#lx { %#lx, %#lx, ... }", res, resultArg->obj_at(0), resultArg->obj_at(1)); preemptCause = cNoCause; return res; }
vframeOop oopFactory::new_vframe(processOop process, int index) { BlockScavenge bs; vframeKlass* vk =(vframeKlass*) Universe::vframeKlassObj()->klass_part(); vframeOop result = vframeOop(vk->allocateObject()); result->set_process(process); result->set_index(index); result->set_time_stamp(process->process()->time_stamp()); return result; }
vframeOop processOopClass::TWAINS_stop_activation_check(Process* proc, oop stop, void* FH) { vframeOop stop_vfo = NULL; if (stop == Memory->nilObj) { // no stopping (common case) } else if (stop->is_mirror() && mirrorOop(stop)->reflectee()->is_vframe()) { // make sure it's live and on proc's stack stop_vfo = vframeOop(mirrorOop(stop)->reflectee()); if (!stop_vfo->is_live()) { prim_failure(FH, NOACTIVATIONERROR); return vframeOop(badOop); } if (!proc->contains((char*)stop_vfo->locals())) { prim_failure(FH, NOACTIVATIONERROR); return vframeOop(badOop); } } else { prim_failure(FH, BADTYPEERROR); return vframeOop(badOop); } return stop_vfo; }
void vframeMap::print_oop(oop obj) { bool live = vframeOop(obj)->is_live(); lprintf("<a%s activation object", live ? "n" : " dead"); if (WizardMode && live) { ResourceMark rm; abstract_vframe* vf = vframeOop(obj)->as_vframe(); # if defined(FAST_COMPILER) || defined(SIC_COMPILER) if (vf->is_compiled()) { compiled_vframe* v = vf->as_compiled(); lprintf(" <%#lx @ %#lx # %ld>", vf->fr, v->code, (void*)long(v->descOffset()->value())); } # endif methodMap *mm = (methodMap*) vf->method()->map(); stringOop file = mm->file(); if (file->length() > 0) { lprintf(" ("); file->string_print(); lprintf(":%ld): ", mm->line()->value()); } else { lprintf(" "); } # if defined(FAST_COMPILER) || defined(SIC_COMPILER) if (vf->is_compiled()) { compiled_vframe* v = vf->as_compiled(); if (v->desc->key.selector->is_string()) { stringOop(v->desc->key.selector)->string_print(); } else { v->desc->key.selector->print_oop(); } } # endif } else if (PrintOopAddress) { lprintf(" (%#lx) ", obj); } lprintf(">"); }
void vframeMap::print(oop obj) { ResourceMark rm; lprintf("vframe "); if (WizardMode && !obj->is_map()) { vframeOop vfo = vframeOop(obj); if (vfo->is_live()) { abstract_vframe* vf = vfo->as_vframe(); const char* sel = vf->selector() ? stringOop(vf->selector())->copy_null_terminated() : "..."; lprintf("(%s / %#lx %#lx) ", sel, vfo->fr(), vfo->locals()); } else { lprintf("(DEAD)"); } } slotsMapDeps::print(obj); }
friend vframeOop as_vframeOop(void* p) { return vframeOop(as_memOop(p)); }
oop vframeMap::mirror_line(oop obj) { return vframeOop(obj)->method()->mirror_line(); }
oop vframeMap::mirror_source_offset(oop obj) { return vframeOop(obj)->method()->mirror_source_offset(); }
oop vframeMap::mirror_source_length(oop obj) { return vframeOop(obj)->method()->mirror_source_length(); }
oop vframeMap::mirror_literals(oop obj) { return vframeOop(obj)->method()->mirror_literals(); }
oop vframeMap::mirror_codes(oop obj) { return vframeOop(obj)->method()->mirror_codes(); }
bool vframeMap::verify(oop obj) { return vframeOop(obj)->verify(); }
bool vframeMap::is_live(oop vfp) { return vframeOop(vfp)->is_live_vframe(); }
void vframeMap::kill(oop vfp) { vframeOop(vfp)->kill_vframe(); }
// enumerating bool vframeMap::is_enumerable(oop obj, oop* matching_cell) { return matching_cell >= vframeOop(obj)->oops(empty_object_size()) || *matching_cell == vframeOop(obj)->method() || *matching_cell == oop(vframeOop(obj)->process()); };
oop vframeMap::mirror_annotation_at(oop obj, stringOop name) { return vframeOop(obj)->method()->map()-> mirror_annotation_at(obj, name); }
void vframeMap::print_string(oop obj, char* buf) { bool live = vframeOop(obj)->is_live(); sprintf(buf, "<a%s activation object>", live ? "n" : " dead"); }