| 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 BASE_TRACE_EVENT_MALLOC_DUMP_PROVIDER_H_ | 5 #ifndef BASE_TRACE_EVENT_MALLOC_DUMP_PROVIDER_H_ |
| 6 #define BASE_TRACE_EVENT_MALLOC_DUMP_PROVIDER_H_ | 6 #define BASE_TRACE_EVENT_MALLOC_DUMP_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <istream> | 8 #include <istream> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "base/trace_event/memory_dump_provider.h" | 15 #include "base/trace_event/memory_dump_provider.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 | 17 |
| 18 #if defined(OS_LINUX) || defined(OS_ANDROID) || \ | 18 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) || \ |
| 19 (defined(OS_MACOSX) && !defined(OS_IOS)) | 19 (defined(OS_MACOSX) && !defined(OS_IOS)) |
| 20 #define MALLOC_MEMORY_TRACING_SUPPORTED | 20 #define MALLOC_MEMORY_TRACING_SUPPORTED |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 namespace base { | 23 namespace base { |
| 24 namespace trace_event { | 24 namespace trace_event { |
| 25 | 25 |
| 26 class AllocationRegister; | 26 class AllocationRegister; |
| 27 | 27 |
| 28 // Dump provider which collects process-wide memory stats. | 28 // Dump provider which collects process-wide memory stats. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // generation is malloc/new-ing for its own bookeeping data structures. | 60 // generation is malloc/new-ing for its own bookeeping data structures. |
| 61 PlatformThreadId tid_dumping_heap_; | 61 PlatformThreadId tid_dumping_heap_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(MallocDumpProvider); | 63 DISALLOW_COPY_AND_ASSIGN(MallocDumpProvider); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace trace_event | 66 } // namespace trace_event |
| 67 } // namespace base | 67 } // namespace base |
| 68 | 68 |
| 69 #endif // BASE_TRACE_EVENT_MALLOC_DUMP_PROVIDER_H_ | 69 #endif // BASE_TRACE_EVENT_MALLOC_DUMP_PROVIDER_H_ |
| OLD | NEW |