| Index: Source/platform/heap/ThreadState.h
|
| diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
|
| index 459b8acd854aa0178a933f85b33cea1ea8f0e366..33098b08552201eaf11a4eafa2098d950a49b523 100644
|
| --- a/Source/platform/heap/ThreadState.h
|
| +++ b/Source/platform/heap/ThreadState.h
|
| @@ -34,6 +34,7 @@
|
| #include "platform/PlatformExport.h"
|
| #include "platform/heap/AddressSanitizer.h"
|
| #include "platform/heap/ThreadingTraits.h"
|
| +#include "public/platform/WebMemoryDumpProvider.h"
|
| #include "public/platform/WebThread.h"
|
| #include "wtf/Forward.h"
|
| #include "wtf/HashMap.h"
|
| @@ -164,7 +165,7 @@ struct AgeCounts {
|
| typedef HashMap<String, AgeCounts> ClassAgeCountsMap;
|
| #endif
|
|
|
| -class PLATFORM_EXPORT ThreadState {
|
| +class PLATFORM_EXPORT ThreadState : public WebMemoryDumpProvider {
|
| WTF_MAKE_NONCOPYABLE(ThreadState);
|
| public:
|
| // When garbage collecting we need to know whether or not there
|
| @@ -457,6 +458,9 @@ public:
|
| // Visit all persistents allocated on this thread.
|
| void visitPersistents(Visitor*);
|
|
|
| + void snapshotMemoryIfNecessary();
|
| + void snapshotMemory();
|
| +
|
| #if ENABLE(GC_PROFILING)
|
| const GCInfo* findGCInfo(Address);
|
| static const GCInfo* findGCInfoFromAllThreads(Address);
|
| @@ -609,6 +613,9 @@ public:
|
| void allocationPointAdjusted(int heapIndex);
|
| void promptlyFreed(size_t gcInfoIndex);
|
|
|
| + // WebMemoryDumpProvider implementation.
|
| + bool onMemoryDump(WebProcessMemoryDump*) override;
|
| +
|
| private:
|
| ThreadState();
|
| ~ThreadState();
|
| @@ -706,6 +713,8 @@ private:
|
|
|
| Vector<PageMemoryRegion*> m_allocatedRegionsSinceLastGC;
|
|
|
| + OwnPtr<WebProcessMemoryDump> m_lastProcessMemoryDump;
|
| +
|
| #if ENABLE(GC_PROFILING)
|
| double m_nextFreeListSnapshotTime;
|
| #endif
|
|
|