changeset 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 ae1f36911743
children eb62c63c4549
files src/share/vm/graal/graalCodeInstaller.cpp
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp	Thu Dec 06 14:01:32 2012 +0100
+++ b/src/share/vm/graal/graalCodeInstaller.cpp	Fri Dec 07 11:07:36 2012 +0100
@@ -538,8 +538,12 @@
   // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start();
   _debug_recorder->add_safepoint(pc_offset, -1, create_oop_map(_total_frame_size, _parameter_count, debug_info));
 
-  oop code_pos = DebugInfo::bytecodePosition(debug_info);
-  record_scope(pc_offset, code_pos, new GrowableArray<ScopeValue*>());
+  oop frame = DebugInfo::bytecodePosition(debug_info);
+  if (frame != NULL) {
+    record_scope(pc_offset, frame, new GrowableArray<ScopeValue*>());
+  } else {
+    // Stubs do not record scope info, just oop maps
+  }
 
   _debug_recorder->end_safepoint(pc_offset);
 }
@@ -595,8 +599,13 @@
 
   if (debug_info != NULL) {
     oop frame = DebugInfo::bytecodePosition(debug_info);
-    _debug_recorder->add_safepoint(next_pc_offset, BytecodeFrame::leafGraphId(frame), create_oop_map(_total_frame_size, _parameter_count, debug_info));
-    record_scope(next_pc_offset, frame, new GrowableArray<ScopeValue*>());
+    jlong leaf_graph_id = frame == NULL ? -1 : BytecodeFrame::leafGraphId(frame);
+    _debug_recorder->add_safepoint(next_pc_offset, leaf_graph_id, create_oop_map(_total_frame_size, _parameter_count, debug_info));
+    if (frame != NULL) {
+      record_scope(next_pc_offset, frame, new GrowableArray<ScopeValue*>());
+    } else {
+      // Stubs do not record scope info, just oop maps
+    }
   }
 
   if (global_stub != NULL) {