Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Unified Diff: runtime/vm/pages.h

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/pages.h
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index ad2e3b06303daed350d07e598ee78eaf0607f1a2..fb5ef71a87dd484de6d4976dc8414726cd5dec61 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -219,6 +219,22 @@ class PageSpace {
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 {
@@ -267,6 +283,9 @@ class PageSpace {
PageSpaceController page_space_controller_;
+ int64_t gc_time_micros_;
+ intptr_t collections_;
+
friend class PageSpaceController;
DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);

Powered by Google App Engine
This is Rietveld 408576698