Index: src/heap/heap.h |
diff --git a/src/heap/heap.h b/src/heap/heap.h |
index 8b7893d446b9a453ea73b11017a62fa0a2593fd9..57fd12da9122d507695467478a71888c3f9fb54f 100644 |
--- a/src/heap/heap.h |
+++ b/src/heap/heap.h |
@@ -929,6 +929,8 @@ class Heap { |
// return NULL; |
inline AllocationMemento* FindAllocationMemento(HeapObject* object); |
+ inline AllocationMemento* FindAllocationMementoCandidate(HeapObject* object); |
+ |
// Returns false if not able to reserve. |
bool ReserveSpace(Reservation* reservations); |
@@ -2745,6 +2747,24 @@ class WeakObjectRetainer { |
}; |
+class TimedScope { |
Hannes Payer (out of office)
2016/01/18 11:46:33
That sounds like a general util class.
Michael Lippautz
2016/01/19 14:56:52
Done.
|
+ public: |
+ TimedScope(Heap* heap, double* result) |
+ : heap_(heap), |
+ start_(heap->MonotonicallyIncreasingTimeInMs()), |
+ result_(result) {} |
+ |
+ ~TimedScope() { |
+ *result_ = heap_->MonotonicallyIncreasingTimeInMs() - start_; |
+ } |
+ |
+ private: |
+ Heap* heap_; |
+ double start_; |
+ double* result_; |
+}; |
+ |
+ |
#ifdef DEBUG |
// Helper class for tracing paths to a search target Object from all roots. |
// The TracePathFrom() method can be used to trace paths from a specific |