profiler
profiler copied to clipboard
Add a "Drop samples" dropdown to the stack settings toolbar
It should provide an option to toggle samples that contain.
- Native stack
- JS-only stacks
- Idle stack
Idle stacks are currently not instrumented with pseudo stacks, so we'll need to string sniff. The following function names should be filtered:
- Mac:
mach_msg_trap - Windows:
NtWaitForAlertByThreadId - Windows:
NtUserMsgWaitForMultipleObjectsEx - todo
mstange can you help me with filling these in ^
┆Issue is synchronized with this Jira Task
NtWaitForAlertByThreadId and NtUserMsgWaitForMultipleObjectsEx are the 2 symbols I typically see at the bottom of idle stacks on Windows profiles.
On Linux' libc it is __poll.
I also see things like pthread_cond_wait, I don't know if that should be included. Likely yes (especially visible in the compositor, maybe that's for threads).
I see __poll for workers too.
On Mac, I see __psynch_cvwait for the compositor.
On Mac, I see __psynch_cvwait for the compositor.
On Windows, this is NtUserMsgWaitForMultipleObjectsEx, so like other processes.
Note that sometimes, stacks will have a leafnode at something like NtWaitForAlertByThreadId not because they're idle, but because they're waiting synchronously for something to complete (like something to finish on a different thread). We need to make sure this information isn't accidentally lost.
I don't know how we can discriminate such a synchronous wait. Maybe the stack actually looks different ?