Commit 78994e60 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[tracing] Move "WorkerThread active" event to base category

This is the ThreadPool equivalent to the upcoming
"ThreadController active" event.

R=fdoray@chromium.org

Bug: 899897
Change-Id: Ic80532cbf3ecb583d3b7fa04374f79e4366214c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254093Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780919}
parent 7a90fb2e
......@@ -293,9 +293,8 @@ NOINLINE void WorkerThread::RunBackgroundDedicatedCOMWorker() {
void WorkerThread::RunWorker() {
DCHECK_EQ(self_, this);
TRACE_EVENT_INSTANT0("thread_pool", "WorkerThreadThread born",
TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_BEGIN0("thread_pool", "WorkerThreadThread active");
TRACE_EVENT_INSTANT0("base", "WorkerThread born", TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_BEGIN0("base", "WorkerThread active");
if (worker_thread_observer_)
worker_thread_observer_->OnWorkerThreadMainEntry();
......@@ -317,9 +316,9 @@ void WorkerThread::RunWorker() {
// A WorkerThread starts out waiting for work.
{
TRACE_EVENT_END0("thread_pool", "WorkerThreadThread active");
TRACE_EVENT_END0("base", "WorkerThread active");
delegate_->WaitForWork(&wake_up_event_);
TRACE_EVENT_BEGIN0("thread_pool", "WorkerThreadThread active");
TRACE_EVENT_BEGIN0("base", "WorkerThread active");
}
while (!ShouldExit()) {
......@@ -339,10 +338,10 @@ void WorkerThread::RunWorker() {
if (ShouldExit())
break;
TRACE_EVENT_END0("thread_pool", "WorkerThreadThread active");
TRACE_EVENT_END0("base", "WorkerThread active");
hang_watch_scope.reset();
delegate_->WaitForWork(&wake_up_event_);
TRACE_EVENT_BEGIN0("thread_pool", "WorkerThreadThread active");
TRACE_EVENT_BEGIN0("base", "WorkerThread active");
continue;
}
......@@ -370,9 +369,8 @@ void WorkerThread::RunWorker() {
// and as such no more member accesses should be made after this point.
self_ = nullptr;
TRACE_EVENT_END0("thread_pool", "WorkerThreadThread active");
TRACE_EVENT_INSTANT0("thread_pool", "WorkerThreadThread dead",
TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_END0("base", "WorkerThread active");
TRACE_EVENT_INSTANT0("base", "WorkerThread dead", TRACE_EVENT_SCOPE_THREAD);
}
} // namespace internal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment