OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 heap->RecordObjectStats(FIXED_ARRAY_TYPE, | 1624 heap->RecordObjectStats(FIXED_ARRAY_TYPE, |
1625 DESCRIPTOR_ARRAY_SUB_TYPE, | 1625 DESCRIPTOR_ARRAY_SUB_TYPE, |
1626 fixed_array_size); | 1626 fixed_array_size); |
1627 } | 1627 } |
1628 if (map_obj->HasTransitionArray()) { | 1628 if (map_obj->HasTransitionArray()) { |
1629 int fixed_array_size = map_obj->transitions()->Size(); | 1629 int fixed_array_size = map_obj->transitions()->Size(); |
1630 heap->RecordObjectStats(FIXED_ARRAY_TYPE, | 1630 heap->RecordObjectStats(FIXED_ARRAY_TYPE, |
1631 TRANSITION_ARRAY_SUB_TYPE, | 1631 TRANSITION_ARRAY_SUB_TYPE, |
1632 fixed_array_size); | 1632 fixed_array_size); |
1633 } | 1633 } |
1634 if (map_obj->code_cache() != heap->empty_fixed_array()) { | 1634 if (map_obj->has_code_cache()) { |
| 1635 CodeCache* cache = CodeCache::cast(map_obj->code_cache()); |
1635 heap->RecordObjectStats( | 1636 heap->RecordObjectStats( |
1636 FIXED_ARRAY_TYPE, | 1637 FIXED_ARRAY_TYPE, |
1637 MAP_CODE_CACHE_SUB_TYPE, | 1638 MAP_CODE_CACHE_SUB_TYPE, |
1638 FixedArray::cast(map_obj->code_cache())->Size()); | 1639 cache->default_cache()->Size()); |
| 1640 if (!cache->normal_type_cache()->IsUndefined()) { |
| 1641 heap->RecordObjectStats( |
| 1642 FIXED_ARRAY_TYPE, |
| 1643 MAP_CODE_CACHE_SUB_TYPE, |
| 1644 FixedArray::cast(cache->normal_type_cache())->Size()); |
| 1645 } |
1639 } | 1646 } |
1640 ObjectStatsVisitBase(kVisitMap, map, obj); | 1647 ObjectStatsVisitBase(kVisitMap, map, obj); |
1641 } | 1648 } |
1642 }; | 1649 }; |
1643 | 1650 |
1644 | 1651 |
1645 template<> | 1652 template<> |
1646 class MarkCompactMarkingVisitor::ObjectStatsTracker< | 1653 class MarkCompactMarkingVisitor::ObjectStatsTracker< |
1647 MarkCompactMarkingVisitor::kVisitCode> { | 1654 MarkCompactMarkingVisitor::kVisitCode> { |
1648 public: | 1655 public: |
(...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4315 while (buffer != NULL) { | 4322 while (buffer != NULL) { |
4316 SlotsBuffer* next_buffer = buffer->next(); | 4323 SlotsBuffer* next_buffer = buffer->next(); |
4317 DeallocateBuffer(buffer); | 4324 DeallocateBuffer(buffer); |
4318 buffer = next_buffer; | 4325 buffer = next_buffer; |
4319 } | 4326 } |
4320 *buffer_address = NULL; | 4327 *buffer_address = NULL; |
4321 } | 4328 } |
4322 | 4329 |
4323 | 4330 |
4324 } } // namespace v8::internal | 4331 } } // namespace v8::internal |
OLD | NEW |