firefox-devtools / firefox-devtools/profiler
Add a mechanism to name Workers
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 30
Description
> Re-filed this issue from juj
>
> ## Add a mechanism to name Workers
> Working on profiling a large 3D engine, with several dedicated threads for audio, physics, statistics, particles, rendering, networking, file io, decompression, game logic and a generic task pool, it takes a lot of time to be able to identify which one is which. In Emscripten, Workers are always loaded from the same laucher url "pthread-main.js" (or from a blob url "blob://long-unreadable-uuid"), see below
>
> 
>
> In that image, see on the left, where each thread is name `"DOM Worker 'pthread-..."`, which is difficult to identify the interesting thread.
>
> It would be very useful if there was a way for JS code to assist the profiler by being able to call something like `workerglobalscope.geckoProfiler.setCallingThreadName('audioThread');`. I would then be able to hook these types of calls into the program I am profiling.
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-666)
Contributor guide
Assessment
This issue has not been assessed yet.