comparison src/share/vm/graal/graalCodeInstaller.cpp @ 8215:b89a97928e72

Implement weak reference semantics for HotSpotInstalledCode in the default method installation case. Add new boolean[] array as parameter to the code installation.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 11 Mar 2013 20:55:05 +0100
parents b8f261ba79c6
children 99a71b8c1c5d
comparison
equal deleted inserted replaced
8205:9efef773f521 8215:b89a97928e72
324 324
325 return result; 325 return result;
326 } 326 }
327 327
328 // constructor used to create a method 328 // constructor used to create a method
329 CodeInstaller::CodeInstaller(Handle& comp_result, methodHandle method, GraalEnv::CodeInstallResult& result, nmethod*& nm, Handle installed_code) { 329 CodeInstaller::CodeInstaller(Handle& comp_result, methodHandle method, GraalEnv::CodeInstallResult& result, nmethod*& nm, Handle installed_code, Handle triggered_deoptimizations) {
330 GraalCompiler::initialize_buffer_blob(); 330 GraalCompiler::initialize_buffer_blob();
331 CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); 331 CodeBuffer buffer(JavaThread::current()->get_buffer_blob());
332 jobject comp_result_obj = JNIHandles::make_local(comp_result()); 332 jobject comp_result_obj = JNIHandles::make_local(comp_result());
333 jint entry_bci = HotSpotCompilationResult::entryBCI(comp_result); 333 jint entry_bci = HotSpotCompilationResult::entryBCI(comp_result);
334 initialize_assumptions(JNIHandles::resolve(comp_result_obj)); 334 initialize_assumptions(JNIHandles::resolve(comp_result_obj));
342 342
343 int stack_slots = _total_frame_size / HeapWordSize; // conversion to words 343 int stack_slots = _total_frame_size / HeapWordSize; // conversion to words
344 GrowableArray<jlong>* leaf_graph_ids = get_leaf_graph_ids(comp_result); 344 GrowableArray<jlong>* leaf_graph_ids = get_leaf_graph_ids(comp_result);
345 345
346 result = GraalEnv::register_method(method, nm, entry_bci, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, 346 result = GraalEnv::register_method(method, nm, entry_bci, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table,
347 GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, true, false, leaf_graph_ids, installed_code); 347 GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, true, false, leaf_graph_ids, installed_code, triggered_deoptimizations);
348 348
349 method->clear_queued_for_compilation(); 349 method->clear_queued_for_compilation();
350 } 350 }
351 351
352 // constructor used to create a stub 352 // constructor used to create a stub