Mercurial > hg > truffle
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 9003:a8fea2979e63
eager infopoint mode (fka debug mode)
author | Michael Haupt <michael.haupt@oracle.com> |
---|---|
date | Thu, 11 Apr 2013 09:53:10 +0200 |
parents | ec06c7e67698 |
children | 9f3a77848ea2 |
comparison
equal
deleted
inserted
replaced
8901:8ddaac81cb21 | 9003:a8fea2979e63 |
---|---|
414 jint pc_offset = CompilationResult_Site::pcOffset(site); | 414 jint pc_offset = CompilationResult_Site::pcOffset(site); |
415 | 415 |
416 if (site->is_a(CompilationResult_Call::klass())) { | 416 if (site->is_a(CompilationResult_Call::klass())) { |
417 TRACE_graal_4("call at %i", pc_offset); | 417 TRACE_graal_4("call at %i", pc_offset); |
418 site_Call(buffer, pc_offset, site); | 418 site_Call(buffer, pc_offset, site); |
419 } else if (site->is_a(CompilationResult_Safepoint::klass())) { | 419 } else if (site->is_a(CompilationResult_Infopoint::klass())) { |
420 TRACE_graal_4("safepoint at %i", pc_offset); | 420 // three reasons for infopoints denote actual safepoints |
421 site_Safepoint(buffer, pc_offset, site); | 421 oop reason = CompilationResult_Infopoint::reason(site); |
422 if (InfopointReason::SAFEPOINT() == reason || InfopointReason::CALL() == reason || InfopointReason::IMPLICIT_EXCEPTION() == reason) { | |
423 TRACE_graal_4("safepoint at %i", pc_offset); | |
424 site_Safepoint(buffer, pc_offset, site); | |
425 } else { | |
426 // if the infopoint is not an actual safepoint, it must have one of the other reasons | |
427 // (safeguard against new safepoint types that require handling above) | |
428 assert(InfopointReason::METHOD_START() == reason || InfopointReason::METHOD_END() == reason || InfopointReason::LINE_NUMBER() == reason, ""); | |
429 } | |
422 } else if (site->is_a(CompilationResult_DataPatch::klass())) { | 430 } else if (site->is_a(CompilationResult_DataPatch::klass())) { |
423 TRACE_graal_4("datapatch at %i", pc_offset); | 431 TRACE_graal_4("datapatch at %i", pc_offset); |
424 site_DataPatch(buffer, pc_offset, site); | 432 site_DataPatch(buffer, pc_offset, site); |
425 } else if (site->is_a(CompilationResult_Mark::klass())) { | 433 } else if (site->is_a(CompilationResult_Mark::klass())) { |
426 TRACE_graal_4("mark at %i", pc_offset); | 434 TRACE_graal_4("mark at %i", pc_offset); |
576 | 584 |
577 _debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, false, false, locals_token, expressions_token, monitors_token); | 585 _debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, false, false, locals_token, expressions_token, monitors_token); |
578 } | 586 } |
579 | 587 |
580 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, oop site) { | 588 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, oop site) { |
581 oop debug_info = CompilationResult_Safepoint::debugInfo(site); | 589 oop debug_info = CompilationResult_Infopoint::debugInfo(site); |
582 assert(debug_info != NULL, "debug info expected"); | 590 assert(debug_info != NULL, "debug info expected"); |
583 | 591 |
584 // address instruction = _instructions->start() + pc_offset; | 592 // address instruction = _instructions->start() + pc_offset; |
585 // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start(); | 593 // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start(); |
586 _debug_recorder->add_safepoint(pc_offset, create_oop_map(_total_frame_size, _parameter_count, debug_info)); | 594 _debug_recorder->add_safepoint(pc_offset, create_oop_map(_total_frame_size, _parameter_count, debug_info)); |