Mercurial > hg > truffle
diff src/share/vm/c1/c1_Compilation.cpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | 3e8fbc61cee8 |
children | 22ef3370343b |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Compilation.cpp Thu Sep 02 11:40:02 2010 -0700 +++ b/src/share/vm/c1/c1_Compilation.cpp Fri Sep 03 17:51:07 2010 -0700 @@ -290,9 +290,13 @@ CHECK_BAILOUT_(no_frame_size); + if (is_profiling()) { + method()->build_method_data(); + } + { PhaseTraceTime timeit(_t_buildIR); - build_hir(); + build_hir(); } if (BailoutAfterHIR) { BAILOUT_("Bailing out because of -XX:+BailoutAfterHIR", no_frame_size); @@ -447,6 +451,7 @@ , _masm(NULL) , _has_exception_handlers(false) , _has_fpu_code(true) // pessimistic assumption +, _would_profile(false) , _has_unsafe_access(false) , _has_method_handle_invokes(false) , _bailout_msg(NULL) @@ -461,12 +466,16 @@ #endif // PRODUCT { PhaseTraceTime timeit(_t_compile); - _arena = Thread::current()->resource_area(); _env->set_compiler_data(this); _exception_info_list = new ExceptionInfoList(); _implicit_exception_table.set_size(0); compile_method(); + if (is_profiling() && _would_profile) { + ciMethodData *md = method->method_data(); + assert (md != NULL, "Should have MDO"); + md->set_would_profile(_would_profile); + } } Compilation::~Compilation() {