forked from benfred/py-spy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters