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_MEMORY_DUMP_REQUEST_ARGS_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ |
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ |
7 | 7 |
8 // This file defines the types and structs used to issue memory dump requests. | 8 // This file defines the types and structs used to issue memory dump requests. |
9 // These are also used in the IPCs for coordinating inter-process memory dumps. | 9 // These are also used in the IPCs for coordinating inter-process memory dumps. |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 // selective enabling of dumps, filtering and post-processing. | 21 // selective enabling of dumps, filtering and post-processing. |
22 enum class MemoryDumpType { | 22 enum class MemoryDumpType { |
23 TASK_BEGIN, // Dumping memory at the beginning of a message-loop task. | 23 TASK_BEGIN, // Dumping memory at the beginning of a message-loop task. |
24 TASK_END, // Dumping memory at the ending of a message-loop task. | 24 TASK_END, // Dumping memory at the ending of a message-loop task. |
25 PERIODIC_INTERVAL, // Dumping memory at periodic intervals. | 25 PERIODIC_INTERVAL, // Dumping memory at periodic intervals. |
26 EXPLICITLY_TRIGGERED, // Non maskable dump request. | 26 EXPLICITLY_TRIGGERED, // Non maskable dump request. |
27 LAST = EXPLICITLY_TRIGGERED // For IPC macros. | 27 LAST = EXPLICITLY_TRIGGERED // For IPC macros. |
28 }; | 28 }; |
29 | 29 |
30 // Tells the MemoryDumpProvider(s) how much detailed their dumps should be. | 30 // Tells the MemoryDumpProvider(s) how much detailed their dumps should be. |
31 enum class MemoryDumpLevelOfDetail { | 31 enum class MemoryDumpLevelOfDetail : uint32_t { |
oystein (OOO til 10th of July)
2016/06/20 17:02:18
Why do you need to explicitly specify the storage
ssid
2016/06/20 19:12:06
Because I am casting this later, so thought it is
| |
32 // For background tracing mode. The dump time is quick, and typically just the | 32 // For background tracing mode. The dump time is quick, and typically just the |
33 // totals are expected. Suballocations need not be specified. Dump name must | 33 // totals are expected. Suballocations need not be specified. Dump name must |
34 // contain only pre-defined strings and string arguments cannot be added. | 34 // contain only pre-defined strings and string arguments cannot be added. |
35 BACKGROUND, | 35 BACKGROUND, |
36 | 36 |
37 // For the levels below, MemoryDumpProvider instances must guarantee that the | 37 // For the levels below, MemoryDumpProvider instances must guarantee that the |
38 // total size reported in the root node is consistent. Only the granularity of | 38 // total size reported in the root node is consistent. Only the granularity of |
39 // the child MemoryAllocatorDump(s) differs with the levels. | 39 // the child MemoryAllocatorDump(s) differs with the levels. |
40 | 40 |
41 // Few entries, typically a fixed number, per dump. | 41 // Few entries, typically a fixed number, per dump. |
42 LIGHT, | 42 LIGHT, |
43 | 43 |
44 // Unrestricted amount of entries per dump. | 44 // Unrestricted amount of entries per dump. |
45 DETAILED, | 45 DETAILED, |
46 | 46 |
47 // For IPC Macros. | 47 FIRST = BACKGROUND, |
oystein (OOO til 10th of July)
2016/06/20 17:02:18
Nit: "FIRST" should probably be first in the list,
ssid
2016/06/20 19:12:06
Done.
| |
48 LAST = DETAILED | 48 LAST = DETAILED |
49 }; | 49 }; |
50 | 50 |
51 // Initial request arguments for a global memory dump. (see | 51 // Initial request arguments for a global memory dump. (see |
52 // MemoryDumpManager::RequestGlobalMemoryDump()). | 52 // MemoryDumpManager::RequestGlobalMemoryDump()). |
53 struct BASE_EXPORT MemoryDumpRequestArgs { | 53 struct BASE_EXPORT MemoryDumpRequestArgs { |
54 // Globally unique identifier. In multi-process dumps, all processes issue a | 54 // Globally unique identifier. In multi-process dumps, all processes issue a |
55 // local dump with the same guid. This allows the trace importers to | 55 // local dump with the same guid. This allows the trace importers to |
56 // reconstruct the global dump. | 56 // reconstruct the global dump. |
57 uint64_t dump_guid; | 57 uint64_t dump_guid; |
(...skipping 16 matching lines...) Expand all Loading... | |
74 BASE_EXPORT const char* MemoryDumpLevelOfDetailToString( | 74 BASE_EXPORT const char* MemoryDumpLevelOfDetailToString( |
75 const MemoryDumpLevelOfDetail& level_of_detail); | 75 const MemoryDumpLevelOfDetail& level_of_detail); |
76 | 76 |
77 BASE_EXPORT MemoryDumpLevelOfDetail | 77 BASE_EXPORT MemoryDumpLevelOfDetail |
78 StringToMemoryDumpLevelOfDetail(const std::string& str); | 78 StringToMemoryDumpLevelOfDetail(const std::string& str); |
79 | 79 |
80 } // namespace trace_event | 80 } // namespace trace_event |
81 } // namespace base | 81 } // namespace base |
82 | 82 |
83 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ | 83 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_REQUEST_ARGS_H_ |
OLD | NEW |