| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module memory_infra.mojom; |
| 6 |
| 7 enum DumpType { |
| 8 PERIODIC_INTERVAL, |
| 9 EXPLICITLY_TRIGGERED, |
| 10 PEAK_MEMORY_USAGE |
| 11 }; |
| 12 |
| 13 enum LevelOfDetail { |
| 14 BACKGROUND, |
| 15 LIGHT, |
| 16 DETAILED |
| 17 }; |
| 18 |
| 19 struct RequestArgs { |
| 20 uint64 dump_guid; |
| 21 DumpType dump_type; |
| 22 LevelOfDetail level_of_detail; |
| 23 }; |
| 24 |
| 25 // There should be at most one implementation of this interface per process. |
| 26 interface ProcessLocalDumpManager { |
| 27 // When successful, the dump is appended in the process-local trace buffer of |
| 28 // the target process and only an ACK is returned. |
| 29 RequestProcessMemoryDump(RequestArgs args) => |
| 30 (uint64 dump_guid, bool success); |
| 31 }; |
| 32 |
| 33 // Memory Infra service implements this interface. ProcessLocalDumpManagers |
| 34 // register themselves using the RegisterProcessLocalDumpManager method and |
| 35 // suggest a global memory dump using the RequestGlobalMemoryDump method. |
| 36 interface Coordinator { |
| 37 RegisterProcessLocalDumpManager(ProcessLocalDumpManager local_manager); |
| 38 RequestGlobalMemoryDump(RequestArgs args) => (uint64 dump_guid, bool success); |
| 39 }; |
| OLD | NEW |