PProf.jl
PProf.jl copied to clipboard
Option to exclude idle threads
Profile
currently reports all idle threads sitting in __psynch_cvwait
. So the more threads you are using with Julia, the smaller the percentage of the report your actual work will be. For example, this profile was taken on my machine with 6 threads (the default when running in Juno), when i was measuring only single-threaded work:
![Screen Shot 2020-03-21 at 11 31 13 AM](https://user-images.githubusercontent.com/1582097/77230027-b7f03e00-6b67-11ea-9a68-afa68a2be7de.png)
We learned after asking on the google/pprof
repo (they replied very promptly, which is wonderful! ☺️) that you can enable relative percentages via -relative_percentages
, and then paths you ignore in the Web UI (or through -ignore
) will not be counted when computing percentages for CPU usage!
https://github.com/google/pprof/issues/516#issuecomment-616162459
What this means for us:
- I think we should probably just always set
-relative_percentages
when spawning the UI, maybe with an option to not do that. But it seems to me like people would basically always want this? - We could consider an option where we automatically filter out nodes like these
__psynch_cvwait
when opening PProf :)
CC: @cscherrer
I am in favour for doing relative percentages!
:) Cool! I just added a flag and verified that it works! :) Will push up now