JuliaPerf / PProf.jl

Export Julia profiles to the pprof format
MIT License
155 stars 17 forks source link

Option to exclude idle threads #19

Open NHDaly opened 4 years ago

NHDaly commented 4 years ago

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
NHDaly commented 4 years ago

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:

  1. 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?
  2. We could consider an option where we automatically filter out nodes like these __psynch_cvwait when opening PProf :)

CC: @cscherrer

vchuravy commented 4 years ago

I am in favour for doing relative percentages!

NHDaly commented 4 years ago

:) Cool! I just added a flag and verified that it works! :) Will push up now