comparison src/share/vm/graal/graalCodeInstaller.cpp @ 7089:af30115c9d0e

added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
author Doug Simon <doug.simon@oracle.com>
date Wed, 28 Nov 2012 20:39:43 +0100
parents 9ba90252ce08
children dff79b1f82f1
comparison
equal deleted inserted replaced
7088:97d0eae99568 7089:af30115c9d0e
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 #include "precompiled.hpp" 24 #include "precompiled.hpp"
25 #include "runtime/javaCalls.hpp" 25 #include "runtime/javaCalls.hpp"
26 #include "graal/graalEnv.hpp"
26 #include "graal/graalCompiler.hpp" 27 #include "graal/graalCompiler.hpp"
27 #include "graal/graalCodeInstaller.hpp" 28 #include "graal/graalCodeInstaller.hpp"
28 #include "graal/graalJavaAccess.hpp" 29 #include "graal/graalJavaAccess.hpp"
29 #include "graal/graalCompilerToVM.hpp" 30 #include "graal/graalCompilerToVM.hpp"
30 #include "graal/graalVmIds.hpp" 31 #include "graal/graalVmIds.hpp"
31 #include "graal/graalEnv.hpp"
32 #include "c1/c1_Runtime1.hpp" 32 #include "c1/c1_Runtime1.hpp"
33 #include "classfile/vmSymbols.hpp" 33 #include "classfile/vmSymbols.hpp"
34 #include "vmreg_x86.inline.hpp" 34 #include "vmreg_x86.inline.hpp"
35 35
36 36
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, Handle installed_code) { 294 CodeInstaller::CodeInstaller(Handle& comp_result, methodHandle method, GraalEnv::CodeInstallResult& result, 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);
306 process_exception_handlers(); 306 process_exception_handlers();
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 result = GraalEnv::register_method(method, nm, 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, installed_code); 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