-
Notifications
You must be signed in to change notification settings - Fork 483
Open
Description
Specifying both the json and subprocess flags will only print out the dump of the root process and will ignore subprocesses. For example, when running the following python program:
import time
from multiprocessing import Process
def work():
time.sleep(1000)
for _ in range(10):
p = Process(target=work, daemon=True)
p.start()
time.sleep(1000)And then running:
py-spy dump -js --pid <pid>Will only return the dump of the root process:
[
{
"pid": 16866,
"thread_id": 140634802636608,
"thread_name": "MainThread",
"os_thread_id": 16866,
"active": false,
"owns_gil": false,
"frames": [
{
"name": "<module>",
"filename": "main.py",
"module": null,
"short_filename": "main.py",
"line": 10,
"locals": null
}
],
"process_info": null
}
]I would expect it to return dumps of all the processes/threads, instead.
Metadata
Metadata
Assignees
Labels
No labels