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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 | 1642 |
1643 template<> | 1643 template<> |
1644 class MarkCompactMarkingVisitor::ObjectStatsTracker< | 1644 class MarkCompactMarkingVisitor::ObjectStatsTracker< |
1645 MarkCompactMarkingVisitor::kVisitCode> { | 1645 MarkCompactMarkingVisitor::kVisitCode> { |
1646 public: | 1646 public: |
1647 static inline void Visit(Map* map, HeapObject* obj) { | 1647 static inline void Visit(Map* map, HeapObject* obj) { |
1648 Heap* heap = map->GetHeap(); | 1648 Heap* heap = map->GetHeap(); |
1649 int object_size = obj->Size(); | 1649 int object_size = obj->Size(); |
1650 ASSERT(map->instance_type() == CODE_TYPE); | 1650 ASSERT(map->instance_type() == CODE_TYPE); |
1651 Code* code_obj = Code::cast(obj); | 1651 Code* code_obj = Code::cast(obj); |
1652 heap->RecordCodeSubTypeStats(code_obj->kind(), code_obj->GetAge(), | 1652 heap->RecordCodeSubTypeStats(code_obj->kind(), code_obj->GetRawAge(), |
1653 object_size); | 1653 object_size); |
1654 ObjectStatsVisitBase(kVisitCode, map, obj); | 1654 ObjectStatsVisitBase(kVisitCode, map, obj); |
1655 } | 1655 } |
1656 }; | 1656 }; |
1657 | 1657 |
1658 | 1658 |
1659 template<> | 1659 template<> |
1660 class MarkCompactMarkingVisitor::ObjectStatsTracker< | 1660 class MarkCompactMarkingVisitor::ObjectStatsTracker< |
1661 MarkCompactMarkingVisitor::kVisitSharedFunctionInfo> { | 1661 MarkCompactMarkingVisitor::kVisitSharedFunctionInfo> { |
1662 public: | 1662 public: |
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4352 while (buffer != NULL) { | 4352 while (buffer != NULL) { |
4353 SlotsBuffer* next_buffer = buffer->next(); | 4353 SlotsBuffer* next_buffer = buffer->next(); |
4354 DeallocateBuffer(buffer); | 4354 DeallocateBuffer(buffer); |
4355 buffer = next_buffer; | 4355 buffer = next_buffer; |
4356 } | 4356 } |
4357 *buffer_address = NULL; | 4357 *buffer_address = NULL; |
4358 } | 4358 } |
4359 | 4359 |
4360 | 4360 |
4361 } } // namespace v8::internal | 4361 } } // namespace v8::internal |
OLD | NEW |