Bug 1415971 - Stop build output monitor earlier; r?build draft
authorGregory Szorc <gps@mozilla.com>
Thu, 09 Nov 2017 12:12:31 -0800
changeset 695816 e95a81496408cee83e5a23eab6fdd45617e239a5
parent 695755 b9b520b3bad5f843355fb5953d11f022184c84bc
child 695817 f042b6c80e49e19d026cce01a631ea3c39b71302
push id88551
push userbmo:gps@mozilla.com
push dateThu, 09 Nov 2017 21:57:20 +0000
reviewersbuild
bugs1415971
milestone58.0a1
Bug 1415971 - Stop build output monitor earlier; r?build We currently print compiler warnings summary then stop the build output manager, which basically stops resource monitoring. A future commit will refactor this code a bit and it will be easier to have the monitor.stop() call directly after the build finishes. MozReview-Commit-ID: 3uWFWG6ELnH
python/mozbuild/mozbuild/controller/building.py
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -1121,16 +1121,18 @@ class BuildDriver(MozbuildObject):
                         line_handler=output.on_line, log=False, print_directory=False,
                         allow_parallel=False, ensure_exit_code=False, num_jobs=jobs,
                         silent=not verbose, keep_going=keep_going)
 
                 self.log(logging.WARNING, 'warning_summary',
                     {'count': len(monitor.warnings_database)},
                     '{count} compiler warnings present.')
 
+            monitor.finish(record_usage=status == 0)
+
             # Print the collected compiler warnings. This is redundant with
             # inline output from the compiler itself. However, unlike inline
             # output, this list is sorted and grouped by file, making it
             # easier to triage output.
             #
             # Only do this if we had a successful build. If the build failed,
             # there are more important things in the log to look for than
             # whatever code we warned about.
@@ -1178,18 +1180,16 @@ class BuildDriver(MozbuildObject):
                         self.log(logging.WARNING, 'compiler_warning', warning,
                                  'warning: {normpath}:{line} [{flag}] {message}')
 
                 for d, count in sorted(suppressed_by_dir.items()):
                     self.log(logging.WARNING, 'suppressed_warning',
                              {'dir': d, 'count': count},
                              '(suppressed {count} warnings in {dir})')
 
-            monitor.finish(record_usage=status==0)
-
         high_finder, finder_percent = monitor.have_high_finder_usage()
         if high_finder:
             print(FINDER_SLOW_MESSAGE % finder_percent)
 
         ccache_end = monitor.ccache_stats()
 
         ccache_diff = None
         if ccache_start and ccache_end: