| 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 PartitionAllocMemoryDumpProvider_h | 5 #ifndef PartitionAllocMemoryDumpProvider_h |
| 6 #define PartitionAllocMemoryDumpProvider_h | 6 #define PartitionAllocMemoryDumpProvider_h |
| 7 | 7 |
| 8 #include "public/platform/WebCommon.h" | 8 #include "public/platform/WebCommon.h" |
| 9 #include "public/platform/WebMemoryDumpProvider.h" | 9 #include "public/platform/WebMemoryDumpProvider.h" |
| 10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // TODO(tasak): PartitionAllocMemoryDumpProvider should be | 25 // TODO(tasak): PartitionAllocMemoryDumpProvider should be |
| 26 // USING_FAST_MALLOC. c.f. crbug.com/584196 | 26 // USING_FAST_MALLOC. c.f. crbug.com/584196 |
| 27 WTF_MAKE_NONCOPYABLE(PartitionAllocMemoryDumpProvider); | 27 WTF_MAKE_NONCOPYABLE(PartitionAllocMemoryDumpProvider); |
| 28 public: | 28 public: |
| 29 static PartitionAllocMemoryDumpProvider* instance(); | 29 static PartitionAllocMemoryDumpProvider* instance(); |
| 30 ~PartitionAllocMemoryDumpProvider() override; | 30 ~PartitionAllocMemoryDumpProvider() override; |
| 31 | 31 |
| 32 // WebMemoryDumpProvider implementation. | 32 // WebMemoryDumpProvider implementation. |
| 33 bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) overrid
e; | 33 bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) overrid
e; |
| 34 bool supportsHeapProfiling() override { return true; } | 34 bool supportsHeapProfiling() override { return true; } |
| 35 void onHeapProfilingEnabled(bool) override; | 35 void onHeapProfilingEnabled() override; |
| 36 | 36 |
| 37 // These methods are called only from PartitionAllocHooks' callbacks. | 37 // These methods are called only from PartitionAllocHooks' callbacks. |
| 38 void insert(void*, size_t, const char*); | 38 void insert(void*, size_t, const char*); |
| 39 void remove(void*); | 39 void remove(void*); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 PartitionAllocMemoryDumpProvider(); | 42 PartitionAllocMemoryDumpProvider(); |
| 43 | 43 |
| 44 Mutex m_allocationRegisterMutex; | 44 Mutex m_allocationRegisterMutex; |
| 45 OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister; | 45 OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister; |
| 46 bool m_isHeapProfilingEnabled; | 46 bool m_isHeapProfilingEnabled; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace blink | 49 } // namespace blink |
| 50 | 50 |
| 51 #endif // PartitionAllocMemoryDumpProvider_h | 51 #endif // PartitionAllocMemoryDumpProvider_h |
| OLD | NEW |