X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9BE425367C for ; Thu, 7 Apr 2005 22:26:25 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18023-04 for ; Thu, 7 Apr 2005 21:26:17 +0000 (GMT) Received: from castle.comp.uvic.ca (castle.comp.uvic.ca [142.104.5.97]) by svr1.postgresql.org (Postfix) with ESMTP id AB3C953519 for ; Thu, 7 Apr 2005 22:26:15 +0100 (BST) Received: from [127.0.0.1] (bkbox.idc.uvic.ca [142.104.12.33]) by castle.comp.uvic.ca (8.13.2/8.13.2) with ESMTP id j37LQ5ec4124690; Thu, 7 Apr 2005 14:26:13 -0700 Message-ID: <422CD4FC.6080007@aers.ca> Date: Mon, 07 Mar 2005 14:26:04 -0800 From: Adam Palmblad User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Mohan, Ross" Cc: "pgsql-performance@postgresql.org" Subject: Re: Building postmaster with Profiling Support WAS "Tweaking a C References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-UVic-Virus-Scanned: OK - Passed virus scan by Sophos (sophie) on castle X-UVic-Spam-Scan: castle.comp.uvic.ca Not_scanned_LOCAL X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.686 tagged_above=0 required=5 tests=AWL, DATE_IN_PAST_96_XX X-Spam-Level: X-Archive-Number: 200504/171 X-Sequence-Number: 11568 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 > > > >