Mercurial > hg > truffle
diff src/share/vm/utilities/globalDefinitions.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 | d6f45b55c972 |
children | a83b0246bb77 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions.hpp Thu Sep 02 11:40:02 2010 -0700 +++ b/src/share/vm/utilities/globalDefinitions.hpp Fri Sep 03 17:51:07 2010 -0700 @@ -710,24 +710,41 @@ // Enumeration to distinguish tiers of compilation enum CompLevel { - CompLevel_none = 0, - CompLevel_fast_compile = 1, - CompLevel_full_optimization = 2, + CompLevel_any = -1, + CompLevel_all = -1, + CompLevel_none = 0, // Interpreter + CompLevel_simple = 1, // C1 + CompLevel_limited_profile = 2, // C1, invocation & backedge counters + CompLevel_full_profile = 3, // C1, invocation & backedge counters + mdo + CompLevel_full_optimization = 4, // C2 - CompLevel_highest_tier = CompLevel_full_optimization, -#ifdef TIERED - CompLevel_initial_compile = CompLevel_fast_compile +#if defined(COMPILER2) + CompLevel_highest_tier = CompLevel_full_optimization, // pure C2 and tiered +#elif defined(COMPILER1) + CompLevel_highest_tier = CompLevel_simple, // pure C1 #else - CompLevel_initial_compile = CompLevel_full_optimization -#endif // TIERED + CompLevel_highest_tier = CompLevel_none, +#endif + +#if defined(TIERED) + CompLevel_initial_compile = CompLevel_full_profile // tiered +#elif defined(COMPILER1) + CompLevel_initial_compile = CompLevel_simple // pure C1 +#elif defined(COMPILER2) + CompLevel_initial_compile = CompLevel_full_optimization // pure C2 +#else + CompLevel_initial_compile = CompLevel_none +#endif }; -inline bool is_tier1_compile(int comp_level) { - return comp_level == CompLevel_fast_compile; +inline bool is_c1_compile(int comp_level) { + return comp_level > CompLevel_none && comp_level < CompLevel_full_optimization; } -inline bool is_tier2_compile(int comp_level) { + +inline bool is_c2_compile(int comp_level) { return comp_level == CompLevel_full_optimization; } + inline bool is_highest_tier_compile(int comp_level) { return comp_level == CompLevel_highest_tier; }