Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 1450:565f45cebac2
Merge
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Thu, 11 Nov 2010 14:16:50 +0100 |
parents | 8cfe3537a0d3 1afbc44ee576 |
children | d603bdbec024 |
comparison
equal
deleted
inserted
replaced
1449:8cfe3537a0d3 | 1450:565f45cebac2 |
---|---|
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 } | 305 } |
306 | 306 |
307 void CodeInstaller::record_scope(jint pc_offset, oop code_pos, oop frame) { | 307 void CodeInstaller::record_scope(jint pc_offset, oop code_pos) { |
308 oop caller_pos = CiCodePos::caller(code_pos); | 308 oop caller_pos = CiCodePos::caller(code_pos); |
309 if (caller_pos != NULL) { | 309 if (caller_pos != NULL) { |
310 oop caller_frame = frame == NULL ? NULL : CiDebugInfo_Frame::caller(frame); | 310 record_scope(pc_offset, caller_pos); |
311 record_scope(pc_offset, caller_pos, caller_frame); | 311 } |
312 } else { | 312 oop frame = NULL; |
313 assert(frame == NULL || CiDebugInfo_Frame::caller(frame) == NULL, "unexpected layout - mismatching nesting of Frame and CiCodePos"); | 313 if (code_pos->klass()->klass_part()->name() == vmSymbols::com_sun_cri_ci_CiDebugInfo_Frame()) { |
314 } | 314 frame = code_pos; |
315 | |
316 if (frame != NULL) { | |
317 assert(CiCodePos::bci(code_pos) == CiCodePos::bci(CiDebugInfo_Frame::codePos(frame)), "unexpected CiCodePos layout"); | |
318 assert(CiCodePos::method(code_pos) == CiCodePos::method(CiDebugInfo_Frame::codePos(frame)), "unexpected CiCodePos layout"); | |
319 } | 315 } |
320 | 316 |
321 oop hotspot_method = CiCodePos::method(code_pos); | 317 oop hotspot_method = CiCodePos::method(code_pos); |
322 assert(hotspot_method != NULL && hotspot_method->is_a(HotSpotMethodResolved::klass()), "unexpected hotspot method"); | 318 assert(hotspot_method != NULL && hotspot_method->is_a(HotSpotMethodResolved::klass()), "unexpected hotspot method"); |
323 methodOop method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(hotspot_method)); | 319 methodOop method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(hotspot_method)); |
375 // address instruction = _instructions->start() + pc_offset; | 371 // address instruction = _instructions->start() + pc_offset; |
376 // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start(); | 372 // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start(); |
377 _debug_recorder->add_safepoint(pc_offset, create_oop_map(_frame_size, _parameter_count, debug_info)); | 373 _debug_recorder->add_safepoint(pc_offset, create_oop_map(_frame_size, _parameter_count, debug_info)); |
378 | 374 |
379 oop code_pos = CiDebugInfo::codePos(debug_info); | 375 oop code_pos = CiDebugInfo::codePos(debug_info); |
380 oop frame = CiDebugInfo::frame(debug_info); | 376 record_scope(pc_offset, code_pos); |
381 record_scope(pc_offset, code_pos, frame); | |
382 | 377 |
383 _debug_recorder->end_safepoint(pc_offset); | 378 _debug_recorder->end_safepoint(pc_offset); |
384 } | 379 } |
385 | 380 |
386 void CodeInstaller::site_Call(CodeBuffer& buffer, jint pc_offset, oop site) { | 381 void CodeInstaller::site_Call(CodeBuffer& buffer, jint pc_offset, oop site) { |
399 jint next_pc_offset = pc_offset + NativeCall::instruction_size; | 394 jint next_pc_offset = pc_offset + NativeCall::instruction_size; |
400 | 395 |
401 if (debug_info != NULL) { | 396 if (debug_info != NULL) { |
402 _debug_recorder->add_safepoint(next_pc_offset, create_oop_map(_frame_size, _parameter_count, debug_info)); | 397 _debug_recorder->add_safepoint(next_pc_offset, create_oop_map(_frame_size, _parameter_count, debug_info)); |
403 oop code_pos = CiDebugInfo::codePos(debug_info); | 398 oop code_pos = CiDebugInfo::codePos(debug_info); |
404 oop frame = CiDebugInfo::frame(debug_info); | 399 record_scope(next_pc_offset, code_pos); |
405 record_scope(next_pc_offset, code_pos, frame); | |
406 } | 400 } |
407 | 401 |
408 if (runtime_call != NULL) { | 402 if (runtime_call != NULL) { |
409 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); | 403 NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); |
410 if (runtime_call == CiRuntimeCall::Debug()) { | 404 if (runtime_call == CiRuntimeCall::Debug()) { |