I'm attempting to profile Postgres with gprof. A gmon.out file successfully gets created in both the data directory and in the working directory where I launched the client (pgbench) process from.

These files include the numbers of calls made to each function, but no times (It says 0.00 for all of them and warns "no time accumulated" at the top of the readable output). Furthermore, no data/gprof folder gets created (it is supposed to make a gprof directory filled with directories for each server process, and gmon.out results for each).

I have tested gprof using these instructions (http://www.thegeekstuff.com/2012/08/gprof-tutorial/) and it works fine. My installation of postgres also seems to work fine otherwise.

The postgres mailing lists have this one question on the subject: http://www.postgresql.org/message-id/[email protected] Unfortunately this problem is not quite the same as mine; this user has output in the gprof folder and may not be compiling with gcc.

I've also tried modifying the permissions for most things, with no change. Why isn't gprof working?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.