Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-02-01 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Neil Conway wrote: >> What about a "--enable-gprof" (or "--enable-profiling"?) configure >> flag? This could add the appropriate compiler flags to CFLAGS, enable >> LINUX_PROFILE if on Linux, and enable the "gprof/pid" mkdir(). > That would really onl

Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-02-01 Thread Peter Eisentraut
Neil Conway wrote: > What about a "--enable-gprof" (or "--enable-profiling"?) configure > flag? This could add the appropriate compiler flags to CFLAGS, enable > LINUX_PROFILE if on Linux, and enable the "gprof/pid" mkdir(). That would really only work for GCC, wouldn't it? -- Peter Eisentraut h

Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-01-31 Thread Neil Conway
On Thu, 2007-02-01 at 00:59 -0500, Tom Lane wrote: > 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? What about a "--enable-gprof" (or "--enable-profiling"?) configure flag? This could add

Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-01-31 Thread Tom Lane
Mark Kirkwood <[EMAIL PROTECTED]> writes: > 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 patc

Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-01-31 Thread Mark Kirkwood
Mark Kirkwood wrote: [EMAIL PROTECTED] wrote: The name for the define variable could perhaps be better - feels silly adding -DLINUX_PROFILE on Freebsd! (maybe just PROFILE or GPROF_PROFILE?). That wasn't my choice, there is other code elsewhere that depends on that symbol, I just added a lit

Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-01-31 Thread Mark Kirkwood
[EMAIL PROTECTED] wrote: The name for the define variable could perhaps be better - feels silly adding -DLINUX_PROFILE on Freebsd! (maybe just PROFILE or GPROF_PROFILE?). That wasn't my choice, there is other code elsewhere that depends on that symbol, I just added a little bit more. Right

Re: [PATCHES] [pgsql-patches] Patch to avoid gprof profilingoverwrites

2007-01-31 Thread korryd
> Nice addition - tested on FreeBSD 6.2, works great! Cool - thanks for the quick feedback. > The name for the define variable could perhaps be better - feels silly > adding -DLINUX_PROFILE on Freebsd! (maybe just PROFILE or GPROF_PROFILE?). That wasn't my choice, there is other code elsewh