diff options
author | Jakub Pawlowski <jpawlowski@google.com> | 2017-03-14 10:55:53 -0700 |
---|---|---|
committer | Jakub Pawlowski <jpawlowski@google.com> | 2017-12-19 07:47:37 -0800 |
commit | bf8c17f71511c1e90cd8cccfe71f0852c566bd3b (patch) | |
tree | b5603968c3907c8b41594f2a2b0f15475406f94d /base/trace_event/memory_dump_request_args.h | |
parent | 9b3f4a254c327005c91c1eb094062cdefe5f0553 (diff) | |
download | libchrome-bf8c17f71511c1e90cd8cccfe71f0852c566bd3b.tar.gz |
Uprev the library to r462023 from Chromium
This merge was done against r462023 which corresponds to git commit
32eb7c31af9cab6231f0d3d05206072079177605 from Apr 05, 2017
Change-Id: I70bf77fcb3215da3e17f997752bfdad7d4e6e1c9
Diffstat (limited to 'base/trace_event/memory_dump_request_args.h')
-rw-r--r-- | base/trace_event/memory_dump_request_args.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/base/trace_event/memory_dump_request_args.h b/base/trace_event/memory_dump_request_args.h index 90a866fa7a..a8b3f423ca 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); |