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

Unified Diff: base/trace_event/memory_dump_request_args.cc

Issue 2542853002: [tracing] Introduce config to setup memory-infra peak detection (Closed)
Patch Set: fix devtools test. Created 4 years 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
Index: base/trace_event/memory_dump_request_args.cc
diff --git a/base/trace_event/memory_dump_request_args.cc b/base/trace_event/memory_dump_request_args.cc
index e6c5b87b22684b56f399d6a21bd0f55b4244947a..cb002176675d339ca7e2cd13f7b776533645578f 100644
--- a/base/trace_event/memory_dump_request_args.cc
+++ b/base/trace_event/memory_dump_request_args.cc
@@ -20,11 +20,28 @@ const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type) {
return "periodic_interval";
case MemoryDumpType::EXPLICITLY_TRIGGERED:
return "explicitly_triggered";
+ case MemoryDumpType::PEAK_MEMORY_USAGE:
+ return "peak_memory_usage";
}
NOTREACHED();
return "unknown";
}
+MemoryDumpType StringToMemoryDumpType(const std::string& str) {
+ if (str == "task_begin")
+ return MemoryDumpType::TASK_BEGIN;
+ if (str == "task_end")
+ return MemoryDumpType::TASK_END;
+ if (str == "periodic_interval")
+ return MemoryDumpType::PERIODIC_INTERVAL;
+ if (str == "explicitly_triggered")
+ return MemoryDumpType::EXPLICITLY_TRIGGERED;
+ if (str == "peak_memory_usage")
+ return MemoryDumpType::PEAK_MEMORY_USAGE;
+ NOTREACHED();
+ return MemoryDumpType::LAST;
+}
+
const char* MemoryDumpLevelOfDetailToString(
const MemoryDumpLevelOfDetail& level_of_detail) {
switch (level_of_detail) {

Powered by Google App Engine
This is Rietveld 408576698