6953144: Tiered compilation

Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.

Reviewed-by: kvn, never, phh, twisti
This commit is contained in:
Igor Veresov 2010-09-03 17:51:07 -07:00
parent 6e78f6cb4b
commit 2c66a6c3fd
104 changed files with 7720 additions and 1701 deletions

View file

@ -710,24 +710,41 @@ enum MethodCompilation {
// 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;
}