CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments) : _name(name), _size(layout.size()), _header_size(layout.header_size()), _frame_complete_offset(frame_complete_offset), _data_offset(layout.data_offset()), _frame_size(frame_size), _strings(CodeStrings()), _caller_must_gc_arguments(caller_must_gc_arguments), _code_begin(layout.code_begin()), _code_end(layout.code_end()), _data_end(layout.data_end()), _relocation_begin(layout.relocation_begin()), _relocation_end(layout.relocation_end()), _content_begin(layout.content_begin()), _type(type) { assert(_size == round_to(_size, oopSize), "unaligned size"); assert(_header_size == round_to(_header_size, oopSize), "unaligned size"); assert(_data_offset <= _size, "codeBlob is too small"); assert(layout.code_end() == layout.content_end(), "must be the same - see code_end()"); set_oop_maps(oop_maps); #ifdef COMPILER1 // probably wrong for tiered assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); #endif // COMPILER1 }
void InterpreterCodelet::print_on(outputStream* st) const { ttyLocker ttyl; if (PrintInterpreter) { st->cr(); st->print_cr("----------------------------------------------------------------------"); } if (description() != NULL) st->print("%s ", description()); if (bytecode() >= 0 ) st->print("%d %s ", bytecode(), Bytecodes::name(bytecode())); st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "] %d bytes", p2i(code_begin()), p2i(code_end()), code_size()); if (PrintInterpreter) { st->cr(); Disassembler::decode(code_begin(), code_end(), st, DEBUG_ONLY(_strings) NOT_DEBUG(CodeStrings())); } }