Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/methodData.hpp @ 13279:05de8cf71a41
fixed broken assertions
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 10 Dec 2013 21:40:12 +0100 |
parents | 51e97f88c771 |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
13278:038f55aab194 | 13279:05de8cf71a41 |
---|---|
2191 - (address)extra_data_base(); } | 2191 - (address)extra_data_base(); } |
2192 static DataLayout* next_extra(DataLayout* dp) { return (DataLayout*)((address)dp + in_bytes(DataLayout::cell_offset(0))); } | 2192 static DataLayout* next_extra(DataLayout* dp) { return (DataLayout*)((address)dp + in_bytes(DataLayout::cell_offset(0))); } |
2193 | 2193 |
2194 // Return (uint)-1 for overflow. | 2194 // Return (uint)-1 for overflow. |
2195 uint trap_count(int reason) const { | 2195 uint trap_count(int reason) const { |
2196 assert((uint)reason < _trap_hist_limit, "oob"); | 2196 assert((uint)reason < GRAAL_ONLY(2*) _trap_hist_limit, "oob"); |
2197 return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1; | 2197 return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1; |
2198 } | 2198 } |
2199 // For loops: | 2199 // For loops: |
2200 static uint trap_reason_limit() { return _trap_hist_limit; } | 2200 static uint trap_reason_limit() { return _trap_hist_limit; } |
2201 static uint trap_count_limit() { return _trap_hist_mask; } | 2201 static uint trap_count_limit() { return _trap_hist_mask; } |
2202 uint inc_trap_count(int reason) { | 2202 uint inc_trap_count(int reason) { |
2203 // Count another trap, anywhere in this method. | 2203 // Count another trap, anywhere in this method. |
2204 assert(reason >= 0, "must be single trap"); | 2204 assert(reason >= 0, "must be single trap"); |
2205 assert((uint)reason < _trap_hist_limit, "oob"); | 2205 assert((uint)reason < GRAAL_ONLY(2*) _trap_hist_limit, "oob"); |
2206 uint cnt1 = 1 + _trap_hist._array[reason]; | 2206 uint cnt1 = 1 + _trap_hist._array[reason]; |
2207 if ((cnt1 & _trap_hist_mask) != 0) { // if no counter overflow... | 2207 if ((cnt1 & _trap_hist_mask) != 0) { // if no counter overflow... |
2208 _trap_hist._array[reason] = cnt1; | 2208 _trap_hist._array[reason] = cnt1; |
2209 return cnt1; | 2209 return cnt1; |
2210 } else { | 2210 } else { |