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

Unified Diff: base/trace_event/trace_log.cc

Issue 1262333005: [tracing] Introduce MemoryDumpArgs to enable light and heavy dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 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/trace_log.h ('k') | base/trace_event/winheap_dump_provider_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index 303f9db99e1030797f67e03ac37489ed087e8e11..56c01c1d610a695d086dc55cbbd4ba47812dcb18 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -227,7 +227,8 @@ class TraceLog::ThreadLocalEventBuffer
void WillDestroyCurrentMessageLoop() override;
// MemoryDumpProvider implementation.
- bool OnMemoryDump(ProcessMemoryDump* pmd) override;
+ bool OnMemoryDump(const MemoryDumpArgs& args,
+ ProcessMemoryDump* pmd) override;
void FlushWhileLocked();
@@ -355,7 +356,8 @@ void TraceLog::ThreadLocalEventBuffer::WillDestroyCurrentMessageLoop() {
delete this;
}
-bool TraceLog::ThreadLocalEventBuffer::OnMemoryDump(ProcessMemoryDump* pmd) {
+bool TraceLog::ThreadLocalEventBuffer::OnMemoryDump(const MemoryDumpArgs& args,
+ ProcessMemoryDump* pmd) {
if (!chunk_)
return true;
std::string dump_base_name = StringPrintf(
@@ -466,7 +468,10 @@ void TraceLog::InitializeThreadLocalEventBufferIfSupported() {
}
}
-bool TraceLog::OnMemoryDump(ProcessMemoryDump* pmd) {
+bool TraceLog::OnMemoryDump(const MemoryDumpArgs& args,
+ ProcessMemoryDump* pmd) {
+ // TODO(ssid): Use MemoryDumpArgs to create light dumps when requested
+ // (crbug.com/499731).
TraceEventMemoryOverhead overhead;
overhead.Add("TraceLog", sizeof(*this));
{
« no previous file with comments | « base/trace_event/trace_log.h ('k') | base/trace_event/winheap_dump_provider_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698