bug 1237619: save resource usage for "what" builds r?gps
This moves monitor start/end recording so it also occurs for "what"
builds rather than only for full builds.
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -320,16 +320,18 @@ class Build(MachCommandBase):
return 1
if directory is not None:
disable_extra_make_dependencies=True
directory = mozpath.normsep(directory)
if directory.startswith('/'):
directory = directory[1:]
+ status = None
+ monitor.start_resource_recording()
if what:
top_make = os.path.join(self.topobjdir, 'Makefile')
if not os.path.exists(top_make):
print('Your tree has not been configured yet. Please run '
'|mach build| with no arguments.')
return 1
# Collect target pairs.
@@ -412,17 +414,16 @@ class Build(MachCommandBase):
# need to run configure. The client.mk invocation below
# will configure, which will run config.status, which will
# invoke |mach artifact install| itself before continuing
# the build. Therefore, we needn't install artifacts
# ourselves.
self.log(logging.DEBUG, 'artifact',
{}, "Not running |mach artifact install| -- it will be run by client.mk.")
- monitor.start_resource_recording()
status = self._run_make(srcdir=True, filename='client.mk',
line_handler=output.on_line, log=False, print_directory=False,
allow_parallel=False, ensure_exit_code=False, num_jobs=jobs,
silent=not verbose)
make_extra = self.mozconfig['make_extra'] or []
make_extra = dict(m.split('=', 1) for m in make_extra)