hotspot/src/share/vm/utilities/globalDefinitions.hpp
changeset 6453 970dc585ab63
parent 6433 b0e4fafdc38b
child 6459 3d75ed40a975
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Thu Sep 02 11:40:02 2010 -0700
+++ b/hotspot/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;
 }