pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Building postmaster with Profiling Support WAS "Tweaking a C
3+ messages / 3 participants
[nested] [flat]
* Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote"
@ 2005-04-07 15:21 Mohan, Ross <RMohan@arbinet.com>
2005-03-07 22:26 ` Re: Building postmaster with Profiling Support WAS "Tweaking a C Adam Palmblad <adam@aers.ca>
2005-04-07 15:57 ` Re: Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote" Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 3+ messages in thread
From: Mohan, Ross @ 2005-04-07 15:21 UTC (permalink / raw)
To: pgsql-performance
Adam -
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.
Thanks
-Ross
-----Original Message-----
From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Adam Palmblad
Sent: Wednesday, April 06, 2005 7:23 PM
To: pgsql-performance@postgresql.org
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?
-Adam
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Building postmaster with Profiling Support WAS "Tweaking a C
2005-04-07 15:21 Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote" Mohan, Ross <RMohan@arbinet.com>
@ 2005-03-07 22:26 ` Adam Palmblad <adam@aers.ca>
1 sibling, 0 replies; 3+ messages in thread
From: Adam Palmblad @ 2005-03-07 22:26 UTC (permalink / raw)
To: Mohan, Ross <RMohan@arbinet.com>; +Cc: pgsql-performance
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.
-Adam
Mohan, Ross wrote:
>Adam -
>
>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.
>
>Thanks
>
>-Ross
>
>-----Original Message-----
>From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Adam Palmblad
>Sent: Wednesday, April 06, 2005 7:23 PM
>To: pgsql-performance@postgresql.org
>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?
>
>-Adam
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote"
2005-04-07 15:21 Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote" Mohan, Ross <RMohan@arbinet.com>
@ 2005-04-07 15:57 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2005-04-07 15:57 UTC (permalink / raw)
To: Mohan, Ross <RMohan@arbinet.com>; +Cc: pgsql-performance
"Mohan, Ross" <RMohan@arbinet.com> writes:
> Is compiling postmaster with profiling support just a flag
> in the build/make? Or is there something more involved?
cd .../src/backend
make PROFILE="-pg -DLINUX_PROFILE" all
reinstall binary
You don't need -DLINUX_PROFILE if not on Linux, of course.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-04-07 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-07 15:21 Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote" Mohan, Ross <RMohan@arbinet.com>
2005-03-07 22:26 ` Adam Palmblad <adam@aers.ca>
2005-04-07 15:57 ` Re: Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote" Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox