equal
deleted
inserted
replaced
1281 // This code assumes an entry for a SpeculativeTrapData is 2 cells |
1281 // This code assumes an entry for a SpeculativeTrapData is 2 cells |
1282 assert(2*DataLayout::compute_size_in_bytes(BitData::static_cell_count()) == |
1282 assert(2*DataLayout::compute_size_in_bytes(BitData::static_cell_count()) == |
1283 DataLayout::compute_size_in_bytes(SpeculativeTrapData::static_cell_count()), |
1283 DataLayout::compute_size_in_bytes(SpeculativeTrapData::static_cell_count()), |
1284 "code needs to be adjusted"); |
1284 "code needs to be adjusted"); |
1285 |
1285 |
|
1286 // Do not create one of these if method has been redefined. |
|
1287 if (m != NULL && m->is_old()) { |
|
1288 return NULL; |
|
1289 } |
|
1290 |
1286 DataLayout* dp = extra_data_base(); |
1291 DataLayout* dp = extra_data_base(); |
1287 DataLayout* end = args_data_limit(); |
1292 DataLayout* end = args_data_limit(); |
1288 |
1293 |
1289 // Allocation in the extra data space has to be atomic because not |
1294 // Allocation in the extra data space has to be atomic because not |
1290 // all entries have the same size and non atomic concurrent |
1295 // all entries have the same size and non atomic concurrent |
1552 |
1557 |
1553 // Check for entries that reference a redefined method |
1558 // Check for entries that reference a redefined method |
1554 class CleanExtraDataMethodClosure : public CleanExtraDataClosure { |
1559 class CleanExtraDataMethodClosure : public CleanExtraDataClosure { |
1555 public: |
1560 public: |
1556 CleanExtraDataMethodClosure() {} |
1561 CleanExtraDataMethodClosure() {} |
1557 bool is_live(Method* m) { |
1562 bool is_live(Method* m) { return !m->is_old(); } |
1558 return !m->is_old() || m->on_stack(); |
|
1559 } |
|
1560 }; |
1563 }; |
1561 |
1564 |
1562 |
1565 |
1563 // Remove SpeculativeTrapData entries that reference an unloaded or |
1566 // Remove SpeculativeTrapData entries that reference an unloaded or |
1564 // redefined method |
1567 // redefined method |
1656 |
1659 |
1657 CleanExtraDataMethodClosure cl; |
1660 CleanExtraDataMethodClosure cl; |
1658 clean_extra_data(&cl); |
1661 clean_extra_data(&cl); |
1659 verify_extra_data_clean(&cl); |
1662 verify_extra_data_clean(&cl); |
1660 } |
1663 } |
|
1664 |
|
1665 #ifdef ASSERT |
|
1666 void MethodData::verify_clean_weak_method_links() { |
|
1667 for (ProfileData* data = first_data(); |
|
1668 is_valid(data); |
|
1669 data = next_data(data)) { |
|
1670 data->verify_clean_weak_method_links(); |
|
1671 } |
|
1672 |
|
1673 CleanExtraDataMethodClosure cl; |
|
1674 verify_extra_data_clean(&cl); |
|
1675 } |
|
1676 #endif // ASSERT |