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

Unified Diff: Source/platform/heap/ThreadState.h

Issue 1203493004: [tracing] Adding class-wise memory statistics to blink gc memory dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Disabling the classes dump, avoid double counting, and comments. Created 5 years, 6 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: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index 1f962b7df637954dde98307d775c2e98c3b961e5..2344ced678d4dec6feab755e2c3b26002c4f877d 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -490,8 +490,20 @@ public:
void visitPersistents(Visitor*);
struct GCSnapshotInfo {
+ // Map from gcInfoIndex to a snapshot class-ids (used as index below).
haraken 2015/06/27 07:27:40 I'm wondering why you simply can't use gcInfoIndex
+ using ClassTagMap = HashMap<size_t, size_t>;
+ ClassTagMap classTags;
+
+ // Map from class-id (index) to count/size.
+ Vector<int> liveCount;
+ Vector<int> deadCount;
+ Vector<size_t> liveSize;
+ Vector<size_t> deadSize;
+
size_t currentHeapFreeSize;
size_t currentHeapFreeCount;
+
+ size_t getClassTag(const size_t GCInfoIndex);
};
#if ENABLE(GC_PROFILING)
@@ -649,7 +661,8 @@ public:
private:
enum SnapshotType {
HeapSnapshot,
- FreelistSnapshot
+ FreelistSnapshot,
+ HeapSnapshotWithClasses
};
ThreadState();

Powered by Google App Engine
This is Rietveld 408576698