| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index 371dfb1e5627b403886d4d292f782debb630d5cf..03295770df63eb3c4e1339574d40a287edd8f4fb 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -20,6 +20,7 @@
|
| #include "src/objects-inl.h"
|
| #include "src/snapshot/snapshot.h"
|
| #include "src/v8.h"
|
| +#include "src/vm-state-inl.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -2896,10 +2897,20 @@ HeapObject* CompactionSpace::SweepAndRetryAllocation(int size_in_bytes) {
|
| }
|
|
|
| HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) {
|
| - DCHECK_GE(size_in_bytes, 0);
|
| - const int kMaxPagesToSweep = 1;
|
| + VMState<GC> state(heap()->isolate());
|
| + RuntimeCallTimerScope(heap()->isolate(),
|
| + &RuntimeCallStats::GC_SlowAllocateRaw);
|
| + return RawSlowAllocateRaw(size_in_bytes);
|
| +}
|
|
|
| +HeapObject* CompactionSpace::SlowAllocateRaw(int size_in_bytes) {
|
| + return RawSlowAllocateRaw(size_in_bytes);
|
| +}
|
| +
|
| +HeapObject* PagedSpace::RawSlowAllocateRaw(int size_in_bytes) {
|
| // Allocation in this space has failed.
|
| + DCHECK_GE(size_in_bytes, 0);
|
| + const int kMaxPagesToSweep = 1;
|
|
|
| MarkCompactCollector* collector = heap()->mark_compact_collector();
|
| // Sweeping is still in progress.
|
|
|