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

Unified Diff: base/trace_event/memory_dump_request_args.h

Issue 1337943003: [tracing] Non-functional refactor of memory dump arg names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows test Created 5 years, 3 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_provider.h ('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 3f74e81ffa67eea30b64f07b5d939c3353fbb2d8..d1bb6c3c51b7c4c8f4a48f5b5f7ba560be1a03bb 100644
--- a/base/trace_event/memory_dump_request_args.h
+++ b/base/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 | « base/trace_event/memory_dump_provider.h ('k') | base/trace_event/memory_dump_request_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698