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

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: Rebase errors. 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 56f9e15ee73462e93a0af440a557b1c91f5cd442..61dcf31e7e6683b7985b3abefdc51e011cbd9a47 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -489,6 +489,20 @@ public:
// Visit all persistents allocated on this thread.
void visitPersistents(Visitor*);
+ struct GCSnapshotInfo {
+ // Map from base-classes to a snapshot class-ids (used as index below).
+ using ClassTagMap = HashMap<const GCInfo*, size_t>;
haraken 2015/06/26 05:35:28 How about just using gcInfoIndex for the tag? gcIn
ssid 2015/06/26 10:10:28 Hm, I think it is better to store map of GcInfo* h
+ 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 getClassTag(const GCInfo*);
+ };
+
#if ENABLE(GC_PROFILING)
const GCInfo* findGCInfo(Address);
static const GCInfo* findGCInfoFromAllThreads(Address);

Powered by Google App Engine
This is Rietveld 408576698