Bug 1323100 - Use AutoProfilerRegister to register chromium threads with the profiler. r=froydnj
☠☠ backed out by dbe5b7ff43b6 ☠ ☠
authorMarkus Stange <mstange@themasta.com>
Thu, 22 Dec 2016 00:48:55 +0100
changeset 374862 84fb749698abd1b1c73e2f0a48dce6a3b60aa5e0
parent 374861 d6d25e8bd001ff063ab7063d3bfb06356b0cd350
child 374863 77cbde755c30cc4adff4bedc5363e15dfd702edb
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1323100
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1323100 - Use AutoProfilerRegister to register chromium threads with the profiler. r=froydnj MozReview-Commit-ID: 12LS5hqCA2c
ipc/chromium/src/base/thread.cc
--- a/ipc/chromium/src/base/thread.cc
+++ b/ipc/chromium/src/base/thread.cc
@@ -148,18 +148,17 @@ void Thread::StopSoon() {
   // to someone calling Quit() on our message loop directly.
   DCHECK(message_loop_);
 
   RefPtr<ThreadQuitTask> task = new ThreadQuitTask();
   message_loop_->PostTask(task.forget());
 }
 
 void Thread::ThreadMain() {
-  char aLocal;
-  profiler_register_thread(name_.c_str(), &aLocal);
+  mozilla::AutoProfilerRegister registerThread(name_.c_str());
   mozilla::IOInterposer::RegisterCurrentThread();
 
   // The message loop for this thread.
   MessageLoop message_loop(startup_data_->options.message_loop_type,
                            NS_GetCurrentThread());
 
   // Complete the initialization of our Thread object.
   thread_id_ = PlatformThread::CurrentId();
@@ -181,17 +180,16 @@ void Thread::ThreadMain() {
 
   // Let the thread do extra cleanup.
   CleanUp();
 
   // Assert that MessageLoop::Quit was called by ThreadQuitTask.
   DCHECK(GetThreadWasQuitProperly());
 
   mozilla::IOInterposer::UnregisterCurrentThread();
-  profiler_unregister_thread();
 
 #ifdef MOZ_TASK_TRACER
   mozilla::tasktracer::FreeTraceInfo();
 #endif
 
   // We can't receive messages anymore.
   message_loop_ = NULL;
   thread_id_ = 0;