OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 | 1564 |
1565 template <> | 1565 template <> |
1566 class MarkCompactMarkingVisitor::ObjectStatsTracker< | 1566 class MarkCompactMarkingVisitor::ObjectStatsTracker< |
1567 MarkCompactMarkingVisitor::kVisitCode> { | 1567 MarkCompactMarkingVisitor::kVisitCode> { |
1568 public: | 1568 public: |
1569 static inline void Visit(Map* map, HeapObject* obj) { | 1569 static inline void Visit(Map* map, HeapObject* obj) { |
1570 Heap* heap = map->GetHeap(); | 1570 Heap* heap = map->GetHeap(); |
1571 int object_size = obj->Size(); | 1571 int object_size = obj->Size(); |
1572 DCHECK(map->instance_type() == CODE_TYPE); | 1572 DCHECK(map->instance_type() == CODE_TYPE); |
1573 Code* code_obj = Code::cast(obj); | 1573 Code* code_obj = Code::cast(obj); |
1574 heap->RecordCodeSubTypeStats(code_obj->kind(), code_obj->GetRawAge(), | 1574 heap->RecordCodeSubTypeStats(code_obj->kind(), code_obj->GetAge(), |
1575 object_size); | 1575 object_size); |
1576 ObjectStatsVisitBase(kVisitCode, map, obj); | 1576 ObjectStatsVisitBase(kVisitCode, map, obj); |
1577 } | 1577 } |
1578 }; | 1578 }; |
1579 | 1579 |
1580 | 1580 |
1581 template <> | 1581 template <> |
1582 class MarkCompactMarkingVisitor::ObjectStatsTracker< | 1582 class MarkCompactMarkingVisitor::ObjectStatsTracker< |
1583 MarkCompactMarkingVisitor::kVisitSharedFunctionInfo> { | 1583 MarkCompactMarkingVisitor::kVisitSharedFunctionInfo> { |
1584 public: | 1584 public: |
(...skipping 3144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4729 SlotsBuffer* buffer = *buffer_address; | 4729 SlotsBuffer* buffer = *buffer_address; |
4730 while (buffer != NULL) { | 4730 while (buffer != NULL) { |
4731 SlotsBuffer* next_buffer = buffer->next(); | 4731 SlotsBuffer* next_buffer = buffer->next(); |
4732 DeallocateBuffer(buffer); | 4732 DeallocateBuffer(buffer); |
4733 buffer = next_buffer; | 4733 buffer = next_buffer; |
4734 } | 4734 } |
4735 *buffer_address = NULL; | 4735 *buffer_address = NULL; |
4736 } | 4736 } |
4737 } | 4737 } |
4738 } // namespace v8::internal | 4738 } // namespace v8::internal |
OLD | NEW |