The recompile was done by the sysadmin, but I believe the flags are -pg
-DLINUX_PROFILING for profiling, and -g for debug symbols.
This leaves gmon.out files around, which you can then do a "gprof
/usr/bin/postmaster gmon.out" to see whats going on.
My problem is that this gives me data on what functions are being called
with respect to the postmaster binary, but I don't know
which of my functions - in my shared library - in my C procedure are
taking the most time.
Mohan, Ross wrote:
>Is compiling postmaster with profiling support just a flag
>in the build/make? Or is there something more involved?
>I'd like to be able to do this in the future and so am
>curious about means/methods.
>If this is a RTFM, just let me know that (am currently
>Reading The F Manual), but if you have any "special sauce"
>here, that'd be of great interest.
>From: [mailto:] On Behalf Of Adam
>Sent: Wednesday, April 06, 2005 7:23 PM
>Subject: [PERFORM] Tweaking a C Function I wrote
>I wanted to see if I could squeeze any more performance out of a C set
>returning function I wrote. As such, I looked to a profiler. Is it
>possible to get profile information on the function I wrote? I've got
>postmaster and my function compiled with profiling support, and can find
>the gmon.out files... can I actually look at the call tree that occurs
>when my function is being executed or will I be limited to viewing calls
>to functions in the postmaster binary?
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to so that your
> message can get through to the mailing list cleanly