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

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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.h
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index ad2e3b06303daed350d07e598ee78eaf0607f1a2..f20b440f5d26beac84fa60c24d5f6258b5b8a099 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -17,6 +17,7 @@ DECLARE_FLAG(bool, always_drop_code);
// Forward declarations.
class Heap;
+class JSONObject;
class ObjectPointerVisitor;
// A page containing old generation objects.
@@ -219,6 +220,24 @@ 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_;
+ }
+
+ void PrintToJSONObject(JSONObject* object);
+
private:
// Ids for time and data records in Heap::GCStats.
enum {
@@ -267,6 +286,9 @@ class PageSpace {
PageSpaceController page_space_controller_;
+ int64_t gc_time_micros_;
+ intptr_t collections_;
+
friend class PageSpaceController;
DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698