Index: src/heap/spaces-inl.h |
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
index 3023fbf51ead410fba6a14aaab99dff05e5acf61..808f1359cb3f775d1fcfdd8910268f00c659722f 100644 |
--- a/src/heap/spaces-inl.h |
+++ b/src/heap/spaces-inl.h |
@@ -425,12 +425,21 @@ AllocationResult PagedSpace::AllocateRawAligned(int size_in_bytes, |
AllocationResult PagedSpace::AllocateRaw(int size_in_bytes, |
AllocationAlignment alignment) { |
#ifdef V8_HOST_ARCH_32_BIT |
- return alignment == kDoubleAligned |
- ? AllocateRawAligned(size_in_bytes, kDoubleAligned) |
- : AllocateRawUnaligned(size_in_bytes); |
+ AllocationResult result = |
+ alignment == kDoubleAligned |
+ ? AllocateRawAligned(size_in_bytes, kDoubleAligned) |
+ : AllocateRawUnaligned(size_in_bytes); |
#else |
- return AllocateRawUnaligned(size_in_bytes); |
+ AllocationResult result = AllocateRawUnaligned(size_in_bytes); |
#endif |
+ if (!result.IsRetry()) { |
+ Object* obj = result.ToObjectChecked(); |
+ if (obj->IsHeapObject()) { |
+ HeapObject* heap_obj = static_cast<HeapObject*>(obj); |
+ AllocationStep(heap_obj->address(), size_in_bytes); |
+ } |
+ } |
+ return result; |
} |