Lower msvc build verbosity level

Started by Christian Ullrichalmost 10 years ago8 messages
#1Christian Ullrich
chris@chrullrich.net
1 attachment(s)

Hello,

could we perhaps lower the verbosity level of the msvc build (in
src/tools/msvc/build.pl) from "detailed" to "normal"? In my experiment,
this reduces the size of the build log by 96.4 percent (from 12.5 MiB to
438 KiB), or if the log is not redirected, it shortens the build time by
45 percent, from just under 6 minutes to 3.

The lines that would not be logged anymore are mostly "Task [or Target]
so-and-so skipped, due to false condition". All the compiler, linker,
etc. command lines are still there.

Also, with the "detailed" logs, loading the buildfarm status page for a
failure in the Make stage is really painful.

--
Christian

Attachments:

msvc-verbosity.patchtext/plain; charset=UTF-8; name=msvc-verbosity.patchDownload
diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl
new file mode 100644
index e107d41..c4e4dc7
*** a/src/tools/msvc/build.pl
--- b/src/tools/msvc/build.pl
*************** elsif (uc($ARGV[0]) ne "RELEASE")
*** 53,59 ****
  if ($buildwhat and $vcver >= 10.00)
  {
  	system(
! "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf");
  }
  elsif ($buildwhat)
  {
--- 53,59 ----
  if ($buildwhat and $vcver >= 10.00)
  {
  	system(
! "msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf");
  }
  elsif ($buildwhat)
  {
*************** elsif ($buildwhat)
*** 61,67 ****
  }
  else
  {
! 	system("msbuild pgsql.sln /verbosity:detailed /p:Configuration=$bconf");
  }
  
  # report status
--- 61,67 ----
  }
  else
  {
! 	system("msbuild pgsql.sln /verbosity:normal /p:Configuration=$bconf");
  }
  
  # report status
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Christian Ullrich (#1)
Re: Lower msvc build verbosity level

On 04/08/2016 06:19 AM, Christian Ullrich wrote:

Hello,

could we perhaps lower the verbosity level of the msvc build (in
src/tools/msvc/build.pl) from "detailed" to "normal"? In my
experiment, this reduces the size of the build log by 96.4 percent
(from 12.5 MiB to 438 KiB), or if the log is not redirected, it
shortens the build time by 45 percent, from just under 6 minutes to 3.

The lines that would not be logged anymore are mostly "Task [or
Target] so-and-so skipped, due to false condition". All the compiler,
linker, etc. command lines are still there.

Also, with the "detailed" logs, loading the buildfarm status page for
a failure in the Make stage is really painful.

