Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 17335:508e88b5f1d3
Don't hang onto code install references after install finished
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 02 Oct 2014 10:59:03 -0700 |
parents | 6fcb6691fe5f |
children | 44b83285b645 |
comparison
equal
deleted
inserted
replaced
17334:0563b652c052 | 17335:508e88b5f1d3 |
---|---|
466 } else { | 466 } else { |
467 assert(compiled_code->is_a(HotSpotCompiledRuntimeStub::klass()), "CCE"); | 467 assert(compiled_code->is_a(HotSpotCompiledRuntimeStub::klass()), "CCE"); |
468 // TODO (ds) not sure if this is correct - only used in OopMap constructor for non-product builds | 468 // TODO (ds) not sure if this is correct - only used in OopMap constructor for non-product builds |
469 _parameter_count = 0; | 469 _parameter_count = 0; |
470 } | 470 } |
471 _sites_handle = JNIHandles::make_global(HotSpotCompiledCode::sites(compiled_code)); | 471 _sites_handle = JNIHandles::make_local(HotSpotCompiledCode::sites(compiled_code)); |
472 _exception_handlers_handle = JNIHandles::make_global(HotSpotCompiledCode::exceptionHandlers(compiled_code)); | 472 _exception_handlers_handle = JNIHandles::make_local(HotSpotCompiledCode::exceptionHandlers(compiled_code)); |
473 | 473 |
474 _code_handle = JNIHandles::make_global(CompilationResult::targetCode(comp_result)); | 474 _code_handle = JNIHandles::make_local(CompilationResult::targetCode(comp_result)); |
475 _code_size = CompilationResult::targetCodeSize(comp_result); | 475 _code_size = CompilationResult::targetCodeSize(comp_result); |
476 _total_frame_size = CompilationResult::totalFrameSize(comp_result); | 476 _total_frame_size = CompilationResult::totalFrameSize(comp_result); |
477 _custom_stack_area_offset = CompilationResult::customStackAreaOffset(comp_result); | 477 _custom_stack_area_offset = CompilationResult::customStackAreaOffset(comp_result); |
478 | 478 |
479 // Pre-calculate the constants section size. This is required for PC-relative addressing. | 479 // Pre-calculate the constants section size. This is required for PC-relative addressing. |
480 _data_section_handle = JNIHandles::make_global(HotSpotCompiledCode::dataSection(compiled_code)); | 480 _data_section_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSection(compiled_code)); |
481 guarantee(DataSection::sectionAlignment(data_section()) <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin"); | 481 guarantee(DataSection::sectionAlignment(data_section()) <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin"); |
482 arrayHandle data = (arrayOop) DataSection::data(data_section()); | 482 arrayHandle data = (arrayOop) DataSection::data(data_section()); |
483 _constants_size = data->length(); | 483 _constants_size = data->length(); |
484 if (_constants_size > 0) { | 484 if (_constants_size > 0) { |
485 _constants_size = align_size_up(_constants_size, _constants->alignment()); | 485 _constants_size = align_size_up(_constants_size, _constants->alignment()); |
486 } | 486 } |
487 | 487 |
488 #ifndef PRODUCT | 488 #ifndef PRODUCT |
489 _comments_handle = JNIHandles::make_global((arrayOop) HotSpotCompiledCode::comments(compiled_code)); | 489 _comments_handle = JNIHandles::make_local((arrayOop) HotSpotCompiledCode::comments(compiled_code)); |
490 #endif | 490 #endif |
491 | 491 |
492 _next_call_type = INVOKE_INVALID; | 492 _next_call_type = INVOKE_INVALID; |
493 } | 493 } |
494 | 494 |