100 relocation_begin, // relocation_begin
101 relocation_end
102 ) {
103 }
104 };
105
106 class AOTCompiledMethod : public CompiledMethod, public CHeapObj<mtCode> {
107 private:
108 address _code;
109 aot_metadata* _meta;
110 Metadata** _metadata_got;
111 jlong* _state_adr; // Address of cell to indicate aot method state (in_use or not_entrant)
112 AOTCodeHeap* _heap; // code heap which has this method
113 const char* _name; // For stub: "AOT Stub<name>" for stub,
114 // For nmethod: "<u2_size>Ljava/lang/ThreadGroup;<u2_size>addUnstarted<u2_size>()V"
115 const int _metadata_size; // size of _metadata_got
116 const int _aot_id;
117 const int _method_index;
118 oop _oop; // method()->method_holder()->klass_holder()
119
120 address* orig_pc_addr(const frame* fr) { return (address*) ((address)fr->unextended_sp() + _meta->orig_pc_offset()); }
121 bool make_not_entrant_helper(int new_state);
122
123 public:
124 using CHeapObj<mtCode>::operator new;
125 using CHeapObj<mtCode>::operator delete;
126
127 int method_index() const { return _method_index; }
128 void set_oop(oop o) { _oop = o; }
129
130 AOTCompiledMethod(address code, Method* method, aot_metadata* meta, address metadata_got, int metadata_size, jlong* state_adr, AOTCodeHeap* heap, const char* name, int method_index, int aot_id) :
131 CompiledMethod(method, name, compiler_jvmci, // AOT code is generated by JVMCI compiler
132 AOTCompiledMethodLayout(code, code + meta->code_size(), (address) meta->relocation_begin(), (address) meta->relocation_end()),
133 0 /* frame_complete_offset */, meta->frame_size() /* frame_size */, meta->oopmap_set(), false /* caller_must_gc_arguments */),
134 _code(code),
135 _meta(meta),
136 _metadata_got((Metadata**) metadata_got),
137 _state_adr(state_adr),
138 _heap(heap),
139 _name(name),
140 _metadata_size(metadata_size),
|
100 relocation_begin, // relocation_begin
101 relocation_end
102 ) {
103 }
104 };
105
106 class AOTCompiledMethod : public CompiledMethod, public CHeapObj<mtCode> {
107 private:
108 address _code;
109 aot_metadata* _meta;
110 Metadata** _metadata_got;
111 jlong* _state_adr; // Address of cell to indicate aot method state (in_use or not_entrant)
112 AOTCodeHeap* _heap; // code heap which has this method
113 const char* _name; // For stub: "AOT Stub<name>" for stub,
114 // For nmethod: "<u2_size>Ljava/lang/ThreadGroup;<u2_size>addUnstarted<u2_size>()V"
115 const int _metadata_size; // size of _metadata_got
116 const int _aot_id;
117 const int _method_index;
118 oop _oop; // method()->method_holder()->klass_holder()
119
120 address* orig_pc_addr(const frame* fr);
121 bool make_not_entrant_helper(int new_state);
122
123 public:
124 using CHeapObj<mtCode>::operator new;
125 using CHeapObj<mtCode>::operator delete;
126
127 int method_index() const { return _method_index; }
128 void set_oop(oop o) { _oop = o; }
129
130 AOTCompiledMethod(address code, Method* method, aot_metadata* meta, address metadata_got, int metadata_size, jlong* state_adr, AOTCodeHeap* heap, const char* name, int method_index, int aot_id) :
131 CompiledMethod(method, name, compiler_jvmci, // AOT code is generated by JVMCI compiler
132 AOTCompiledMethodLayout(code, code + meta->code_size(), (address) meta->relocation_begin(), (address) meta->relocation_end()),
133 0 /* frame_complete_offset */, meta->frame_size() /* frame_size */, meta->oopmap_set(), false /* caller_must_gc_arguments */),
134 _code(code),
135 _meta(meta),
136 _metadata_got((Metadata**) metadata_got),
137 _state_adr(state_adr),
138 _heap(heap),
139 _name(name),
140 _metadata_size(metadata_size),
|