OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DEBUG_TRACE_EVENT_MEMORY_H_ | 5 #ifndef BASE_DEBUG_TRACE_EVENT_MEMORY_H_ |
6 #define BASE_DEBUG_TRACE_EVENT_MEMORY_H_ | 6 #define BASE_DEBUG_TRACE_EVENT_MEMORY_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/debug/trace_event_impl.h" | 9 #include "base/debug/trace_event_impl.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // pointers to tcmalloc heap profiling functions; by avoiding direct calls to | 40 // pointers to tcmalloc heap profiling functions; by avoiding direct calls to |
41 // these functions we avoid a dependency on third_party/tcmalloc from base. | 41 // these functions we avoid a dependency on third_party/tcmalloc from base. |
42 TraceMemoryController( | 42 TraceMemoryController( |
43 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 43 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
44 HeapProfilerStartFunction heap_profiler_start_function, | 44 HeapProfilerStartFunction heap_profiler_start_function, |
45 HeapProfilerStopFunction heap_profiler_stop_function, | 45 HeapProfilerStopFunction heap_profiler_stop_function, |
46 GetHeapProfileFunction get_heap_profile_function); | 46 GetHeapProfileFunction get_heap_profile_function); |
47 virtual ~TraceMemoryController(); | 47 virtual ~TraceMemoryController(); |
48 | 48 |
49 // base::debug::TraceLog::EnabledStateChangedObserver overrides: | 49 // base::debug::TraceLog::EnabledStateChangedObserver overrides: |
50 virtual void OnTraceLogEnabled() OVERRIDE; | 50 void OnTraceLogEnabled() override; |
51 virtual void OnTraceLogDisabled() OVERRIDE; | 51 void OnTraceLogDisabled() override; |
52 | 52 |
53 // Starts heap memory profiling. | 53 // Starts heap memory profiling. |
54 void StartProfiling(); | 54 void StartProfiling(); |
55 | 55 |
56 // Captures a heap profile. | 56 // Captures a heap profile. |
57 void DumpMemoryProfile(); | 57 void DumpMemoryProfile(); |
58 | 58 |
59 // If memory tracing is enabled, dumps a memory profile to the tracing system. | 59 // If memory tracing is enabled, dumps a memory profile to the tracing system. |
60 void StopProfiling(); | 60 void StopProfiling(); |
61 | 61 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #else | 163 #else |
164 #define INTERNAL_TRACE_MEMORY(category, name) | 164 #define INTERNAL_TRACE_MEMORY(category, name) |
165 #endif // defined(TRACE_MEMORY_SUPPORTED) | 165 #endif // defined(TRACE_MEMORY_SUPPORTED) |
166 | 166 |
167 // A special trace name that allows us to ignore memory allocations inside | 167 // A special trace name that allows us to ignore memory allocations inside |
168 // the memory dump system itself. The allocations are recorded, but the | 168 // the memory dump system itself. The allocations are recorded, but the |
169 // visualizer skips them. Must match the value in heap.js. | 169 // visualizer skips them. Must match the value in heap.js. |
170 #define TRACE_MEMORY_IGNORE "trace-memory-ignore" | 170 #define TRACE_MEMORY_IGNORE "trace-memory-ignore" |
171 | 171 |
172 #endif // BASE_DEBUG_TRACE_EVENT_MEMORY_H_ | 172 #endif // BASE_DEBUG_TRACE_EVENT_MEMORY_H_ |
OLD | NEW |