2

The have tried to take a pprof dump of a part of our server code that we are trying to optimize. I'm not using the net/http/pprof, rather relying on runtime/pprof. My whole setup works correctly and I'm able to use the pprof dump on the server machine.

However when I scp the pprof dump to my local machine - in order to use web since I don't want to install graphviz on my servers, pprof starts showing me this warning:

Local symbolization failed for contacts: open /home/deploy/amigo/bin/contacts: no such file or directory
Some binary filenames not available. Symbolization may be incomplete.
Try setting PPROF_BINARY_PATH to the search path for local binaries.
File: contacts
Type: cpu
Time: May 8, 2019 at 3:27pm (IST)
Duration: 1.06s, Total samples = 1.07s (101.25%)
Entering interactive mode (type "help" for commands, "o" for options)

I copied the original bin from the server and try setting the PPROF_BINARY_PATH. But it still doesn't help. What am I doing wrong here?

Ishan Khare
  • 1,745
  • 4
  • 28
  • 59
  • If you are using `go tool pprof`, the flag `source_path` might help. Have you tried setting this? – Frank Bryce May 08 '19 at 14:31
  • 1
    @FrankBryce I noticed just setting the binary path didn't help and pprof seemed to try to get the source code from the same path too in order to show line-by-line cpu usage etc. I was able to get around this by setting up a temp docker container with the code and binaries mounted at the correct places (source code at the same path which was set when pprof dump was generated). I will update with a detailed solution soon. – Ishan Khare Sep 09 '19 at 09:24
  • That's great to hear. Looking forward to the details answer! – Frank Bryce Sep 30 '19 at 02:55

0 Answers0