< prev index next >

src/hotspot/share/code/nmethod.cpp

Print this page

1280              offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps, false),
1281   _deoptimization_generation(0),
1282   _gc_epoch(CodeCache::gc_epoch()),
1283   _method(method),
1284   _native_receiver_sp_offset(basic_lock_owner_sp_offset),
1285   _native_basic_lock_sp_offset(basic_lock_sp_offset)
1286 {
1287   {
1288     debug_only(NoSafepointVerifier nsv;)
1289     assert_locked_or_safepoint(CodeCache_lock);
1290 
1291     init_defaults(code_buffer, offsets);
1292 
1293     _osr_entry_point         = nullptr;
1294     _pc_desc_container       = nullptr;
1295     _entry_bci               = InvocationEntryBci;
1296     _compile_id              = compile_id;
1297     _comp_level              = CompLevel_none;
1298     _compiler_type           = type;
1299     _orig_pc_offset          = 0;
1300     _num_stack_arg_slots     = _method->constMethod()->num_stack_arg_slots();
1301 
1302     if (offsets->value(CodeOffsets::Exceptions) != -1) {
1303       // Continuation enter intrinsic
1304       _exception_offset      = code_offset() + offsets->value(CodeOffsets::Exceptions);
1305     } else {
1306       _exception_offset      = 0;
1307     }
1308     // Native wrappers do not have deopt handlers. Make the values
1309     // something that will never match a pc like the nmethod vtable entry
1310     _deopt_handler_offset    = 0;
1311     _deopt_mh_handler_offset = 0;
1312     _unwind_handler_offset   = 0;
1313 
1314     CHECKED_CAST(_metadata_offset, uint16_t, (align_up(code_buffer->total_oop_size(), oopSize)));
1315     int data_end_offset = _metadata_offset + align_up(code_buffer->total_metadata_size(), wordSize);
1316 #if INCLUDE_JVMCI
1317     // jvmci_data_size is 0 in native wrapper but we need to set offset
1318     // to correctly calculate metadata_end address
1319     CHECKED_CAST(_jvmci_data_offset, uint16_t, data_end_offset);
1320 #endif

1280              offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps, false),
1281   _deoptimization_generation(0),
1282   _gc_epoch(CodeCache::gc_epoch()),
1283   _method(method),
1284   _native_receiver_sp_offset(basic_lock_owner_sp_offset),
1285   _native_basic_lock_sp_offset(basic_lock_sp_offset)
1286 {
1287   {
1288     debug_only(NoSafepointVerifier nsv;)
1289     assert_locked_or_safepoint(CodeCache_lock);
1290 
1291     init_defaults(code_buffer, offsets);
1292 
1293     _osr_entry_point         = nullptr;
1294     _pc_desc_container       = nullptr;
1295     _entry_bci               = InvocationEntryBci;
1296     _compile_id              = compile_id;
1297     _comp_level              = CompLevel_none;
1298     _compiler_type           = type;
1299     _orig_pc_offset          = 0;
1300     _num_stack_arg_slots     = 0;
1301 
1302     if (offsets->value(CodeOffsets::Exceptions) != -1) {
1303       // Continuation enter intrinsic
1304       _exception_offset      = code_offset() + offsets->value(CodeOffsets::Exceptions);
1305     } else {
1306       _exception_offset      = 0;
1307     }
1308     // Native wrappers do not have deopt handlers. Make the values
1309     // something that will never match a pc like the nmethod vtable entry
1310     _deopt_handler_offset    = 0;
1311     _deopt_mh_handler_offset = 0;
1312     _unwind_handler_offset   = 0;
1313 
1314     CHECKED_CAST(_metadata_offset, uint16_t, (align_up(code_buffer->total_oop_size(), oopSize)));
1315     int data_end_offset = _metadata_offset + align_up(code_buffer->total_metadata_size(), wordSize);
1316 #if INCLUDE_JVMCI
1317     // jvmci_data_size is 0 in native wrapper but we need to set offset
1318     // to correctly calculate metadata_end address
1319     CHECKED_CAST(_jvmci_data_offset, uint16_t, data_end_offset);
1320 #endif
< prev index next >