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

Unified Diff: trace_event/memory_dump_request_args.h

Issue 2045223003: Update to Chromium //base at Chromium commit 82baa9afc6620c68cb2168f20bb65e77e3e57f0a. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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 | « trace_event/memory_dump_provider.h ('k') | 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: trace_event/memory_dump_request_args.h
diff --git a/trace_event/memory_dump_request_args.h b/trace_event/memory_dump_request_args.h
index 27ea451da18b0b1611d4fa0067b6e0f1bb43351b..ac3839054aee3039829cb3c7f5f8374d997ec03a 100644
--- a/trace_event/memory_dump_request_args.h
+++ b/trace_event/memory_dump_request_args.h
@@ -8,9 +8,10 @@
// This file defines the types and structs used to issue memory dump requests.
// These are also used in the IPCs for coordinating inter-process memory dumps.
+#include <string>
+
#include "base/base_export.h"
#include "base/callback.h"
-#include "base/trace_event/memory_dump_provider.h"
namespace base {
namespace trace_event {
@@ -25,11 +26,18 @@ enum class MemoryDumpType {
LAST = EXPLICITLY_TRIGGERED // For IPC macros.
};
-// Returns the name in string for the dump type given.
-BASE_EXPORT const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type);
-
-using MemoryDumpCallback = Callback<void(uint64 dump_guid, bool success)>;
+// Tells the MemoryDumpProvider(s) how much detailed their dumps should be.
+// MemoryDumpProvider instances must guarantee that level of detail does not
+// affect the total size reported in the root node, but only the granularity of
+// the child MemoryAllocatorDump(s).
+enum class MemoryDumpLevelOfDetail {
+ LIGHT, // Few entries, typically a fixed number, per dump.
+ DETAILED, // Unrestricted amount of entries per dump.
+ LAST = DETAILED // For IPC Macros.
+};
+// Initial request arguments for a global memory dump. (see
+// MemoryDumpManager::RequestGlobalMemoryDump()).
struct BASE_EXPORT MemoryDumpRequestArgs {
// Globally unique identifier. In multi-process dumps, all processes issue a
// local dump with the same guid. This allows the trace importers to
@@ -37,10 +45,19 @@ struct BASE_EXPORT MemoryDumpRequestArgs {
uint64 dump_guid;
MemoryDumpType dump_type;
-
- MemoryDumpArgs dump_args;
+ MemoryDumpLevelOfDetail level_of_detail;
};
+using MemoryDumpCallback = Callback<void(uint64 dump_guid, bool success)>;
+
+BASE_EXPORT const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type);
+
+BASE_EXPORT const char* MemoryDumpLevelOfDetailToString(
+ const MemoryDumpLevelOfDetail& level_of_detail);
+
+BASE_EXPORT MemoryDumpLevelOfDetail
+StringToMemoryDumpLevelOfDetail(const std::string& str);
+
} // namespace trace_event
} // namespace base
« no previous file with comments | « trace_event/memory_dump_provider.h ('k') | trace_event/memory_dump_request_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698