hotspot/src/share/vm/utilities/globalDefinitions.hpp

Print this page




 729   _thread_blocked           = 10, // blocked in vm
 730   _thread_blocked_trans     = 11, // corresponding transition state
 731   _thread_max_state         = 12  // maximum thread state+1 - used for statistics allocation
 732 };
 733 
 734 
 735 // Handy constants for deciding which compiler mode to use.
 736 enum MethodCompilation {
 737   InvocationEntryBci = -1,     // i.e., not a on-stack replacement compilation
 738   InvalidOSREntryBci = -2
 739 };
 740 
 741 // Enumeration to distinguish tiers of compilation
 742 enum CompLevel {
 743   CompLevel_any               = -1,
 744   CompLevel_all               = -1,
 745   CompLevel_none              = 0,         // Interpreter
 746   CompLevel_simple            = 1,         // C1
 747   CompLevel_limited_profile   = 2,         // C1, invocation & backedge counters
 748   CompLevel_full_profile      = 3,         // C1, invocation & backedge counters + mdo
 749   CompLevel_full_optimization = 4,         // C2
 750 
 751 #if defined(COMPILER2)
 752   CompLevel_highest_tier      = CompLevel_full_optimization,  // pure C2 and tiered
 753 #elif defined(COMPILER1)
 754   CompLevel_highest_tier      = CompLevel_simple,             // pure C1
 755 #else
 756   CompLevel_highest_tier      = CompLevel_none,
 757 #endif
 758 
 759 #if defined(TIERED)
 760   CompLevel_initial_compile   = CompLevel_full_profile        // tiered
 761 #elif defined(COMPILER1)
 762   CompLevel_initial_compile   = CompLevel_simple              // pure C1
 763 #elif defined(COMPILER2)
 764   CompLevel_initial_compile   = CompLevel_full_optimization   // pure C2
 765 #else
 766   CompLevel_initial_compile   = CompLevel_none
 767 #endif
 768 };
 769 
 770 inline bool is_c1_compile(int comp_level) {
 771   return comp_level > CompLevel_none && comp_level < CompLevel_full_optimization;
 772 }
 773 
 774 inline bool is_c2_compile(int comp_level) {
 775   return comp_level == CompLevel_full_optimization;
 776 }
 777 
 778 inline bool is_highest_tier_compile(int comp_level) {
 779   return comp_level == CompLevel_highest_tier;
 780 }
 781 
 782 //----------------------------------------------------------------------------------------------------
 783 // 'Forward' declarations of frequently used classes




 729   _thread_blocked           = 10, // blocked in vm
 730   _thread_blocked_trans     = 11, // corresponding transition state
 731   _thread_max_state         = 12  // maximum thread state+1 - used for statistics allocation
 732 };
 733 
 734 
 735 // Handy constants for deciding which compiler mode to use.
 736 enum MethodCompilation {
 737   InvocationEntryBci = -1,     // i.e., not a on-stack replacement compilation
 738   InvalidOSREntryBci = -2
 739 };
 740 
 741 // Enumeration to distinguish tiers of compilation
 742 enum CompLevel {
 743   CompLevel_any               = -1,
 744   CompLevel_all               = -1,
 745   CompLevel_none              = 0,         // Interpreter
 746   CompLevel_simple            = 1,         // C1
 747   CompLevel_limited_profile   = 2,         // C1, invocation & backedge counters
 748   CompLevel_full_profile      = 3,         // C1, invocation & backedge counters + mdo
 749   CompLevel_full_optimization = 4,         // C2 or Shark
 750 
 751 #if defined(COMPILER2) || defined(SHARK)
 752   CompLevel_highest_tier      = CompLevel_full_optimization,  // pure C2 and tiered
 753 #elif defined(COMPILER1)
 754   CompLevel_highest_tier      = CompLevel_simple,             // pure C1
 755 #else
 756   CompLevel_highest_tier      = CompLevel_none,
 757 #endif
 758 
 759 #if defined(TIERED)
 760   CompLevel_initial_compile   = CompLevel_full_profile        // tiered
 761 #elif defined(COMPILER1)
 762   CompLevel_initial_compile   = CompLevel_simple              // pure C1
 763 #elif defined(COMPILER2) || defined(SHARK)
 764   CompLevel_initial_compile   = CompLevel_full_optimization   // pure C2
 765 #else
 766   CompLevel_initial_compile   = CompLevel_none
 767 #endif
 768 };
 769 
 770 inline bool is_c1_compile(int comp_level) {
 771   return comp_level > CompLevel_none && comp_level < CompLevel_full_optimization;
 772 }
 773 
 774 inline bool is_c2_compile(int comp_level) {
 775   return comp_level == CompLevel_full_optimization;
 776 }
 777 
 778 inline bool is_highest_tier_compile(int comp_level) {
 779   return comp_level == CompLevel_highest_tier;
 780 }
 781 
 782 //----------------------------------------------------------------------------------------------------
 783 // 'Forward' declarations of frequently used classes