OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 module memory_instrumentation.mojom; | 5 module memory_instrumentation.mojom; |
6 | 6 |
7 import "mojo/common/process_id.mojom"; | 7 import "mojo/common/process_id.mojom"; |
8 | 8 |
9 enum DumpType { | 9 enum DumpType { |
10 PERIODIC_INTERVAL, | 10 PERIODIC_INTERVAL, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // This struct is used both for: | 57 // This struct is used both for: |
58 // 1) The internal communication between the memory service (Coordinator) and | 58 // 1) The internal communication between the memory service (Coordinator) and |
59 // the client library (ProcessLocalDumpManager). | 59 // the client library (ProcessLocalDumpManager). |
60 // 2) The public-facing API Coordinator::RequestGlobalMemoryDump(). | 60 // 2) The public-facing API Coordinator::RequestGlobalMemoryDump(). |
61 struct ProcessMemoryDump { | 61 struct ProcessMemoryDump { |
62 ProcessType process_type; | 62 ProcessType process_type; |
63 OSMemDump os_dump; | 63 OSMemDump os_dump; |
64 ChromeMemDump chrome_dump; | 64 ChromeMemDump chrome_dump; |
65 | 65 |
66 // This is roughly private, anonymous, non-discardable, resident or swapped | 66 // This is roughly private, anonymous, non-discardable, resident or swapped |
67 // memory. For more details, see https://goo.gl/3kPb9S. | 67 // memory in kilobytes. For more details, see https://goo.gl/3kPb9S. |
68 uint32 private_footprint = 0; | 68 uint32 private_footprint = 0; |
69 | 69 |
70 // This is used only in the use-case (1) and only on Linux/CrOS to get | 70 // This is used only in the use-case (1) and only on Linux/CrOS to get |
71 // around sandboxing. See crbug.com/461788 . | 71 // around sandboxing. See crbug.com/461788 . |
72 map<mojo.common.mojom.ProcessId, OSMemDump> extra_processes_dump; | 72 map<mojo.common.mojom.ProcessId, OSMemDump> extra_processes_dump; |
73 }; | 73 }; |
74 | 74 |
75 | 75 |
76 // This struct is returned by the public-facing API | 76 // This struct is returned by the public-facing API |
77 // Coordinator::RequestGlobalMemoryDump(). | 77 // Coordinator::RequestGlobalMemoryDump(). |
(...skipping 17 matching lines...) Expand all Loading... |
95 // Used to register a client library to obtain a process-local dump from it | 95 // Used to register a client library to obtain a process-local dump from it |
96 // when RequestGlobalMemoryDump() is called. | 96 // when RequestGlobalMemoryDump() is called. |
97 RegisterProcessLocalDumpManager(ProcessLocalDumpManager local_manager); | 97 RegisterProcessLocalDumpManager(ProcessLocalDumpManager local_manager); |
98 | 98 |
99 // Broadcasts a dump request to all registered client libraries, injects the | 99 // Broadcasts a dump request to all registered client libraries, injects the |
100 // dump in the trace buffer (if tracing is enabled) and returns a summarized | 100 // dump in the trace buffer (if tracing is enabled) and returns a summarized |
101 // dump back if args.dump_type == SUMMARY_ONLY. | 101 // dump back if args.dump_type == SUMMARY_ONLY. |
102 RequestGlobalMemoryDump(RequestArgs args) => | 102 RequestGlobalMemoryDump(RequestArgs args) => |
103 (uint64 dump_guid, bool success, GlobalMemoryDump? global_memory_dump); | 103 (uint64 dump_guid, bool success, GlobalMemoryDump? global_memory_dump); |
104 }; | 104 }; |
OLD | NEW |