81 _frame_size(frame_size), 82 _strings(CodeStrings()), 83 _oop_maps(oop_maps), 84 _caller_must_gc_arguments(caller_must_gc_arguments), 85 _code_begin(layout.code_begin()), 86 _code_end(layout.code_end()), 87 _data_end(layout.data_end()), 88 _relocation_begin(layout.relocation_begin()), 89 _relocation_end(layout.relocation_end()), 90 _content_begin(layout.content_begin()), 91 _type(type) 92 { 93 assert(is_aligned(layout.size(), oopSize), "unaligned size"); 94 assert(is_aligned(layout.header_size(), oopSize), "unaligned size"); 95 assert(is_aligned(layout.relocation_size(), oopSize), "unaligned size"); 96 assert(layout.code_end() == layout.content_end(), "must be the same - see code_end()"); 97 #ifdef COMPILER1 98 // probably wrong for tiered 99 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); 100 #endif // COMPILER1 101 } 102 103 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) : 104 _name(name), 105 _size(layout.size()), 106 _header_size(layout.header_size()), 107 _frame_complete_offset(frame_complete_offset), 108 _data_offset(layout.data_offset()), 109 _frame_size(frame_size), 110 _strings(CodeStrings()), 111 _caller_must_gc_arguments(caller_must_gc_arguments), 112 _code_begin(layout.code_begin()), 113 _code_end(layout.code_end()), 114 _data_end(layout.data_end()), 115 _relocation_begin(layout.relocation_begin()), 116 _relocation_end(layout.relocation_end()), 117 _content_begin(layout.content_begin()), 118 _type(type) 119 { 120 assert(is_aligned(_size, oopSize), "unaligned size"); 121 assert(is_aligned(_header_size, oopSize), "unaligned size"); 122 assert(_data_offset <= _size, "codeBlob is too small"); 123 assert(layout.code_end() == layout.content_end(), "must be the same - see code_end()"); 124 125 set_oop_maps(oop_maps); 126 #ifdef COMPILER1 127 // probably wrong for tiered 128 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); 129 #endif // COMPILER1 130 } 131 132 133 // Creates a simple CodeBlob. Sets up the size of the different regions. 134 RuntimeBlob::RuntimeBlob(const char* name, int header_size, int size, int frame_complete, int locs_size) 135 : CodeBlob(name, compiler_none, CodeBlobLayout((address) this, size, header_size, locs_size, size), frame_complete, 0, NULL, false /* caller_must_gc_arguments */) 136 { 137 assert(is_aligned(locs_size, oopSize), "unaligned size"); 138 } 139 140 141 // Creates a RuntimeBlob from a CodeBuffer 142 // and copy code and relocation info. 143 RuntimeBlob::RuntimeBlob( 144 const char* name, 145 CodeBuffer* cb, 146 int header_size, 147 int size, 148 int frame_complete, 149 int frame_size, | 81 _frame_size(frame_size), 82 _strings(CodeStrings()), 83 _oop_maps(oop_maps), 84 _caller_must_gc_arguments(caller_must_gc_arguments), 85 _code_begin(layout.code_begin()), 86 _code_end(layout.code_end()), 87 _data_end(layout.data_end()), 88 _relocation_begin(layout.relocation_begin()), 89 _relocation_end(layout.relocation_end()), 90 _content_begin(layout.content_begin()), 91 _type(type) 92 { 93 assert(is_aligned(layout.size(), oopSize), "unaligned size"); 94 assert(is_aligned(layout.header_size(), oopSize), "unaligned size"); 95 assert(is_aligned(layout.relocation_size(), oopSize), "unaligned size"); 96 assert(layout.code_end() == layout.content_end(), "must be the same - see code_end()"); 97 #ifdef COMPILER1 98 // probably wrong for tiered 99 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); 100 #endif // COMPILER1 101 S390_ONLY(_ctable_offset = 0;) // avoid uninitialized fields 102 } 103 104 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) : 105 _name(name), 106 _size(layout.size()), 107 _header_size(layout.header_size()), 108 _frame_complete_offset(frame_complete_offset), 109 _data_offset(layout.data_offset()), 110 _frame_size(frame_size), 111 _strings(CodeStrings()), 112 _caller_must_gc_arguments(caller_must_gc_arguments), 113 _code_begin(layout.code_begin()), 114 _code_end(layout.code_end()), 115 _data_end(layout.data_end()), 116 _relocation_begin(layout.relocation_begin()), 117 _relocation_end(layout.relocation_end()), 118 _content_begin(layout.content_begin()), 119 _type(type) 120 { 121 assert(is_aligned(_size, oopSize), "unaligned size"); 122 assert(is_aligned(_header_size, oopSize), "unaligned size"); 123 assert(_data_offset <= _size, "codeBlob is too small"); 124 assert(layout.code_end() == layout.content_end(), "must be the same - see code_end()"); 125 126 set_oop_maps(oop_maps); 127 #ifdef COMPILER1 128 // probably wrong for tiered 129 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); 130 #endif // COMPILER1 131 S390_ONLY(_ctable_offset = 0;) // avoid uninitialized fields 132 } 133 134 135 // Creates a simple CodeBlob. Sets up the size of the different regions. 136 RuntimeBlob::RuntimeBlob(const char* name, int header_size, int size, int frame_complete, int locs_size) 137 : CodeBlob(name, compiler_none, CodeBlobLayout((address) this, size, header_size, locs_size, size), frame_complete, 0, NULL, false /* caller_must_gc_arguments */) 138 { 139 assert(is_aligned(locs_size, oopSize), "unaligned size"); 140 } 141 142 143 // Creates a RuntimeBlob from a CodeBuffer 144 // and copy code and relocation info. 145 RuntimeBlob::RuntimeBlob( 146 const char* name, 147 CodeBuffer* cb, 148 int header_size, 149 int size, 150 int frame_complete, 151 int frame_size, |