You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fb-py-spy: log thread ids and names in a perfetto compatible way
Summary:
This modifies py-spy to use a sequential thread ID counter for each
event and instead log a thread_name metadata field that includes the
full thread ID as well as the thread name.
Perfetto doesn't support u64 thread ids so we lose thread information
and the py-spy chrometrace format doesn't include thread names.
Upstream PR: benfred#681
Test Plan:
Launch a process that uses subprocesses and threads
```
buck2 run fbsource//third-party/py-spy:py-spy -- record --format chrometrace --nonblocking --output ~/test-pyspy.json.gz --subprocesses -- torchx run -s local_cwd dist.ddp -j2x2 -m hi
```
{F1866175191}
Perfetto:
{F1866171613}
Chrome Tracing:
{F1866174988}
Reviewers: agallagher, kunalb, egl
Reviewed By: kunalb, egl
Differential Revision: https://phabricator.intern.facebook.com/D62666434
0 commit comments