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

Unified Diff: runtime/vm/class_table.h

Issue 487973002: Track per-class promotion stats. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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/bin/vmservice/observatory/lib/src/service/object.dart ('k') | runtime/vm/class_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_table.h
===================================================================
--- runtime/vm/class_table.h (revision 39373)
+++ runtime/vm/class_table.h (working copy)
@@ -74,6 +74,9 @@
AllocStats<int64_t> accumulated;
// Snapshot of recent at the time of the last reset.
AllocStats<intptr_t> last_reset;
+ // Promoted from new to old by last new GC.
+ intptr_t promoted_count;
+ intptr_t promoted_size;
Cutch 2014/08/20 17:46:57 Is this accumulated over all GCs or just the last
koda 2014/08/20 17:49:27 Just the last (as the comment above states).
static intptr_t allocated_since_gc_new_space_offset() {
return OFFSET_OF(ClassHeapStats, recent) +
@@ -96,8 +99,14 @@
void ResetAtNewGC();
void ResetAtOldGC();
void ResetAccumulator();
+ void UpdatePromotedAfterNewGC();
void UpdateSize(intptr_t instance_size);
void PrintToJSONObject(const Class& cls, JSONObject* obj) const;
+
+ private:
+ // Recent old at start of last new GC (used to compute promoted_*).
+ intptr_t old_pre_new_gc_count_;
+ intptr_t old_pre_new_gc_size_;
};
@@ -146,6 +155,8 @@
void ResetCountersOld();
// Called whenever a new GC occurs.
void ResetCountersNew();
+ // Called immediately after a new GC.
+ void UpdatePromoted();
// Used by the generated code.
uword PredefinedClassHeapStatsTableAddress() {
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/service/object.dart ('k') | runtime/vm/class_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698