Closed Bug 1533675 Opened 6 years ago Closed 6 years ago

Name all threads in Firefox

Categories

(Core :: XPCOM, enhancement)

57 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: tarek, Assigned: tarek)

Details

Attachments

(1 file)

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

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: