hotspot Cdiff src/share/vm/oops/methodData.hpp (original) (raw)

src/share/vm/oops/methodData.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/oops/methodData.hpp Print this page


*** 538,547 **** --- 538,551 ---- protected: enum { // null_seen: // saw a null operand (cast/aastore/instanceof) null_seen_flag = DataLayout::first_flag + 0


*** 561,570 **** --- 565,579 ---- // The null_seen flag bit is specially known to the interpreter. // Consulting it allows the compiler to avoid setting up null_check traps. bool null_seen() { return flag_at(null_seen_flag); } void set_null_seen() { set_flag_at(null_seen_flag); }


*** 1164,1174 **** --- 1173,1198 ---- // that the check is reached, and a series of (Klass*, count) pairs // which are used to store a type profile for the receiver of the check. class ReceiverTypeData : public CounterData { protected: enum {


*** 1179,1189 **** }

virtual bool is_ReceiverTypeData() const { return true; }

static int static_cell_count() {

! return counter_cell_count + (uint) TypeProfileWidth * receiver_type_row_cell_count; }

virtual int cell_count() const {
  return static_cell_count();
}

--- 1203,1213 ---- }

virtual bool is_ReceiverTypeData() const { return true; }

static int static_cell_count() {

! return counter_cell_count + (uint) TypeProfileWidth * receiver_type_row_cell_count JVMCI_ONLY(+ 1); }

virtual int cell_count() const {
  return static_cell_count();
}

*** 1241,1259 **** --- 1265,1301 ---- // We do sorting a profiling info (ciCallProfile) for compilation. // set_count(0); set_receiver(row, NULL); set_receiver_count(row, 0);


*** 1314,1324 **** virtual bool is_VirtualCallData() const { return true; }

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(); }

virtual int cell_count() const {
  return static_cell_count();
}

--- 1356,1366 ---- virtual bool is_VirtualCallData() const { return true; }

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() JVMCI_ONLY(+ (uint) MethodProfileWidth * receiver_type_row_cell_count); }

virtual int cell_count() const {
  return static_cell_count();
}

*** 1336,1345 **** --- 1378,1445 ---- static DataLayout* advance(DataLayout* layout) { return (DataLayout*) (((address)layout) + (ssize_t)VirtualCallData::virtual_call_data_size_in_bytes()); } #endif // CC_INTERP


*** 2051,2064 **** public: static MethodData* allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS); MethodData() : _extra_data_lock(Monitor::leaf, "MDO extra data lock") {}; // For ciMethodData

bool is_methodData() const volatile { return true; }

// Whole-method sticky bits and flags
enum {

! _trap_hist_limit = 22, // decoupled from Deoptimization::Reason_LIMIT _trap_hist_mask = max_jubyte, _extra_data_count = 4 // extra DataLayout headers, for trap history }; // Public flag values private: uint _nof_decompiles; // count of all nmethod removals --- 2151,2165 ---- public: static MethodData* allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS); MethodData() : _extra_data_lock(Monitor::leaf, "MDO extra data lock") {}; // For ciMethodData

bool is_methodData() const volatile { return true; }

! _trap_hist_limit = 22 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 private: uint _nof_decompiles; // count of all nmethod removals


*** 2102,2111 **** --- 2203,2217 ---- short _num_blocks; // Does this method contain anything worth profiling? enum WouldProfile {unknown, no_profile, profile}; WouldProfile _would_profile;


*** 2380,2410 **** int extra_data_size() const { return (address)extra_data_limit() - (address)extra_data_base(); } static DataLayout* next_extra(DataLayout* dp);

// Return (uint)-1 for overflow.
uint trap_count(int reason) const {

! assert((uint)reason < _trap_hist_limit, "oob"); return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1; } // For loops: static uint trap_reason_limit() { return _trap_hist_limit; } static uint trap_count_limit() { return _trap_hist_mask; } uint inc_trap_count(int reason) { // Count another trap, anywhere in this method. assert(reason >= 0, "must be single trap"); ! if ((uint)reason < _trap_hist_limit) { uint cnt1 = 1 + _trap_hist._array[reason]; if ((cnt1 & _trap_hist_mask) != 0) { // if no counter overflow... _trap_hist._array[reason] = cnt1; return cnt1; } else { return _trap_hist_mask + (++_nof_overflow_traps); }

--- 2486,2512 ---- int extra_data_size() const { return (address)extra_data_limit() - (address)extra_data_base(); } static DataLayout* next_extra(DataLayout* dp);

// Return (uint)-1 for overflow.
uint trap_count(int reason) const {

! assert((uint)reason < JVMCI_ONLY(2*) _trap_hist_limit, "oob"); return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1; } // For loops: static uint trap_reason_limit() { return _trap_hist_limit; } static uint trap_count_limit() { return _trap_hist_mask; } uint inc_trap_count(int reason) { // Count another trap, anywhere in this method. assert(reason >= 0, "must be single trap"); ! 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; return cnt1; } else { return _trap_hist_mask + (++_nof_overflow_traps); } }

uint overflow_trap_count() const {
  return _nof_overflow_traps;
}

*** 2444,2453 **** --- 2546,2559 ---- // Support for code generation static ByteSize data_offset() { return byte_offset_of(MethodData, _data[0]); }

src/share/vm/oops/methodData.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File