Commit ac2541e7 authored by Bin Du's avatar Bin Du Committed by Commit Bot

Record thread types of ThreadPool*, GpuMemory, Compositor/[0-9]+ threads.

Record thread types of ThreadPool* threads using the newly added THREAD_POOL_THREAD enum type, GpuMemory* threads using the newly added GPU_MEMORY_THREAD enum type, and Compositor/[0-9]+ thread using the existing COMPOSITOR_THREAD.

BUG=b:130928904

Change-Id: I2f39cb84ee73658c84185d1e0b2e3513edb014d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816302
Commit-Queue: Bin Du <dubin@google.com>
Reviewed-by: default avatarGabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700360}
parent eb0081e8
...@@ -166,16 +166,20 @@ std::map<uint32_t, Thread> ProcessTypeCollector::ParseThreadTypes( ...@@ -166,16 +166,20 @@ std::map<uint32_t, Thread> ProcessTypeCollector::ParseThreadTypes(
base::StartsWith(cmd, "Chrome_ChildIOT", base::StartsWith(cmd, "Chrome_ChildIOT",
base::CompareCase::SENSITIVE)) { base::CompareCase::SENSITIVE)) {
thread = Thread::IO_THREAD; thread = Thread::IO_THREAD;
} else if (cmd == "Compositor" || } else if (base::StartsWith(cmd, "CompositorTileW",
base::CompareCase::SENSITIVE)) {
thread = Thread::COMPOSITOR_TILE_WORKER_THREAD;
} else if (base::StartsWith(cmd, "Compositor",
base::CompareCase::SENSITIVE) ||
base::StartsWith(cmd, "VizCompositorTh", base::StartsWith(cmd, "VizCompositorTh",
base::CompareCase::SENSITIVE)) { base::CompareCase::SENSITIVE)) {
thread = Thread::COMPOSITOR_THREAD; thread = Thread::COMPOSITOR_THREAD;
} else if (base::StartsWith(cmd, "TaskScheduler", } else if (base::StartsWith(cmd, "ThreadPool",
base::CompareCase::SENSITIVE)) { base::CompareCase::SENSITIVE)) {
thread = Thread::SCHEDULER_WORKER_THREAD; thread = Thread::THREAD_POOL_THREAD;
} else if (base::StartsWith(cmd, "CompositorTileW", } else if (base::StartsWith(cmd, "GpuMemory",
base::CompareCase::SENSITIVE)) { base::CompareCase::SENSITIVE)) {
thread = Thread::COMPOSITOR_TILE_WORKER_THREAD; thread = Thread::GPU_MEMORY_THREAD;
} }
thread_types.emplace(tid, thread); thread_types.emplace(tid, thread);
......
...@@ -61,11 +61,13 @@ void GetExampleThreadTypeDataset(std::string* ps_output, ...@@ -61,11 +61,13 @@ void GetExampleThreadTypeDataset(std::string* ps_output,
4000 4726 Chrome_IOThread /opt/google/chrome/chrome --ppapi-flash-path=... 4000 4726 Chrome_IOThread /opt/google/chrome/chrome --ppapi-flash-path=...
10000 12107 Chrome_ChildIOT /opt/google/chrome/chrome --type=gpu-process 10000 12107 Chrome_ChildIOT /opt/google/chrome/chrome --type=gpu-process
11000 12207 VizCompositorTh /opt/google/chrome/chrome --type=gpu-process 11000 12207 VizCompositorTh /opt/google/chrome/chrome --type=gpu-process
12103 12112 Compositor /opt/google/chrome/chrome --type=gpu-process 12103 12112 Compositor/7 /opt/google/chrome/chrome --type=gpu-process
15000 15112 TaskSchedulerFo /opt/google/chrome/chrome --type=renderer 12304 12699 Compositor /opt/google/chrome/chrome --type=gpu-process
13001 13521 GpuMemoryThread /opt/google/chrome/chrome --type=renderer
15000 15112 ThreadPoolForeg /opt/google/chrome/chrome --type=renderer
16000 16112 CompositorTileW /opt/google/chrome/chrome --type=renderer 16000 16112 CompositorTileW /opt/google/chrome/chrome --type=renderer
12345 12456 OtherThread /opt/google/chrome/chrome --ppapi-flash-path=... 12345 12456 OtherThread /opt/google/chrome/chrome --ppapi-flash-path=...
13456 13566 Compositor non_chrome_exec --some-flag=foo)text"; 13456 13566 Compositor/6 non_chrome_exec --some-flag=foo)text";
thread_types->insert( thread_types->insert(
google::protobuf::MapPair<uint32_t, Thread>(12000, Thread::MAIN_THREAD)); google::protobuf::MapPair<uint32_t, Thread>(12000, Thread::MAIN_THREAD));
thread_types->insert( thread_types->insert(
...@@ -77,7 +79,11 @@ void GetExampleThreadTypeDataset(std::string* ps_output, ...@@ -77,7 +79,11 @@ void GetExampleThreadTypeDataset(std::string* ps_output,
thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>( thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>(
12112, Thread::COMPOSITOR_THREAD)); 12112, Thread::COMPOSITOR_THREAD));
thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>( thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>(
15112, Thread::SCHEDULER_WORKER_THREAD)); 12699, Thread::COMPOSITOR_THREAD));
thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>(
15112, Thread::THREAD_POOL_THREAD));
thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>(
13521, Thread::GPU_MEMORY_THREAD));
thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>( thread_types->insert(google::protobuf::MapPair<uint32_t, Thread>(
16112, Thread::COMPOSITOR_TILE_WORKER_THREAD)); 16112, Thread::COMPOSITOR_TILE_WORKER_THREAD));
thread_types->insert( thread_types->insert(
......
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