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/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 intptr_t* head_end = Min(front_, reinterpret_cast<intptr_t*>(p->area_end())); | 1376 intptr_t* head_end = Min(front_, reinterpret_cast<intptr_t*>(p->area_end())); |
1377 | 1377 |
1378 int entries_count = | 1378 int entries_count = |
1379 static_cast<int>(head_end - head_start) / kEntrySizeInWords; | 1379 static_cast<int>(head_end - head_start) / kEntrySizeInWords; |
1380 | 1380 |
1381 emergency_stack_ = new List<Entry>(2 * entries_count); | 1381 emergency_stack_ = new List<Entry>(2 * entries_count); |
1382 | 1382 |
1383 while (head_start != head_end) { | 1383 while (head_start != head_end) { |
1384 int size = static_cast<int>(*(head_start++)); | 1384 int size = static_cast<int>(*(head_start++)); |
1385 HeapObject* obj = reinterpret_cast<HeapObject*>(*(head_start++)); | 1385 HeapObject* obj = reinterpret_cast<HeapObject*>(*(head_start++)); |
| 1386 // New space allocation in SemiSpaceCopyObject marked the region |
| 1387 // overlapping with promotion queue as uninitialized. |
| 1388 MSAN_MEMORY_IS_INITIALIZED(&size, sizeof(size)); |
| 1389 MSAN_MEMORY_IS_INITIALIZED(&obj, sizeof(obj)); |
1386 emergency_stack_->Add(Entry(obj, size)); | 1390 emergency_stack_->Add(Entry(obj, size)); |
1387 } | 1391 } |
1388 rear_ = head_end; | 1392 rear_ = head_end; |
1389 } | 1393 } |
1390 | 1394 |
1391 | 1395 |
1392 class ScavengeWeakObjectRetainer : public WeakObjectRetainer { | 1396 class ScavengeWeakObjectRetainer : public WeakObjectRetainer { |
1393 public: | 1397 public: |
1394 explicit ScavengeWeakObjectRetainer(Heap* heap) : heap_(heap) {} | 1398 explicit ScavengeWeakObjectRetainer(Heap* heap) : heap_(heap) {} |
1395 | 1399 |
(...skipping 4745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6141 static_cast<int>(object_sizes_last_time_[index])); | 6145 static_cast<int>(object_sizes_last_time_[index])); |
6142 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6146 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6143 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6147 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6144 | 6148 |
6145 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6149 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6146 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6150 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6147 ClearObjectStats(); | 6151 ClearObjectStats(); |
6148 } | 6152 } |
6149 } | 6153 } |
6150 } // namespace v8::internal | 6154 } // namespace v8::internal |
OLD | NEW |