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

Unified Diff: Source/platform/heap/GCInfo.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: Remove useless check. Created 5 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 | « no previous file | Source/platform/heap/Heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/GCInfo.h
diff --git a/Source/platform/heap/GCInfo.h b/Source/platform/heap/GCInfo.h
index bcade77509418d32c065dd5e63d25ac615f09ec8..3ff9cc60c0b2d4765e0f752eb793cfe237383eb6 100644
--- a/Source/platform/heap/GCInfo.h
+++ b/Source/platform/heap/GCInfo.h
@@ -113,14 +113,13 @@ extern PLATFORM_EXPORT GCInfo const** s_gcInfoTable;
struct GCInfo {
bool hasFinalizer() const { return m_nonTrivialFinalizer; }
bool hasVTable() const { return m_hasVTable; }
+ const String& className() const { return m_className; }
TraceCallback m_trace;
FinalizationCallback m_finalize;
bool m_nonTrivialFinalizer;
bool m_hasVTable;
-#if ENABLE(GC_PROFILING)
// |m_className| is held as a reference to prevent dtor being called at exit.
const String& m_className;
-#endif
};
#if ENABLE(ASSERT)
@@ -134,6 +133,8 @@ public:
static void init();
static void shutdown();
+ static size_t gcInfoIndex() { return s_gcInfoIndex; }
+
// The (max + 1) GCInfo index supported.
// We assume that 14 bits is enough to represent all possible types: during
// telemetry runs, we see about 1000 different types, looking at the output
@@ -170,9 +171,7 @@ struct GCInfoAtBase {
FinalizerTrait<T>::finalize,
FinalizerTrait<T>::nonTrivialFinalizer,
WTF::IsPolymorphic<T>::value,
-#if ENABLE(GC_PROFILING)
TypenameStringTrait<T>::get()
-#endif
};
RETURN_GCINFO_INDEX();
}
« no previous file with comments | « no previous file | Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698