Yes! I was just wondering yesterday how to do this. If nobody objects
I'm going to apply and backpatch this quite soon. This will also have
beneficial effects on the buildfarm server.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Magnus Hagander
magnus@hagander.net
In reply to: Andrew Dunstan (#2)
Re: Lower msvc build verbosity level

On Fri, Apr 8, 2016 at 2:25 PM, Andrew Dunstan <andrew@dunslane.net> wrote:

On 04/08/2016 06:19 AM, Christian Ullrich wrote:

Hello,

could we perhaps lower the verbosity level of the msvc build (in
src/tools/msvc/build.pl) from "detailed" to "normal"? In my experiment,
this reduces the size of the build log by 96.4 percent (from 12.5 MiB to
438 KiB), or if the log is not redirected, it shortens the build time by 45
percent, from just under 6 minutes to 3.

The lines that would not be logged anymore are mostly "Task [or Target]
so-and-so skipped, due to false condition". All the compiler, linker, etc.
command lines are still there.

Also, with the "detailed" logs, loading the buildfarm status page for a
failure in the Make stage is really painful.

Yes! I was just wondering yesterday how to do this. If nobody objects I'm
going to apply and backpatch this quite soon. This will also have
beneficial effects on the buildfarm server.

+1 for doing that. It seems easy enough to manually turn it on if it turns
out to be necessary to debug some specific issue in the future.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

#4Michael Paquier
michael.paquier@gmail.com
In reply to: Magnus Hagander (#3)
Re: Lower msvc build verbosity level

On Fri, Apr 8, 2016 at 9:29 PM, Magnus Hagander <magnus@hagander.net> wrote:

On Fri, Apr 8, 2016 at 2:25 PM, Andrew Dunstan <andrew@dunslane.net> wrote:

On 04/08/2016 06:19 AM, Christian Ullrich wrote:

could we perhaps lower the verbosity level of the msvc build (in
src/tools/msvc/build.pl) from "detailed" to "normal"? In my experiment, this
reduces the size of the build log by 96.4 percent (from 12.5 MiB to 438
KiB), or if the log is not redirected, it shortens the build time by 45
percent, from just under 6 minutes to 3.

The lines that would not be logged anymore are mostly "Task [or Target]
so-and-so skipped, due to false condition". All the compiler, linker, etc.
command lines are still there.

Also, with the "detailed" logs, loading the buildfarm status page for a
failure in the Make stage is really painful.

Yes! I was just wondering yesterday how to do this. If nobody objects I'm
going to apply and backpatch this quite soon. This will also have beneficial
effects on the buildfarm server.

+1 for doing that. It seems easy enough to manually turn it on if it turns
out to be necessary to debug some specific issue in the future.

Please, yes. The current output is too verbose.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Paquier (#4)
Re: Lower msvc build verbosity level

Michael Paquier <michael.paquier@gmail.com> writes:

On Fri, Apr 8, 2016 at 9:29 PM, Magnus Hagander <magnus@hagander.net> wrote:

On Fri, Apr 8, 2016 at 2:25 PM, Andrew Dunstan <andrew@dunslane.net> wrote:

could we perhaps lower the verbosity level of the msvc build (in
src/tools/msvc/build.pl) from "detailed" to "normal"?

+1 for doing that. It seems easy enough to manually turn it on if it turns
out to be necessary to debug some specific issue in the future.

Please, yes. The current output is too verbose.

+several. Grepping for compiler warnings, for example, is really painful
right now on any MSVC critter. I've resorted to grepping for "warning C",
which skips the noise messages, but I'm never sure if I'm missing
something.

(If anyone knows how to shut up clang's useless "N warnings generated"
messages, on longfin for example, I'd be for changing that too.)

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Christian Ullrich
chris@chrullrich.net
In reply to: Tom Lane (#5)
Re: Lower msvc build verbosity level

* Tom Lane wrote:

+several. Grepping for compiler warnings, for example, is really painful
right now on any MSVC critter. I've resorted to grepping for "warning C",
which skips the noise messages, but I'm never sure if I'm missing
something.

You miss all diagnostics from other tools than the compiler, for one thing.

There is a simple solution to that, however. MSBuild and VCBuild repeat
all warnings and errors produced during the build at the bottom of the
log. I just checked on mastodon (VS 2005, the oldest), and it does that
already.

This depends on the whole build being done using a single solution file
that contains all the individual projects, but there is no reason to
assume we will start building individual projects instead, I assume.

--
Christian

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7Andrew Dunstan
andrew@dunslane.net
In reply to: Christian Ullrich (#6)
Re: Lower msvc build verbosity level

On 04/08/2016 12:24 PM, Christian Ullrich wrote:

* Tom Lane wrote:

+several. Grepping for compiler warnings, for example, is really
painful
right now on any MSVC critter. I've resorted to grepping for
"warning C",
which skips the noise messages, but I'm never sure if I'm missing
something.

You miss all diagnostics from other tools than the compiler, for one
thing.

There is a simple solution to that, however. MSBuild and VCBuild
repeat all warnings and errors produced during the build at the bottom
of the log. I just checked on mastodon (VS 2005, the oldest), and it
does that already.

This depends on the whole build being done using a single solution
file that contains all the individual projects, but there is no reason
to assume we will start building individual projects instead, I assume.

Yeah, what is more on the whole this is going to be far more beneficial,
because stuff just gets lost badly in the noise. I have committed the
change.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#8Michael Paquier
michael.paquier@gmail.com
In reply to: Andrew Dunstan (#7)
Re: Lower msvc build verbosity level

On Sat, Apr 9, 2016 at 1:47 AM, Andrew Dunstan <andrew@dunslane.net> wrote:

On 04/08/2016 12:24 PM, Christian Ullrich wrote:

* Tom Lane wrote:

+several. Grepping for compiler warnings, for example, is really painful
right now on any MSVC critter. I've resorted to grepping for "warning
C",
which skips the noise messages, but I'm never sure if I'm missing
something.

You miss all diagnostics from other tools than the compiler, for one
thing.

There is a simple solution to that, however. MSBuild and VCBuild repeat
all warnings and errors produced during the build at the bottom of the log.
I just checked on mastodon (VS 2005, the oldest), and it does that already.

This depends on the whole build being done using a single solution file
that contains all the individual projects, but there is no reason to assume
we will start building individual projects instead, I assume.

Yeah, what is more on the whole this is going to be far more beneficial,
because stuff just gets lost badly in the noise. I have committed the
change.

Thanks a lot! This is making my day, and I suspect many others are to come.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers