py-spy
py-spy copied to clipboard
sampling only in D state (uninterruptible sleep)
I would like to profile a python program that spends substantial time in D state (uninterruptible sleep), indicating costly disk IO operations. Would it be possible to run py-spy or modify it, so that it only records samples if it finds the application in this state?