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

Unified Diff: base/trace_event/memory_dump_request_args.h

Issue 2777093009: [Memory UMA] Return a memory summary struct with the ack message (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/memory_dump_request_args.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fd426086434fb4abfe7267d7843e26a0dbeda517..0f42a185310bf10ff68803f1aba29dc3dc44be2f 100644
--- a/base/trace_event/memory_dump_request_args.h
+++ b/base/trace_event/memory_dump_request_args.h
@@ -14,6 +14,7 @@
#include "base/base_export.h"
#include "base/callback.h"
+#include "base/optional.h"
#include "base/process/process_handle.h"
namespace base {
@@ -78,7 +79,7 @@ struct MemoryDumpArgs {
// 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 BASE_EXPORT MemoryDumpCallbackResult {
struct OSMemDump {
uint32_t resident_set_kb = 0;
};
@@ -98,10 +99,17 @@ struct MemoryDumpCallbackResult {
std::map<ProcessId, OSMemDump> extra_processes_dump;
MemoryDumpCallbackResult();
+ MemoryDumpCallbackResult(const MemoryDumpCallbackResult&);
~MemoryDumpCallbackResult();
};
-using MemoryDumpCallback = Callback<void(uint64_t dump_guid, bool success)>;
+using GlobalMemoryDumpCallback =
+ Callback<void(uint64_t dump_guid, bool success)>;
+
+using ProcessMemoryDumpCallback =
+ Callback<void(uint64_t dump_guid,
+ bool success,
+ const Optional<MemoryDumpCallbackResult>& result)>;
BASE_EXPORT const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type);
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/memory_dump_request_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698