Mercurial > hg > graal-compiler
changeset 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 | 0563b652c052 |
children | 329eee851ee1 |
files | src/share/vm/graal/graalCodeInstaller.cpp src/share/vm/graal/graalCodeInstaller.hpp |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Oct 02 10:57:03 2014 -0700 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Oct 02 10:59:03 2014 -0700 @@ -468,16 +468,16 @@ // TODO (ds) not sure if this is correct - only used in OopMap constructor for non-product builds _parameter_count = 0; } - _sites_handle = JNIHandles::make_global(HotSpotCompiledCode::sites(compiled_code)); - _exception_handlers_handle = JNIHandles::make_global(HotSpotCompiledCode::exceptionHandlers(compiled_code)); + _sites_handle = JNIHandles::make_local(HotSpotCompiledCode::sites(compiled_code)); + _exception_handlers_handle = JNIHandles::make_local(HotSpotCompiledCode::exceptionHandlers(compiled_code)); - _code_handle = JNIHandles::make_global(CompilationResult::targetCode(comp_result)); + _code_handle = JNIHandles::make_local(CompilationResult::targetCode(comp_result)); _code_size = CompilationResult::targetCodeSize(comp_result); _total_frame_size = CompilationResult::totalFrameSize(comp_result); _custom_stack_area_offset = CompilationResult::customStackAreaOffset(comp_result); // Pre-calculate the constants section size. This is required for PC-relative addressing. - _data_section_handle = JNIHandles::make_global(HotSpotCompiledCode::dataSection(compiled_code)); + _data_section_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSection(compiled_code)); guarantee(DataSection::sectionAlignment(data_section()) <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin"); arrayHandle data = (arrayOop) DataSection::data(data_section()); _constants_size = data->length(); @@ -486,7 +486,7 @@ } #ifndef PRODUCT - _comments_handle = JNIHandles::make_global((arrayOop) HotSpotCompiledCode::comments(compiled_code)); + _comments_handle = JNIHandles::make_local((arrayOop) HotSpotCompiledCode::comments(compiled_code)); #endif _next_call_type = INVOKE_INVALID;
--- a/src/share/vm/graal/graalCodeInstaller.hpp Thu Oct 02 10:57:03 2014 -0700 +++ b/src/share/vm/graal/graalCodeInstaller.hpp Thu Oct 02 10:59:03 2014 -0700 @@ -29,7 +29,7 @@ /* * This class handles the conversion from a InstalledCode to a CodeBlob or an nmethod. */ -class CodeInstaller { +class CodeInstaller : public StackObj { friend class VMStructs; private: enum MarkId { @@ -96,7 +96,7 @@ public: - CodeInstaller() {}; + CodeInstaller() {} GraalEnv::CodeInstallResult install(Handle& compiled_code, CodeBlob*& cb, Handle installed_code, Handle speculation_log); static address runtime_call_target_address(oop runtime_call);