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

Unified Diff: content/browser/zygote_main_linux.cc

Issue 10165015: Correct process id for sandbox'd trace events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_main_linux.cc
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc
index db8039fb1755963d9db3cf3e75f83e086c3052c4..68ec5e1e8f0cd664bae81ada59cfb5f59f284faa 100644
--- a/content/browser/zygote_main_linux.cc
+++ b/content/browser/zygote_main_linux.cc
@@ -16,6 +16,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
+#include "base/debug/trace_event.h"
#include "base/eintr_wrapper.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -327,6 +328,10 @@ class Zygote {
// Sandboxed processes need to send the global, non-namespaced PID when
// setting up an IPC channel to their parent.
IPC::Channel::SetGlobalPid(real_pid);
+ // Force the real PID so chrome event data have a PID that corresponds
+ // to system trace event data.
+ base::debug::TraceLog::GetInstance()->SetProcessID(
+ static_cast<int>(real_pid));
Markus (顧孟勤) 2012/04/20 21:13:29 You mentioned that this is currently something tha
#endif
close(pipe_fds[0]);
close(dummy_fd);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698