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

Unified Diff: Source/platform/heap/Visitor.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/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index 60cca5cd57156ff459003a7945c3c9fef89c6f21..86d6610bb9c94e462d2c14e0ad67f9d091ff7b41 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -42,10 +42,8 @@
#include "wtf/HashMap.h"
#include "wtf/HashTraits.h"
#include "wtf/TypeTraits.h"
-#if ENABLE(GC_PROFILING)
#include "wtf/InstanceCounter.h"
#include "wtf/text/WTFString.h"
-#endif
namespace blink {
@@ -396,6 +394,14 @@ public:
inline MarkingMode markingMode() const { return m_markingMode; }
+ void setHostInfo(void* object, const String& name)
haraken 2015/06/27 07:27:40 Why do we need this?
+ {
+ m_hostObject = object;
+ m_hostName = name;
+ }
+
+ inline bool isGlobalMarkingVisitor() const { return m_isGlobalMarkingVisitor; }
haraken 2015/06/27 07:27:40 Why do we need this?
+
protected:
explicit Visitor(MarkingMode markingMode)
: m_markingMode(markingMode)
@@ -403,6 +409,9 @@ protected:
virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0;
+ void* m_hostObject;
+ String m_hostName;
+
private:
static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_cast<Visitor*>(helper); }
@@ -410,7 +419,6 @@ private:
bool m_isGlobalMarkingVisitor;
};
-#if ENABLE(GC_PROFILING)
template<typename T>
struct TypenameStringTrait {
static const String& get()
@@ -419,7 +427,6 @@ struct TypenameStringTrait {
return typenameString;
}
};
-#endif
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698