Mercurial > hg > truffle
diff src/share/vm/c1/c1_Compilation.hpp @ 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 | 4a665be40fd3 |
children | f02a8bbe6ed4 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Compilation.hpp Thu Sep 02 11:40:02 2010 -0700 +++ b/src/share/vm/c1/c1_Compilation.hpp Fri Sep 03 17:51:07 2010 -0700 @@ -69,6 +69,7 @@ bool _has_exception_handlers; bool _has_fpu_code; bool _has_unsafe_access; + bool _would_profile; bool _has_method_handle_invokes; // True if this method has MethodHandle invokes. const char* _bailout_msg; ExceptionInfoList* _exception_info_list; @@ -143,6 +144,7 @@ void set_has_exception_handlers(bool f) { _has_exception_handlers = f; } void set_has_fpu_code(bool f) { _has_fpu_code = f; } void set_has_unsafe_access(bool f) { _has_unsafe_access = f; } + void set_would_profile(bool f) { _would_profile = f; } // Add a set of exception handlers covering the given PC offset void add_exception_handlers_for_pco(int pco, XHandlers* exception_handlers); // Statistics gathering @@ -202,6 +204,30 @@ void compile_only_this_scope(outputStream* st, IRScope* scope); void exclude_this_method(); #endif // PRODUCT + + bool is_profiling() { + return env()->comp_level() == CompLevel_full_profile || + env()->comp_level() == CompLevel_limited_profile; + } + bool count_invocations() { return is_profiling(); } + bool count_backedges() { return is_profiling(); } + + // Helpers for generation of profile information + bool profile_branches() { + return env()->comp_level() == CompLevel_full_profile && + C1UpdateMethodData && C1ProfileBranches; + } + bool profile_calls() { + return env()->comp_level() == CompLevel_full_profile && + C1UpdateMethodData && C1ProfileCalls; + } + bool profile_inlined_calls() { + return profile_calls() && C1ProfileInlinedCalls; + } + bool profile_checkcasts() { + return env()->comp_level() == CompLevel_full_profile && + C1UpdateMethodData && C1ProfileCheckcasts; + } };