comparison src/share/vm/graal/graalCodeInstaller.cpp @ 7139:045c5f8ae689

modified code installation to handle debug info that only contains oop maps but no frame information
author Doug Simon <doug.simon@oracle.com>
date Fri, 07 Dec 2012 11:07:36 +0100
parents 1baf7f1e3f23
children 5d0bb7d52783
comparison
equal deleted inserted replaced
7138:ae1f36911743 7139:045c5f8ae689
536 536
537 // address instruction = _instructions->start() + pc_offset; 537 // address instruction = _instructions->start() + pc_offset;
538 // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start(); 538 // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start();
539 _debug_recorder->add_safepoint(pc_offset, -1, create_oop_map(_total_frame_size, _parameter_count, debug_info)); 539 _debug_recorder->add_safepoint(pc_offset, -1, create_oop_map(_total_frame_size, _parameter_count, debug_info));
540 540
541 oop code_pos = DebugInfo::bytecodePosition(debug_info); 541 oop frame = DebugInfo::bytecodePosition(debug_info);
542 record_scope(pc_offset, code_pos, new GrowableArray<ScopeValue*>()); 542 if (frame != NULL) {
543 record_scope(pc_offset, frame, new GrowableArray<ScopeValue*>());
544 } else {
545 // Stubs do not record scope info, just oop maps
546 }
543 547
544 _debug_recorder->end_safepoint(pc_offset); 548 _debug_recorder->end_safepoint(pc_offset);
545 } 549 }
546 550
547 void CodeInstaller::site_Call(CodeBuffer& buffer, jint pc_offset, oop site) { 551 void CodeInstaller::site_Call(CodeBuffer& buffer, jint pc_offset, oop site) {
593 return; 597 return;
594 } 598 }
595 599
596 if (debug_info != NULL) { 600 if (debug_info != NULL) {
597 oop frame = DebugInfo::bytecodePosition(debug_info); 601 oop frame = DebugInfo::bytecodePosition(debug_info);
598 _debug_recorder->add_safepoint(next_pc_offset, BytecodeFrame::leafGraphId(frame), create_oop_map(_total_frame_size, _parameter_count, debug_info)); 602 jlong leaf_graph_id = frame == NULL ? -1 : BytecodeFrame::leafGraphId(frame);
599 record_scope(next_pc_offset, frame, new GrowableArray<ScopeValue*>()); 603 _debug_recorder->add_safepoint(next_pc_offset, leaf_graph_id, create_oop_map(_total_frame_size, _parameter_count, debug_info));
604 if (frame != NULL) {
605 record_scope(next_pc_offset, frame, new GrowableArray<ScopeValue*>());
606 } else {
607 // Stubs do not record scope info, just oop maps
608 }
600 } 609 }
601 610
602 if (global_stub != NULL) { 611 if (global_stub != NULL) {
603 assert(java_lang_boxing_object::is_instance(global_stub, T_LONG), "global_stub needs to be of type Long"); 612 assert(java_lang_boxing_object::is_instance(global_stub, T_LONG), "global_stub needs to be of type Long");
604 613