comparison 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
comparison
equal deleted inserted replaced
1782:f353275af40e 1783:d5d065957597
708 InvalidOSREntryBci = -2 708 InvalidOSREntryBci = -2
709 }; 709 };
710 710
711 // Enumeration to distinguish tiers of compilation 711 // Enumeration to distinguish tiers of compilation
712 enum CompLevel { 712 enum CompLevel {
713 CompLevel_none = 0, 713 CompLevel_any = -1,
714 CompLevel_fast_compile = 1, 714 CompLevel_all = -1,
715 CompLevel_full_optimization = 2, 715 CompLevel_none = 0, // Interpreter
716 716 CompLevel_simple = 1, // C1
717 CompLevel_highest_tier = CompLevel_full_optimization, 717 CompLevel_limited_profile = 2, // C1, invocation & backedge counters
718 #ifdef TIERED 718 CompLevel_full_profile = 3, // C1, invocation & backedge counters + mdo
719 CompLevel_initial_compile = CompLevel_fast_compile 719 CompLevel_full_optimization = 4, // C2
720
721 #if defined(COMPILER2)
722 CompLevel_highest_tier = CompLevel_full_optimization, // pure C2 and tiered
723 #elif defined(COMPILER1)
724 CompLevel_highest_tier = CompLevel_simple, // pure C1
720 #else 725 #else
721 CompLevel_initial_compile = CompLevel_full_optimization 726 CompLevel_highest_tier = CompLevel_none,
722 #endif // TIERED 727 #endif
728
729 #if defined(TIERED)
730 CompLevel_initial_compile = CompLevel_full_profile // tiered
731 #elif defined(COMPILER1)
732 CompLevel_initial_compile = CompLevel_simple // pure C1
733 #elif defined(COMPILER2)
734 CompLevel_initial_compile = CompLevel_full_optimization // pure C2
735 #else
736 CompLevel_initial_compile = CompLevel_none
737 #endif
723 }; 738 };
724 739
725 inline bool is_tier1_compile(int comp_level) { 740 inline bool is_c1_compile(int comp_level) {
726 return comp_level == CompLevel_fast_compile; 741 return comp_level > CompLevel_none && comp_level < CompLevel_full_optimization;
727 } 742 }
728 inline bool is_tier2_compile(int comp_level) { 743
744 inline bool is_c2_compile(int comp_level) {
729 return comp_level == CompLevel_full_optimization; 745 return comp_level == CompLevel_full_optimization;
730 } 746 }
747
731 inline bool is_highest_tier_compile(int comp_level) { 748 inline bool is_highest_tier_compile(int comp_level) {
732 return comp_level == CompLevel_highest_tier; 749 return comp_level == CompLevel_highest_tier;
733 } 750 }
734 751
735 //---------------------------------------------------------------------------------------------------- 752 //----------------------------------------------------------------------------------------------------