WebKit Bugzilla
Attachment 342679 Details for
Bug 186604
: AutomaticThread should have a way to provide a thread name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186604-20180613120104.patch (text/plain), 6.04 KB, created by
Keith Miller
on 2018-06-13 12:01:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2018-06-13 12:01:04 PDT
Size:
6.04 KB
patch
obsolete
>Subversion Revision: 232721 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index f1551768b6c61fc3cdca8224594df5210996b619..86bfce0d7afc40b904effdb62ff60836cbfddb87 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-13 Keith Miller <keith_miller@apple.com> >+ >+ AutomaticThread should have a way to provide a thread name >+ https://bugs.webkit.org/show_bug.cgi?id=186604 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add names for JSC's automatic threads. >+ >+ * dfg/DFGWorklist.cpp: >+ * heap/Heap.cpp: >+ * jit/JITWorklist.cpp: >+ * runtime/VMTraps.cpp: >+ * wasm/WasmWorklist.cpp: >+ > 2018-06-11 Michael Saboff <msaboff@apple.com> > > JavaScriptCore: Disable 32-bit JIT on Windows >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 43a7f596b05e11b11df643b8f033babe902fd461..198eb39461055cca2e7aac76ade8fc568220664b 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-13 Keith Miller <keith_miller@apple.com> >+ >+ AutomaticThread should have a way to provide a thread name >+ https://bugs.webkit.org/show_bug.cgi?id=186604 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ AutomaticThread now has a virtual method to get a name, which can be >+ overridden to provide a custom name to the thread. >+ >+ * wtf/AutomaticThread.cpp: >+ (WTF::AutomaticThread::start): >+ * wtf/AutomaticThread.h: >+ * wtf/WorkerPool.cpp: >+ > 2018-06-11 Michael Saboff <msaboff@apple.com> > > JavaScriptCore: Disable 32-bit JIT on Windows >diff --git a/Source/JavaScriptCore/dfg/DFGWorklist.cpp b/Source/JavaScriptCore/dfg/DFGWorklist.cpp >index 685f04233d05be4a83fe7da9bc3142ae80c3b62f..5bc88c4050aba9c6701d566e6d78e0849ea193fc 100644 >--- a/Source/JavaScriptCore/dfg/DFGWorklist.cpp >+++ b/Source/JavaScriptCore/dfg/DFGWorklist.cpp >@@ -46,7 +46,12 @@ public: > , m_relativePriority(relativePriority) > { > } >- >+ >+ const char* name() const override >+ { >+ return m_worklist.m_threadName.data(); >+ } >+ > protected: > PollResult poll(const AbstractLocker& locker) override > { >@@ -160,7 +165,7 @@ protected: > m_compilationScope = nullptr; > m_plan = nullptr; > } >- >+ > private: > Worklist& m_worklist; > ThreadData& m_data; >diff --git a/Source/JavaScriptCore/heap/Heap.cpp b/Source/JavaScriptCore/heap/Heap.cpp >index 63d8001d388a4e1db5e75f4a2428725b7f9c5486..88e12db5f538c0bfa418d9cb9770251e4edb60d8 100644 >--- a/Source/JavaScriptCore/heap/Heap.cpp >+++ b/Source/JavaScriptCore/heap/Heap.cpp >@@ -238,6 +238,11 @@ public: > , m_heap(heap) > { > } >+ >+ const char* name() const override >+ { >+ return "JSC Heap Collector Thread"; >+ } > > protected: > PollResult poll(const AbstractLocker& locker) override >diff --git a/Source/JavaScriptCore/jit/JITWorklist.cpp b/Source/JavaScriptCore/jit/JITWorklist.cpp >index f534910c53c4fd4b5b6611474ad0547f44b7bf6c..0b32e1f7938c6c6afc76c7f1998c0666c35fd3bf 100644 >--- a/Source/JavaScriptCore/jit/JITWorklist.cpp >+++ b/Source/JavaScriptCore/jit/JITWorklist.cpp >@@ -105,6 +105,11 @@ public: > { > m_worklist.m_numAvailableThreads++; > } >+ >+ const char* name() const override >+ { >+ return "JIT Worklist Helper Thread"; >+ } > > protected: > PollResult poll(const AbstractLocker&) override >diff --git a/Source/JavaScriptCore/runtime/VMTraps.cpp b/Source/JavaScriptCore/runtime/VMTraps.cpp >index e6e848f5c95563ea76df3b60f57603090489b6ce..6c14c0a92df0cd3a63ae091955742fcfbda25d7d 100644 >--- a/Source/JavaScriptCore/runtime/VMTraps.cpp >+++ b/Source/JavaScriptCore/runtime/VMTraps.cpp >@@ -220,6 +220,11 @@ public: > }); > } > >+ const char* name() const override >+ { >+ return "JSC VMTraps Signal Sender Thread"; >+ } >+ > VMTraps& traps() { return m_vm.traps(); } > > protected: >diff --git a/Source/JavaScriptCore/wasm/WasmWorklist.cpp b/Source/JavaScriptCore/wasm/WasmWorklist.cpp >index 2fe132c0f8726f45bbc19cd3db12b9f2da24302b..6b32533160440cbed13a224bd8bf8bea8b997e6e 100644 >--- a/Source/JavaScriptCore/wasm/WasmWorklist.cpp >+++ b/Source/JavaScriptCore/wasm/WasmWorklist.cpp >@@ -117,6 +117,11 @@ protected: > return complete(holdLock(*worklist.m_lock)); > } > >+ const char* name() const override >+ { >+ return "Wasm Worklist Helper Thread"; >+ } >+ > public: > Condition synchronize; > Worklist& worklist; >diff --git a/Source/WTF/wtf/AutomaticThread.cpp b/Source/WTF/wtf/AutomaticThread.cpp >index a59c5d1bc969240d8c7addccc2cbb471e9e70187..f1156ac14a47980b6945d1b7f8351a09227480ce 100644 >--- a/Source/WTF/wtf/AutomaticThread.cpp >+++ b/Source/WTF/wtf/AutomaticThread.cpp >@@ -163,7 +163,7 @@ void AutomaticThread::start(const AbstractLocker&) > m_hasUnderlyingThread = true; > > Thread::create( >- "WTF::AutomaticThread", >+ name(), > [=] () { > if (verbose) > dataLog(RawPointer(this), ": Running automatic thread!\n"); >diff --git a/Source/WTF/wtf/AutomaticThread.h b/Source/WTF/wtf/AutomaticThread.h >index 00545245091350bf060c7c15830323685fbafd95..387fd8f7871a8d01ce16b82efbfdfc2bef14d1c0 100644 >--- a/Source/WTF/wtf/AutomaticThread.h >+++ b/Source/WTF/wtf/AutomaticThread.h >@@ -125,7 +125,9 @@ public: > bool notify(const AbstractLocker&); > > void join(); >- >+ >+ virtual const char* name() const { return "WTF::AutomaticThread"; } >+ > protected: > // This logically creates the thread, but in reality the thread won't be created until someone > // calls AutomaticThreadCondition::notifyOne() or notifyAll(). >diff --git a/Source/WTF/wtf/WorkerPool.cpp b/Source/WTF/wtf/WorkerPool.cpp >index b879076dd7b34dcc2f7d98e0f1cec90a1c693c5a..3ccb7a2dee6484af842861da5419467eeda5b003 100644 >--- a/Source/WTF/wtf/WorkerPool.cpp >+++ b/Source/WTF/wtf/WorkerPool.cpp >@@ -73,6 +73,11 @@ public: > return m_pool.shouldSleep(locker); > } > >+ const char* name() const override >+ { >+ return "Worker Pool"; >+ } >+ > private: > WorkerPool& m_pool; > Function<void()> m_task;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
fpizlo
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186604
: 342679