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
--- 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: