Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 7000:bf2ea3ed3bce
Fixed nmethod not being unloaded after their classloader has been unloaded by initializing _graal_installed_code in an nmethod's constructor
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 21 Nov 2012 23:33:43 +0100 |
parents | eec373d34caf |
children | bb524ee6b8e9 |
comparison
equal
deleted
inserted
replaced
6999:679e6584c177 | 7000:bf2ea3ed3bce |
---|---|
289 } | 289 } |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 // constructor used to create a method | 293 // constructor used to create a method |
294 CodeInstaller::CodeInstaller(Handle& comp_result, methodHandle method, nmethod*& nm, bool bind_to_method) { | 294 CodeInstaller::CodeInstaller(Handle& comp_result, methodHandle method, nmethod*& nm, Handle installed_code) { |
295 _env = CURRENT_ENV; | 295 _env = CURRENT_ENV; |
296 GraalCompiler::initialize_buffer_blob(); | 296 GraalCompiler::initialize_buffer_blob(); |
297 CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); | 297 CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); |
298 jobject comp_result_obj = JNIHandles::make_local(comp_result()); | 298 jobject comp_result_obj = JNIHandles::make_local(comp_result()); |
299 jint entry_bci = HotSpotCompilationResult::entryBCI(comp_result); | 299 jint entry_bci = HotSpotCompilationResult::entryBCI(comp_result); |
307 } | 307 } |
308 | 308 |
309 int stack_slots = _total_frame_size / HeapWordSize; // conversion to words | 309 int stack_slots = _total_frame_size / HeapWordSize; // conversion to words |
310 | 310 |
311 nm = GraalEnv::register_method(method, entry_bci, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, | 311 nm = GraalEnv::register_method(method, entry_bci, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, |
312 &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, true, false, bind_to_method); | 312 &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, true, false, installed_code); |
313 | 313 |
314 method->clear_queued_for_compilation(); | 314 method->clear_queued_for_compilation(); |
315 } | 315 } |
316 | 316 |
317 // constructor used to create a stub | 317 // constructor used to create a stub |