Name all threads in Firefox

RESOLVED FIXED in Firefox 69

Status

()

enhancement
RESOLVED FIXED
5 months ago
2 months ago

People

(Reporter: tarek, Assigned: tarek)

Tracking

57 Branch
mozilla69
Points:
---

Firefox Tracking Flags

(firefox69 fixed)

Details

Attachments

(1 attachment)

Some threads are started without a name (which is technically fine, the thread takes the process command name), but it makes it hard in GetProcInfo() to interpret thread activity.

Since it's just a label, let's see if we can track all unnamed threads and set meaningful names.

We should look in JS also, if some js::Thread are created without js::Thread::SetName() calls

Do we want to add AUTO_PROFILER_REGISTER_THREAD calls everywhere as well? I am not sure.. asking the experts :)

Flags: needinfo?(gtatum)
Flags: needinfo?(florian)
Flags: needinfo?(florian) → needinfo?(gsquelart)

We also need to track pthread_create() calls.

(In reply to Tarek Ziadé (:tarek) from comment #4)

Do we want to add AUTO_PROFILER_REGISTER_THREAD calls everywhere as well? I am not sure.. asking the experts :)

My first not-yet-expert reaction would be "yes please", so we can see them in profiles (if the user picks them by name, only a limited set is enabled by default, so the impact will remain small in most cases).

Ideally whoever coded these thread creations would be best placed to pick a name, and decide if a thread should not be profiled for some reason; I guess the appropriate reviewers will be able to make that call.

Flags: needinfo?(gsquelart)

Thanks for the feedback Gerald. I guess I'll add for now the SetCurrentThreadName() calls and poke people around to see if we want to profile them

Flags: needinfo?(gtatum)

This patch adds thread names where they are missing

This first patch fixes most threads I see in GetProcInfo() via GDB/LLDB so we can interpret the numbers. I will do a separate patch into the NSPR project

Pushed by tziade@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7fc2d7c0c634
Name all threads in Firefox r=Ehsan
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.