Index: runtime/vm/scavenger.h |
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h |
index 249df65d00540c739006d01f4125b35a2fe9c8cd..27749226b108a3a33b275240e5c530d5e6dcf4ba 100644 |
--- a/runtime/vm/scavenger.h |
+++ b/runtime/vm/scavenger.h |
@@ -89,6 +89,22 @@ class Scavenger { |
void WriteProtect(bool read_only); |
+ void AddGCTime(int64_t micros) { |
+ gc_time_micros_ += micros; |
+ } |
+ |
+ int64_t gc_time_micros() const { |
+ return gc_time_micros_; |
+ } |
+ |
+ void IncrementCollections() { |
+ collections_++; |
+ } |
+ |
+ intptr_t collections() const { |
+ return collections_; |
+ } |
+ |
private: |
// Ids for time and data records in Heap::GCStats. |
enum { |
@@ -172,6 +188,9 @@ class Scavenger { |
// Keep track whether the scavenge had a promotion failure. |
bool had_promotion_failure_; |
+ int64_t gc_time_micros_; |
+ intptr_t collections_; |
+ |
friend class ScavengerVisitor; |
friend class ScavengerWeakVisitor; |