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

Unified Diff: runtime/vm/class_table.h

Issue 1346333003: Make old-space heap stats safe for parallel marking. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix count. Created 5 years, 3 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 | « no previous file | 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
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index d7917deb13f3f6c7dfa3e37dce6175976e819040..aaabdf461792d2380d9b82d22853c9ab00625d8f 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -43,8 +43,8 @@ class AllocStats {
old_size = 0;
}
- void AddOld(T size) {
- old_count++;
+ void AddOld(T size, T count = 1) {
+ old_count += count;
old_size += size;
}
@@ -222,7 +222,7 @@ class ClassTable {
bool TraceAllocationFor(intptr_t cid);
private:
- friend class MarkingVisitor;
+ friend class GCMarker;
friend class ScavengerVisitor;
friend class ClassHeapStatsTestHelper;
static const int initial_capacity_ = 512;
@@ -243,7 +243,7 @@ class ClassTable {
// May not have updated size for variable size classes.
ClassHeapStats* PreliminaryStatsAt(intptr_t cid);
- void UpdateLiveOld(intptr_t cid, intptr_t size);
+ void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1);
void UpdateLiveNew(intptr_t cid, intptr_t size);
DISALLOW_COPY_AND_ASSIGN(ClassTable);
« no previous file with comments | « no previous file | runtime/vm/class_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698