pprof on MacOS can't find dot?
rkube opened this issue · 3 comments
Hi,
I've just installed pprof on MacOS 14.0 through go install github.com/google/pprof@latest
. When I try to look
to look at a profiling data with the command below I get an error.
$ pprof -http=":" alloc-profile.pb.gz
Main binary filename not available.
Serving web UI on http://localhost:50980
Error: <stdin>: syntax error in line 36 scanning a quoted string (missing endquote? longer than 16384?)
String starting:"evalrule(::AdjointSensitivityIntegrand{ComponentVector{Float64, Vector{Float64},
Failed to execute dot. Is Graphviz installed?
exit status 1
I have graphviz
installed through homebrew and the dot
binary is available on my system:
$ which dot
/opt/homebrew/bin/dot
When I request a dot
output from pprof
it works fine:
$ pprof -dot alloc-profile.pb.gz | head -n 2
Main binary filename not available.
digraph "unnamed" {
node [style=filled fillcolor="#f8f8f8"]
[...]
How can I get pprof
output in my browser?
I think the first error is about dot failing to parse the file, not about dot not found.
I also think your second command doesn't run dot, it only generated a text dot file. Try "-svg".
@rkube Basically, I think most likely an invalid dot file was produced for this profile. Maybe lack of escaping of some weird character in the function name. Can you share the profile?
Thanks. I think it was a user error.