profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Add a "Drop samples" dropdown to the stack settings toolbar

Open gregtatum opened this issue 7 years ago • 7 comments

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

gregtatum avatar Apr 05 '18 16:04 gregtatum

NtWaitForAlertByThreadId and NtUserMsgWaitForMultipleObjectsEx are the 2 symbols I typically see at the bottom of idle stacks on Windows profiles.

fqueze avatar Apr 05 '18 16:04 fqueze

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).

julienw avatar Apr 06 '18 11:04 julienw

I see __poll for workers too.

julienw avatar Apr 06 '18 12:04 julienw

On Mac, I see __psynch_cvwait for the compositor.

julienw avatar Apr 06 '18 12:04 julienw

On Mac, I see __psynch_cvwait for the compositor.

On Windows, this is NtUserMsgWaitForMultipleObjectsEx, so like other processes.

julienw avatar Apr 06 '18 13:04 julienw

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.

mikeconley avatar Apr 06 '18 16:04 mikeconley

I don't know how we can discriminate such a synchronous wait. Maybe the stack actually looks different ?

julienw avatar Apr 09 '18 12:04 julienw