Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: services/resource_coordinator/public/interfaces/memory/memory_instrumentation.mojom

Issue 2883693002: [Memory-UMA] Implement basic working prototype. (Closed)
Patch Set: Tests working. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
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 // TODO(hjd): add the computed Consistent Memory Metrics footprints here. 66 // This is roughly private, anonymous, non-discardable, resident or swapped
67 // memory. For more details, see https://goo.gl/3kPb9S.
68 uint32 private_footprint = 0;
67 69
68 // 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
69 // around sandboxing. See crbug.com/461788 . 71 // around sandboxing. See crbug.com/461788 .
70 map<mojo.common.mojom.ProcessId, OSMemDump> extra_processes_dump; 72 map<mojo.common.mojom.ProcessId, OSMemDump> extra_processes_dump;
71 }; 73 };
72 74
73 75
74 // This struct is returned by the public-facing API 76 // This struct is returned by the public-facing API
75 // Coordinator::RequestGlobalMemoryDump(). 77 // Coordinator::RequestGlobalMemoryDump().
76 struct GlobalMemoryDump { 78 struct GlobalMemoryDump {
(...skipping 16 matching lines...) Expand all
93 // 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
94 // when RequestGlobalMemoryDump() is called. 96 // when RequestGlobalMemoryDump() is called.
95 RegisterProcessLocalDumpManager(ProcessLocalDumpManager local_manager); 97 RegisterProcessLocalDumpManager(ProcessLocalDumpManager local_manager);
96 98
97 // Broadcasts a dump request to all registered client libraries, injects the 99 // Broadcasts a dump request to all registered client libraries, injects the
98 // 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
99 // dump back if args.dump_type == SUMMARY_ONLY. 101 // dump back if args.dump_type == SUMMARY_ONLY.
100 RequestGlobalMemoryDump(RequestArgs args) => 102 RequestGlobalMemoryDump(RequestArgs args) =>
101 (uint64 dump_guid, bool success, GlobalMemoryDump? global_memory_dump); 103 (uint64 dump_guid, bool success, GlobalMemoryDump? global_memory_dump);
102 }; 104 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698