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

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: Nits. 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 1ded8e5fec3efdb75ac9f28d0ab9b8e310eb3006..b685ef1d48ed7b3333afc05a0b8c90604da7777f 100644
--- a/content/browser/tracing/trace_message_filter.cc
+++ b/content/browser/tracing/trace_message_filter.cc
@@ -4,14 +4,17 @@
#include "content/browser/tracing/trace_message_filter.h"
+#include "base/hash.h"
+#include "base/strings/string_number_conversions.h"
#include "components/tracing/tracing_messages.h"
#include "content/browser/tracing/tracing_controller_impl.h"
namespace content {
-TraceMessageFilter::TraceMessageFilter()
+TraceMessageFilter::TraceMessageFilter(int child_process_id)
: BrowserMessageFilter(TracingMsgStart),
has_child_(false),
+ tracing_process_id_(base::Hash(base::IntToString(child_process_id))),
Primiano Tucci (use gerrit) 2015/06/23 13:35:20 This should be a method of MDM. Otherwise there is
ssid 2015/06/24 08:37:57 Done.
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.h ('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