| Index: runtime/vm/scavenger.h
|
| diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
|
| index 249df65d00540c739006d01f4125b35a2fe9c8cd..83e8a57586e2123d0f3f3e2d65f4628aece4155e 100644
|
| --- a/runtime/vm/scavenger.h
|
| +++ b/runtime/vm/scavenger.h
|
| @@ -18,6 +18,7 @@ namespace dart {
|
| // Forward declarations.
|
| class Heap;
|
| class Isolate;
|
| +class JSONObject;
|
| class ScavengerVisitor;
|
|
|
| DECLARE_FLAG(bool, gc_at_alloc);
|
| @@ -89,6 +90,24 @@ 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_;
|
| + }
|
| +
|
| + void PrintToJSONObject(JSONObject* object);
|
| +
|
| private:
|
| // Ids for time and data records in Heap::GCStats.
|
| enum {
|
| @@ -172,6 +191,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;
|
|
|
|
|