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

Unified Diff: base/threading/platform_thread_posix.cc

Issue 1830693004: content: Depict priority in raster worker thread's name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: base/threading/platform_thread_posix.cc
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index bd6ae2dc09913b6396469455f16891dba90948a8..605f72696f4db683a384333230cab906e4f6298a 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -124,6 +124,23 @@ bool CreateThread(size_t stack_size,
} // namespace
+// TODO(prashant.n): Move to common file across platforms.
+std::string GetThreadPriorityAbbr(ThreadPriority priority) {
+ switch (priority) {
+ case ThreadPriority::BACKGROUND:
+ return "bg";
+ case ThreadPriority::NORMAL:
+ return "nl";
+ case ThreadPriority::DISPLAY:
+ return "ds";
+ case ThreadPriority::REALTIME_AUDIO:
+ return "rt";
+ default:
+ NOTREACHED();
+ return "";
+ }
+}
+
// static
PlatformThreadId PlatformThread::CurrentId() {
// Pthreads doesn't have the concept of a thread ID, so we have to reach down

Powered by Google App Engine
This is Rietveld 408576698