pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Subject: Re: Adding CI to our tree
Date: Wed, 9 Mar 2022 11:47:23 -0600
Message-ID: <20220309174723.GA28503@telsasoft.com> (raw)
In-Reply-To: <20220302205058.GJ15744@telsasoft.com>
References: <20220213214213.GS31460@telsasoft.com>
	<20220213220709.vjz5rziuhfdpqxrg@alap3.anarazel.de>
	<20220226025116.GJ9008@telsasoft.com>
	<20220227010908.vz2a7dmfzgwg742w@alap3.anarazel.de>
	<20220227024352.GC25269@telsasoft.com>
	<20220227025000.mjmfimls5gnz7em7@alap3.anarazel.de>
	<20220227031057.GD25269@telsasoft.com>
	<20220227040838.3z4gqihimyerxe3h@alap3.anarazel.de>
	<20220228205802.GE25269@telsasoft.com>
	<20220302205058.GJ15744@telsasoft.com>

I'm curious what you think of this patch.

It makes check-world on freebsd over 30% faster - saving 5min.

Apparently gcc -Og was added in gcc 4.8 (c. 2013).

On Wed, Mar 02, 2022 at 02:50:58PM -0600, Justin Pryzby wrote:
> From d180953d273c221a30c5e9ad8d74b1b4dfc60bd1 Mon Sep 17 00:00:00 2001
> From: Justin Pryzby <pryzbyj@telsasoft.com>
> Date: Sun, 27 Feb 2022 15:17:50 -0600
> Subject: [PATCH 7/7] cirrus: compile with -Og..
> 
> To improve performance of check-world, and improve debugging, without
> significantly slower builds (they're cached anyway).
> 
> This makes freebsd check-world run in 8.5 minutes rather than 15 minutes.
> ---
>  .cirrus.yml                      | 12 +++++++-----
>  src/tools/msvc/MSBuildProject.pm |  4 ++--
>  2 files changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/.cirrus.yml b/.cirrus.yml
> index 6f05d420c85..8b673bf58cf 100644
> --- a/.cirrus.yml
> +++ b/.cirrus.yml
> @@ -113,7 +113,7 @@ task:
>          \
>          CC="ccache cc" \
>          CXX="ccache c++" \
> -        CFLAGS="-O0 -ggdb"
> +        CFLAGS="-Og -ggdb"
>      EOF
>    build_script: su postgres -c "gmake -s -j${BUILD_JOBS} world-bin"
>    upload_caches: ccache
> @@ -208,8 +208,8 @@ task:
>          CC="ccache gcc" \
>          CXX="ccache g++" \
>          CLANG="ccache clang" \
> -        CFLAGS="-O0 -ggdb" \
> -        CXXFLAGS="-O0 -ggdb"
> +        CFLAGS="-Og -ggdb" \
> +        CXXFLAGS="-Og -ggdb"
>      EOF
>    build_script: su postgres -c "make -s -j${BUILD_JOBS} world-bin"
>    upload_caches: ccache
> @@ -329,8 +329,8 @@ task:
>        CC="ccache cc" \
>        CXX="ccache c++" \
>        CLANG="ccache ${brewpath}/llvm/bin/ccache" \
> -      CFLAGS="-O0 -ggdb" \
> -      CXXFLAGS="-O0 -ggdb" \
> +      CFLAGS="-Og -ggdb" \
> +      CXXFLAGS="-Og -ggdb" \
>        \
>        LLVM_CONFIG=${brewpath}/llvm/bin/llvm-config \
>        PYTHON=python3
> @@ -383,6 +383,8 @@ task:
>      # -fileLoggerParameters1: write to msbuild.warn.log.
>      MSBFLAGS: -m -verbosity:minimal "-consoleLoggerParameters:Summary;ForceNoAlign" /p:TrackFileAccess=false -nologo -fileLoggerParameters1:warningsonly;logfile=msbuild.warn.log
>  
> +    MSBUILD_OPTIMIZE: MaxSpeed
> +
>      # If tests hang forever, cirrus eventually times out. In that case log
>      # output etc is not uploaded, making the problem hard to debug. Of course
>      # tests internally should have shorter timeouts, but that's proven to not
> diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
> index 5e312d232e9..05e0c41eb5c 100644
> --- a/src/tools/msvc/MSBuildProject.pm
> +++ b/src/tools/msvc/MSBuildProject.pm
> @@ -85,7 +85,7 @@ EOF
>  		$f, 'Debug',
>  		{
>  			defs    => "_DEBUG;DEBUG=1",
> -			opt     => 'Disabled',
> +			opt     => $ENV{MSBUILD_OPTIMIZE} || 'Disabled',
>  			strpool => 'false',
>  			runtime => 'MultiThreadedDebugDLL'
>  		});
> @@ -94,7 +94,7 @@ EOF
>  		'Release',
>  		{
>  			defs    => "",
> -			opt     => 'Full',
> +			opt     => $ENV{MSBUILD_OPTIMIZE} || 'Full',
>  			strpool => 'true',
>  			runtime => 'MultiThreadedDLL'
>  		});
> -- 
> 2.17.1
> 





view thread (142+ messages)  latest in thread

Message-ID: <20220309174723.GA28503@telsasoft.com>
Permalink:  ../20220309174723.GA28503@telsasoft.com/
Also on:    postgresql.org/message-id/20220309174723.GA28503@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, andres@anarazel.de, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andrew@dunslane.net, thomas.munro@gmail.com, melanieplageman@gmail.com, peter.eisentraut@enterprisedb.com, daniel@yesql.se
  Subject: Re: Adding CI to our tree
  In-Reply-To: <20220309174723.GA28503@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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