comparison src/share/vm/jvmci/jvmciCodeInstaller.cpp @ 21731:df9d2375512a

Track max live register value in reference map
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 03 Jun 2015 20:24:05 -0700
parents b9f9b8af17ff
children 861108f5408e
comparison
equal deleted inserted replaced
21730:b9f9b8af17ff 21731:df9d2375512a
70 } 70 }
71 71
72 // creates a HotSpot oop map out of the byte arrays provided by DebugInfo 72 // creates a HotSpot oop map out of the byte arrays provided by DebugInfo
73 OopMap* CodeInstaller::create_oop_map(oop debug_info) { 73 OopMap* CodeInstaller::create_oop_map(oop debug_info) {
74 oop reference_map = DebugInfo::referenceMap(debug_info); 74 oop reference_map = DebugInfo::referenceMap(debug_info);
75 if (HotSpotReferenceMap::maxRegisterSize(reference_map) > 16) {
76 _has_wide_vector = true;
77 }
75 OopMap* map = new OopMap(_total_frame_size, _parameter_count); 78 OopMap* map = new OopMap(_total_frame_size, _parameter_count);
76 objArrayOop objects = HotSpotReferenceMap::objects(reference_map); 79 objArrayOop objects = HotSpotReferenceMap::objects(reference_map);
77 typeArrayOop bytesPerArray = HotSpotReferenceMap::bytesPerElement(reference_map); 80 typeArrayOop bytesPerArray = HotSpotReferenceMap::bytesPerElement(reference_map);
78 for (int i = 0; i < objects->length(); i++) { 81 for (int i = 0; i < objects->length(); i++) {
79 oop value = objects->obj_at(i); 82 oop value = objects->obj_at(i);
445 JVMCIEnv* env = (JVMCIEnv*) (address) HotSpotCompiledNmethod::jvmciEnv(compiled_code); 448 JVMCIEnv* env = (JVMCIEnv*) (address) HotSpotCompiledNmethod::jvmciEnv(compiled_code);
446 if (id == -1) { 449 if (id == -1) {
447 // Make sure a valid compile_id is associated with every compile 450 // Make sure a valid compile_id is associated with every compile
448 id = CompileBroker::assign_compile_id_unlocked(Thread::current(), method, entry_bci); 451 id = CompileBroker::assign_compile_id_unlocked(Thread::current(), method, entry_bci);
449 } 452 }
450 result = JVMCIEnv::register_method(method, nm, entry_bci, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, 453 result = JVMCIEnv::register_method(method, nm, entry_bci, &_offsets, _custom_stack_area_offset, &buffer,
451 JVMCICompiler::instance(), _debug_recorder, _dependencies, env, id, false, installed_code, compiled_code, speculation_log); 454 stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table,
455 JVMCICompiler::instance(), _debug_recorder, _dependencies, env, id,
456 false, _has_wide_vector, installed_code, compiled_code, speculation_log);
452 cb = nm; 457 cb = nm;
453 } 458 }
454 459
455 if (cb != NULL) { 460 if (cb != NULL) {
456 // Make sure the pre-calculated constants section size was correct. 461 // Make sure the pre-calculated constants section size was correct.
488 #ifndef PRODUCT 493 #ifndef PRODUCT
489 _comments_handle = JNIHandles::make_local(HotSpotCompiledCode::comments(compiled_code)); 494 _comments_handle = JNIHandles::make_local(HotSpotCompiledCode::comments(compiled_code));
490 #endif 495 #endif
491 496
492 _next_call_type = INVOKE_INVALID; 497 _next_call_type = INVOKE_INVALID;
498
499 _has_wide_vector = false;
493 } 500 }
494 501
495 int CodeInstaller::estimate_stub_entries() { 502 int CodeInstaller::estimate_stub_entries() {
496 // Estimate the number of static call stubs that might be emitted. 503 // Estimate the number of static call stubs that might be emitted.
497 int static_call_stubs = 0; 504 int static_call_stubs = 0;