Process names, and predictable thread and process ordering in about:tracing

R=dsinclair

Review URL: https://chromiumcodereview.appspot.com/17451017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210437 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 221361fe..22a8bf3 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -17,6 +17,7 @@
 #include "base/threading/platform_thread.h"
 #include "build/build_config.h"
 #include "content/child/child_process.h"
+#include "content/common/content_constants_internal.h"
 #include "content/common/gpu/gpu_config.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "content/common/sandbox_linux.h"
@@ -84,6 +85,9 @@
 // Main function for starting the Gpu process.
 int GpuMain(const MainFunctionParams& parameters) {
   TRACE_EVENT0("gpu", "GpuMain");
+  base::debug::TraceLog::GetInstance()->SetProcessName("GPU Process");
+  base::debug::TraceLog::GetInstance()->SetProcessSortIndex(
+      kTraceEventGpuProcessSortIndex);
 
   const CommandLine& command_line = parameters.command_line;
   if (command_line.HasSwitch(switches::kGpuStartupDialog)) {