OLD | NEW |
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 "platform/heap/BlinkGC.h" | 9 #include "platform/heap/BlinkGC.h" |
10 #include "public/platform/WebMemoryDumpProvider.h" | 10 #include "public/platform/WebMemoryDumpProvider.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // BlinkGCMemoryDumpProvider, and should not be retained (just used to | 39 // BlinkGCMemoryDumpProvider, and should not be retained (just used to |
40 // dump in the current call stack). | 40 // dump in the current call stack). |
41 WebMemoryAllocatorDump* createMemoryAllocatorDumpForCurrentGC(const String&
absoluteName); | 41 WebMemoryAllocatorDump* createMemoryAllocatorDumpForCurrentGC(const String&
absoluteName); |
42 | 42 |
43 // This must be called before taking a new process-wide GC snapshot, to | 43 // This must be called before taking a new process-wide GC snapshot, to |
44 // clear the previous dumps. | 44 // clear the previous dumps. |
45 void clearProcessDumpForCurrentGC(); | 45 void clearProcessDumpForCurrentGC(); |
46 | 46 |
47 WebProcessMemoryDump* currentProcessMemoryDump() { return m_currentProcessMe
moryDump.get(); } | 47 WebProcessMemoryDump* currentProcessMemoryDump() { return m_currentProcessMe
moryDump.get(); } |
48 | 48 |
49 void insert(Address, size_t); | 49 void insert(Address, size_t, const char*); |
50 void remove(Address); | 50 void remove(Address); |
51 | 51 |
52 private: | 52 private: |
53 BlinkGCMemoryDumpProvider(); | 53 BlinkGCMemoryDumpProvider(); |
54 | 54 |
55 Mutex m_allocationRegisterMutex; | 55 Mutex m_allocationRegisterMutex; |
56 OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister; | 56 OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister; |
57 OwnPtr<WebProcessMemoryDump> m_currentProcessMemoryDump; | 57 OwnPtr<WebProcessMemoryDump> m_currentProcessMemoryDump; |
58 bool m_isHeapProfilingEnabled; | 58 bool m_isHeapProfilingEnabled; |
59 }; | 59 }; |
60 | 60 |
61 } // namespace blink | 61 } // namespace blink |
62 | 62 |
63 #endif | 63 #endif |
OLD | NEW |