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

Side by Side Diff: Source/platform/heap/BlinkGCMemoryDumpProvider.h

Issue 1149673002: Adding blink gc memory dump infrastructure for thread specific dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and replacing main thread with thread id. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BlinkGCMemoryDumpProvider_h 5 #ifndef BlinkGCMemoryDumpProvider_h
6 #define BlinkGCMemoryDumpProvider_h 6 #define BlinkGCMemoryDumpProvider_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "public/platform/WebMemoryDumpProvider.h" 9 #include "public/platform/WebMemoryDumpProvider.h"
10 #include "wtf/OwnPtr.h"
11 #include "wtf/text/WTFString.h"
10 12
11 namespace blink { 13 namespace blink {
14 class WebMemoryAllocatorDump;
12 15
13 class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public WebMemoryDumpProv ider { 16 class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public WebMemoryDumpProv ider {
14 public: 17 public:
15 static BlinkGCMemoryDumpProvider* instance(); 18 static BlinkGCMemoryDumpProvider* instance();
16 ~BlinkGCMemoryDumpProvider() override; 19 ~BlinkGCMemoryDumpProvider() override;
17 20
18 // WebMemoryDumpProvider implementation. 21 // WebMemoryDumpProvider implementation.
19 bool onMemoryDump(WebProcessMemoryDump*) override; 22 bool onMemoryDump(WebProcessMemoryDump*) override;
20 23
24 // The returned WebMemoryAllocatorDump is owned by
25 // BlinkGCMemoryDumpProvider, and should not be retained (just used to
26 // dump in the current call stack).
27 WebMemoryAllocatorDump* createMemoryAllocatorDumpForCurrentGC(const String& absoluteName);
28
29 // This must be called before taking a new process-wide GC snapshot, to
30 // clear the previous dumps.
31 void clearProcessDumpForCurrentGC();
32
21 private: 33 private:
22 BlinkGCMemoryDumpProvider(); 34 BlinkGCMemoryDumpProvider();
35
36 OwnPtr<WebProcessMemoryDump> m_currentProcessMemoryDump;
23 }; 37 };
24 38
25 } // namespace blink 39 } // namespace blink
26 40
27 #endif 41 #endif
OLDNEW
« no previous file with comments | « Source/platform/exported/Platform.cpp ('k') | Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698