Index: base/trace_event/memory_dump_request_args.h |
diff --git a/base/trace_event/memory_dump_request_args.h b/base/trace_event/memory_dump_request_args.h |
index 90a866fa7a3fbd229b0290cf8053f7fa6861127c..a8b3f423cad37f4aaaac3b9f395e4f20b509a65a 100644 |
--- a/base/trace_event/memory_dump_request_args.h |
+++ b/base/trace_event/memory_dump_request_args.h |
@@ -9,10 +9,12 @@ |
// These are also used in the IPCs for coordinating inter-process memory dumps. |
#include <stdint.h> |
+#include <map> |
#include <string> |
#include "base/base_export.h" |
#include "base/callback.h" |
+#include "base/process/process_handle.h" |
namespace base { |
namespace trace_event { |
@@ -72,6 +74,33 @@ struct MemoryDumpArgs { |
MemoryDumpLevelOfDetail level_of_detail; |
}; |
+// TODO(hjd): Not used yet, see crbug.com/703184 |
+// Summarises information about memory use as seen by a single process. |
+// This information will eventually be passed to a service to be colated |
+// and reported. |
+struct MemoryDumpCallbackResult { |
+ struct OSMemDump { |
+ uint32_t resident_set_kb = 0; |
+ }; |
+ struct ChromeMemDump { |
+ uint32_t malloc_total_kb = 0; |
+ uint32_t partition_alloc_total_kb = 0; |
+ uint32_t blink_gc_total_kb = 0; |
+ uint32_t v8_total_kb = 0; |
+ }; |
+ |
+ // These are for the current process. |
+ OSMemDump os_dump; |
+ ChromeMemDump chrome_dump; |
+ |
+ // In some cases, OS stats can only be dumped from a privileged process to |
+ // get around to sandboxing/selinux restrictions (see crbug.com/461788). |
+ std::map<ProcessId, OSMemDump> extra_processes_dump; |
+ |
+ MemoryDumpCallbackResult(); |
+ ~MemoryDumpCallbackResult(); |
+}; |
+ |
using MemoryDumpCallback = Callback<void(uint64_t dump_guid, bool success)>; |
BASE_EXPORT const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type); |