Closed
Bug 606102
Opened 14 years ago
Closed 12 years ago
Allow XPCOM threads to be given a name visible to the underlying OS
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: cjones, Unassigned)
References
Details
Attachments
(1 file)
See bug 606062 comment 0: this can be very useful for gross profiling, because with named threads can simply look at which threads are chewing CPU in a tool like |top| and say, e.g., "oh, that's the Sync thread".
The patch I'm about to attach just adds support for linux.
Reporter | ||
Comment 1•14 years ago
|
||
I should add that NSPR is a better place for this code, but I don't have the motivation to attempt a new NSPR interface, and bug 507718 would obsolete that code anyway.
Reporter | ||
Comment 2•14 years ago
|
||
Assignee: nobody → jones.chris.g
Attachment #484967 -
Flags: superreview?(benjamin)
For reference the windows equivalent will need to do something like the chromium code:
http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/base/platform_thread_win.cc#12
Reporter | ||
Comment 4•14 years ago
|
||
o_O http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/base/platform_thread_win.cc#47 . Surely that can't be serious.
Comment 5•14 years ago
|
||
It's serious, thread names are only stored by the debugger on Windows, not the OS, and that's the documented way of communicating a preferred thread name to the debugger.
Comment 6•14 years ago
|
||
Comment on attachment 484967 [details] [diff] [review]
Add nsIThreadManager.newNamedThread() for creating threads with OS-visible names
I'd kinda prefer to just make this
nsIThread newThread(in unsigned long creationFlags, [optional] in string name)
Or just ditch creationFlags since we're not using it anyway.
But this can wait until after branch, so I'm going to just clear the review flag for now.
Attachment #484967 -
Flags: superreview?(benjamin)
Reporter | ||
Comment 7•12 years ago
|
||
We did this work in another bug.
Assignee: jones.chris.g → nobody
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•