diff src/share/vm/oops/methodData.hpp @ 21559:be896a1983c0

recast all Graal native code as JVMCI code (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Thu, 28 May 2015 15:36:48 +0200
parents a04dfbf81bc4
children c28cb37b2e1d
line wrap: on
line diff
--- a/src/share/vm/oops/methodData.hpp	Wed May 27 13:43:27 2015 +0200
+++ b/src/share/vm/oops/methodData.hpp	Thu May 28 15:36:48 2015 +0200
@@ -543,7 +543,7 @@
     //  saw a null operand (cast/aastore/instanceof)
       null_seen_flag              = DataLayout::first_flag + 0
 
-#ifdef GRAAL
+#ifdef JVMCI
     // bytecode threw any exception
     , exception_seen_flag         = null_seen_flag + 1
 #endif
@@ -570,7 +570,7 @@
   bool null_seen()     { return flag_at(null_seen_flag); }
   void set_null_seen()    { set_flag_at(null_seen_flag); }
 
-#ifdef GRAAL
+#ifdef JVMCI
   // true if an exception was thrown at the specific BCI
   bool exception_seen() { return flag_at(exception_seen_flag); }
   void set_exception_seen() { set_flag_at(exception_seen_flag); }
@@ -1179,17 +1179,17 @@
 class ReceiverTypeData : public CounterData {
 protected:
   enum {
-#ifdef GRAAL
+#ifdef JVMCI
     // Description of the different counters
     // ReceiverTypeData for instanceof/checkcast/aastore:
     //   C1/C2: count is incremented on type overflow and decremented for failed type checks
-    //   Graal: count decremented for failed type checks and nonprofiled_count is incremented on type overflow
-    //          TODO (chaeubl): in fact, Graal should also increment the count for failed type checks to mimic the C1/C2 behavior
+    //   JVMCI: count decremented for failed type checks and nonprofiled_count is incremented on type overflow
+    //          TODO (chaeubl): in fact, JVMCI should also increment the count for failed type checks to mimic the C1/C2 behavior
     // VirtualCallData for invokevirtual/invokeinterface:
     //   C1/C2: count is incremented on type overflow
-    //   Graal: count is incremented on type overflow, nonprofiled_count is incremented on method overflow
-
-    // Graal is interested in knowing the percentage of type checks involving a type not explicitly in the profile
+    //   JVMCI: count is incremented on type overflow, nonprofiled_count is incremented on method overflow
+
+    // JVMCI is interested in knowing the percentage of type checks involving a type not explicitly in the profile
     nonprofiled_count_off_set = counter_cell_count,
     receiver0_offset,
 #else
@@ -1209,7 +1209,7 @@
   virtual bool is_ReceiverTypeData() const { return true; }
 
   static int static_cell_count() {
-    return counter_cell_count + (uint) TypeProfileWidth * receiver_type_row_cell_count GRAAL_ONLY(+ 1);
+    return counter_cell_count + (uint) TypeProfileWidth * receiver_type_row_cell_count JVMCI_ONLY(+ 1);
   }
 
   virtual int cell_count() const {
@@ -1271,9 +1271,9 @@
     set_count(0);
     set_receiver(row, NULL);
     set_receiver_count(row, 0);
-#ifdef GRAAL
+#ifdef JVMCI
     if (!this->is_VirtualCallData()) {
-      // if this is a ReceiverTypeData for Graal, the nonprofiled_count
+      // if this is a ReceiverTypeData for JVMCI, the nonprofiled_count
       // must also be reset (see "Description of the different counters" above)
       set_nonprofiled_count(0);
     }
@@ -1287,7 +1287,7 @@
   static ByteSize receiver_count_offset(uint row) {
     return cell_offset(receiver_count_cell_index(row));
   }
-#ifdef GRAAL
+#ifdef JVMCI
   static ByteSize nonprofiled_receiver_count_offset() {
     return cell_offset(nonprofiled_count_off_set);
   }
@@ -1364,7 +1364,7 @@
   static int static_cell_count() {
     // At this point we could add more profile state, e.g., for arguments.
     // But for now it's the same size as the base record type.
-    return ReceiverTypeData::static_cell_count() GRAAL_ONLY(+ (uint) MethodProfileWidth * receiver_type_row_cell_count);
+    return ReceiverTypeData::static_cell_count() JVMCI_ONLY(+ (uint) MethodProfileWidth * receiver_type_row_cell_count);
   }
 
   virtual int cell_count() const {
@@ -1386,7 +1386,7 @@
   }
 #endif // CC_INTERP
 
-#ifdef GRAAL
+#ifdef JVMCI
   static ByteSize method_offset(uint row) {
     return cell_offset(method_cell_index(row));
   }
@@ -1442,7 +1442,7 @@
 #endif
 
 #ifndef PRODUCT
-#ifdef GRAAL
+#ifdef JVMCI
   void print_method_data_on(outputStream* st) const;
 #endif
   void print_data_on(outputStream* st, const char* extra = NULL) const;
@@ -2165,7 +2165,7 @@
 
   // Whole-method sticky bits and flags
   enum {
-    _trap_hist_limit    = 20 GRAAL_ONLY(+5),   // decoupled from Deoptimization::Reason_LIMIT
+    _trap_hist_limit    = 20 JVMCI_ONLY(+5),   // decoupled from Deoptimization::Reason_LIMIT
     _trap_hist_mask     = max_jubyte,
     _extra_data_count   = 4     // extra DataLayout headers, for trap history
   }; // Public flag values
@@ -2210,7 +2210,7 @@
   enum WouldProfile {unknown, no_profile, profile};
   WouldProfile      _would_profile;
 
-#ifdef GRAAL
+#ifdef JVMCI
   // Support for HotSpotMethodData.setCompiledIRSize(int)
   int               _jvmci_ir_size;
 #endif
@@ -2491,7 +2491,7 @@
 
   // Return (uint)-1 for overflow.
   uint trap_count(int reason) const {
-    assert((uint)reason < GRAAL_ONLY(2*) _trap_hist_limit, "oob");
+    assert((uint)reason < JVMCI_ONLY(2*) _trap_hist_limit, "oob");
     return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1;
   }
   // For loops:
@@ -2500,7 +2500,7 @@
   uint inc_trap_count(int reason) {
     // Count another trap, anywhere in this method.
     assert(reason >= 0, "must be single trap");
-    assert((uint)reason < GRAAL_ONLY(2*) _trap_hist_limit, "oob");
+    assert((uint)reason < JVMCI_ONLY(2*) _trap_hist_limit, "oob");
     uint cnt1 = 1 + _trap_hist._array[reason];
     if ((cnt1 & _trap_hist_mask) != 0) {  // if no counter overflow...
       _trap_hist._array[reason] = cnt1;