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

Unified Diff: content/browser/tracing/trace_message_filter.cc

Issue 1173263004: [tracing] Send unique tracing process id for cross-process memory dumps identification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing DCHECK while setting id. Created 5 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
Index: content/browser/tracing/trace_message_filter.cc
diff --git a/content/browser/tracing/trace_message_filter.cc b/content/browser/tracing/trace_message_filter.cc
index 6d485238af1b1893056ecd5fffd87d374a420104..f981e9d76d2cd778b73b305fbdca68598806a15e 100644
--- a/content/browser/tracing/trace_message_filter.cc
+++ b/content/browser/tracing/trace_message_filter.cc
@@ -9,9 +9,12 @@
namespace content {
-TraceMessageFilter::TraceMessageFilter()
+TraceMessageFilter::TraceMessageFilter(int child_process_id)
: BrowserMessageFilter(TracingMsgStart),
has_child_(false),
+ tracing_process_id_(
+ base::trace_event::MemoryDumpManager::
+ ChildProcessIdToTracingProcessId(child_process_id)),
is_awaiting_end_ack_(false),
is_awaiting_capture_monitoring_snapshot_ack_(false),
is_awaiting_buffer_percent_full_ack_(false) {
@@ -63,8 +66,8 @@ bool TraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
void TraceMessageFilter::SendBeginTracing(
const base::trace_event::TraceConfig& trace_config) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- Send(new TracingMsg_BeginTracing(trace_config.ToString(),
- base::TraceTicks::Now()));
+ Send(new TracingMsg_BeginTracing(
+ trace_config.ToString(), base::TraceTicks::Now(), tracing_process_id_));
}
void TraceMessageFilter::SendEndTracing() {
« base/trace_event/memory_dump_manager.cc ('K') | « content/browser/tracing/trace_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698