Re: [pgsql-patches] Patch to avoid gprofprofilingoverwrites - Mailing list pgsql-patches

From
Subject Re: [pgsql-patches] Patch to avoid gprofprofilingoverwrites
Date
Msg-id 1170339593.6941.122.camel@sakai.localdomain
Whole thread Raw
In response to Re: [pgsql-patches] Patch to avoid gprof profilingoverwrites  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
> Right - but LINUX_PROFILE was added to correct Linux specific oddities 
> with the time counter accumulation, whereas your patch is not Linux 
> specific at all. So I think a more representative symbol is required.

Yeah, that was my problem with the patch too.  The issue that it's
addressing isn't Linux-specific in the least.

Is there a way to detect via #if that profiling is enabled?  I wouldn't
expect a really portable answer, but maybe there's something that works
for gcc?

You're right - I hadn't really looked beyond the problem that I was trying to solve.

The technique should work for gprof on other platforms, but, as you point out, LINUX_PROFILE is unique to Linux (no, I hadn't noticed that, but it seems pretty obvious in retrospect).

I like Neil's idea of a using --enable-profiling configure flag.  Every time I need to profile, I have to go search the archives for 'gprof' - it would be nice to see --enable-profiling when I configure --help.


            -- Korry

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [pgsql-patches] Patch to avoid gprof profilingoverwrites
Next
From: Tom Lane
Date:
Subject: Re: [pgsql-patches] Patch to avoid gprof profilingoverwrites