119 u2 name_cp_index; |
119 u2 name_cp_index; |
120 u2 flags; |
120 u2 flags; |
121 }; |
121 }; |
122 |
122 |
123 class KlassSizeStats; |
123 class KlassSizeStats; |
|
124 class AdapterHandlerEntry; |
124 |
125 |
125 // Class to collect the sizes of ConstMethod inline tables |
126 // Class to collect the sizes of ConstMethod inline tables |
126 #define INLINE_TABLES_DO(do_element) \ |
127 #define INLINE_TABLES_DO(do_element) \ |
127 do_element(localvariable_table_length) \ |
128 do_element(localvariable_table_length) \ |
128 do_element(compressed_linenumber_size) \ |
129 do_element(compressed_linenumber_size) \ |
199 ConstantPool* _constants; // Constant pool |
200 ConstantPool* _constants; // Constant pool |
200 |
201 |
201 // Raw stackmap data for the method |
202 // Raw stackmap data for the method |
202 Array<u1>* _stackmap_data; |
203 Array<u1>* _stackmap_data; |
203 |
204 |
|
205 // Adapter blob (i2c/c2i) for this Method*. Set once when method is linked. |
|
206 union { |
|
207 AdapterHandlerEntry* _adapter; |
|
208 AdapterHandlerEntry** _adapter_trampoline; |
|
209 }; |
|
210 |
204 int _constMethod_size; |
211 int _constMethod_size; |
205 u2 _flags; |
212 u2 _flags; |
206 |
213 |
207 // Size of Java bytecodes allocated immediately after Method*. |
214 // Size of Java bytecodes allocated immediately after Method*. |
208 u2 _code_size; |
215 u2 _code_size; |
274 Array<u1>* stackmap_data() const { return _stackmap_data; } |
281 Array<u1>* stackmap_data() const { return _stackmap_data; } |
275 void set_stackmap_data(Array<u1>* sd) { _stackmap_data = sd; } |
282 void set_stackmap_data(Array<u1>* sd) { _stackmap_data = sd; } |
276 void copy_stackmap_data(ClassLoaderData* loader_data, u1* sd, int length, TRAPS); |
283 void copy_stackmap_data(ClassLoaderData* loader_data, u1* sd, int length, TRAPS); |
277 bool has_stackmap_table() const { return _stackmap_data != NULL; } |
284 bool has_stackmap_table() const { return _stackmap_data != NULL; } |
278 |
285 |
|
286 // adapter |
|
287 void set_adapter_entry(AdapterHandlerEntry* adapter) { |
|
288 assert(!is_shared(), "shared methods have fixed adapter_trampoline"); |
|
289 _adapter = adapter; |
|
290 } |
|
291 void set_adapter_trampoline(AdapterHandlerEntry** trampoline) { |
|
292 assert(DumpSharedSpaces, "must be"); |
|
293 assert(*trampoline == NULL, "must be NULL during dump time, to be initialized at run time"); |
|
294 _adapter_trampoline = trampoline; |
|
295 } |
|
296 void update_adapter_trampoline(AdapterHandlerEntry* adapter) { |
|
297 assert(is_shared(), "must be"); |
|
298 *_adapter_trampoline = adapter; |
|
299 assert(this->adapter() == adapter, "must be"); |
|
300 } |
|
301 AdapterHandlerEntry* adapter() { |
|
302 if (is_shared()) { |
|
303 return *_adapter_trampoline; |
|
304 } else { |
|
305 return _adapter; |
|
306 } |
|
307 } |
|
308 |
279 void init_fingerprint() { |
309 void init_fingerprint() { |
280 const uint64_t initval = UCONST64(0x8000000000000000); |
310 const uint64_t initval = UCONST64(0x8000000000000000); |
281 _fingerprint = initval; |
311 _fingerprint = initval; |
282 } |
312 } |
283 |
313 |