Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/methodDataOop.hpp @ 5114:dad1ac9dba7d
finished first implementation of disabling runtime feedback selectively based on deoptimization history
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Mon, 19 Mar 2012 14:43:15 -0700 |
parents | 422c979ff392 |
children |
comparison
equal
deleted
inserted
replaced
5113:e6a45067e42c | 5114:dad1ac9dba7d |
---|---|
1483 static uint trap_reason_limit() { return _trap_hist_limit; } | 1483 static uint trap_reason_limit() { return _trap_hist_limit; } |
1484 static uint trap_count_limit() { return _trap_hist_mask; } | 1484 static uint trap_count_limit() { return _trap_hist_mask; } |
1485 uint inc_trap_count(int reason) { | 1485 uint inc_trap_count(int reason) { |
1486 // Count another trap, anywhere in this method. | 1486 // Count another trap, anywhere in this method. |
1487 assert(reason >= 0, "must be single trap"); | 1487 assert(reason >= 0, "must be single trap"); |
1488 if ((uint)reason < _trap_hist_limit) { | 1488 assert((uint)reason < _trap_hist_limit, "oob"); |
1489 uint cnt1 = 1 + _trap_hist._array[reason]; | 1489 uint cnt1 = 1 + _trap_hist._array[reason]; |
1490 if ((cnt1 & _trap_hist_mask) != 0) { // if no counter overflow... | 1490 if ((cnt1 & _trap_hist_mask) != 0) { // if no counter overflow... |
1491 _trap_hist._array[reason] = cnt1; | 1491 _trap_hist._array[reason] = cnt1; |
1492 return cnt1; | 1492 return cnt1; |
1493 } else { | |
1494 return _trap_hist_mask + (++_nof_overflow_traps); | |
1495 } | |
1496 } else { | 1493 } else { |
1497 // Could not represent the count in the histogram. | 1494 return _trap_hist_mask + (++_nof_overflow_traps); |
1498 return (++_nof_overflow_traps); | |
1499 } | 1495 } |
1500 } | 1496 } |
1501 | 1497 |
1502 uint overflow_trap_count() const { | 1498 uint overflow_trap_count() const { |
1503 return _nof_overflow_traps; | 1499 return _nof_overflow_traps; |
1514 void inc_decompile_count(); | 1510 void inc_decompile_count(); |
1515 | 1511 |
1516 // Support for code generation | 1512 // Support for code generation |
1517 static ByteSize data_offset() { | 1513 static ByteSize data_offset() { |
1518 return byte_offset_of(methodDataOopDesc, _data[0]); | 1514 return byte_offset_of(methodDataOopDesc, _data[0]); |
1515 } | |
1516 | |
1517 static ByteSize trap_history_offset() { | |
1518 return byte_offset_of(methodDataOopDesc, _trap_hist._array); | |
1519 } | 1519 } |
1520 | 1520 |
1521 static ByteSize invocation_counter_offset() { | 1521 static ByteSize invocation_counter_offset() { |
1522 return byte_offset_of(methodDataOopDesc, _invocation_counter); | 1522 return byte_offset_of(methodDataOopDesc, _invocation_counter); |
1523 } | 1523 } |