comparison src/share/vm/graal/graalCodeInstaller.cpp @ 9807:d552919fbb05

Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
author Doug Simon <doug.simon@oracle.com>
date Thu, 23 May 2013 23:23:03 +0200
parents c4b1aa93b9af
children 4d5872186e76
comparison
equal deleted inserted replaced
9806:21b8cd853b2b 9807:d552919fbb05
408 _total_frame_size = CompilationResult::frameSize(comp_result) + HeapWordSize; 408 _total_frame_size = CompilationResult::frameSize(comp_result) + HeapWordSize;
409 _custom_stack_area_offset = CompilationResult::customStackAreaOffset(comp_result); 409 _custom_stack_area_offset = CompilationResult::customStackAreaOffset(comp_result);
410 410
411 // (very) conservative estimate: each site needs a constant section entry 411 // (very) conservative estimate: each site needs a constant section entry
412 _constants_size = _sites->length() * (BytesPerLong*2); 412 _constants_size = _sites->length() * (BytesPerLong*2);
413 #ifndef PRODUCT
414 _comments = (arrayOop) HotSpotCompiledCode::comments(compiled_code);
415 #endif
413 416
414 _next_call_type = MARK_INVOKE_INVALID; 417 _next_call_type = MARK_INVOKE_INVALID;
415 } 418 }
416 419
417 // perform data and call relocation on the CodeBuffer 420 // perform data and call relocation on the CodeBuffer
461 site_Mark(buffer, pc_offset, site); 464 site_Mark(buffer, pc_offset, site);
462 } else { 465 } else {
463 fatal("unexpected Site subclass"); 466 fatal("unexpected Site subclass");
464 } 467 }
465 } 468 }
469
470 #ifndef PRODUCT
471 if (_comments != NULL) {
472 oop* comments = (oop*) _comments->base(T_OBJECT);
473 for (int i = 0; i < _comments->length(); i++) {
474 oop comment = comments[i];
475 assert(comment->is_a(HotSpotCompiledCode_Comment::klass()), "cce");
476 jint offset = HotSpotCompiledCode_Comment::pcOffset(comment);
477 char* text = java_lang_String::as_utf8_string(HotSpotCompiledCode_Comment::text(comment));
478 buffer.block_comment(offset, text);
479 }
480 }
481 #endif
466 } 482 }
467 483
468 void CodeInstaller::assumption_MethodContents(Handle assumption) { 484 void CodeInstaller::assumption_MethodContents(Handle assumption) {
469 Handle method_handle = Assumptions_MethodContents::method(assumption()); 485 Handle method_handle = Assumptions_MethodContents::method(assumption());
470 methodHandle method = getMethodFromHotSpotMethod(method_handle()); 486 methodHandle method = getMethodFromHotSpotMethod(method_handle());