Bug 914563 - re-enable build resource recording on Windows; r=gps

This commit is contained in:
Mike Shal 2014-07-15 13:59:10 -04:00
Родитель 7099264c72
Коммит 74972b4fdc
2 изменённых файлов: 12 добавлений и 18 удалений

24
mach
Просмотреть файл

@ -71,17 +71,17 @@ if __name__ == '__main__':
# This is a complete hack to work around the fact that Windows
# multiprocessing needs to import the original module (ie: this
# file), but only works if it has a .py extension.
#
# We do this by a sort of two-level function interposing. The first
# level interposes forking.get_command_line() with our version defined
# in my_get_command_line(). Our version of get_command_line will
# replace the command string with the contents of the fork_interpose()
# function to be used in the subprocess.
#
# The subprocess then gets an interposed imp.find_module(), which we
# hack up to find 'mach' without the .py extension, since we already
# know where it is (it's us!). If we're not looking for 'mach', then
# the original find_module will suffice.
#
# We do this by a sort of two-level function interposing. The first
# level interposes forking.get_command_line() with our version defined
# in my_get_command_line(). Our version of get_command_line will
# replace the command string with the contents of the fork_interpose()
# function to be used in the subprocess.
#
# The subprocess then gets an interposed imp.find_module(), which we
# hack up to find 'mach' without the .py extension, since we already
# know where it is (it's us!). If we're not looking for 'mach', then
# the original find_module will suffice.
#
# See also: http://bugs.python.org/issue19946
# And: https://bugzilla.mozilla.org/show_bug.cgi?id=914563
@ -106,7 +106,7 @@ if __name__ == '__main__':
def my_get_command_line():
fork_code, lineno = inspect.getsourcelines(fork_interpose)
# Remove the first line (for 'def fork_interpose():') and the three
# levels of indentation (12 spaces).
# levels of indentation (12 spaces).
fork_string = ''.join(x[12:] for x in fork_code[1:])
cmdline = orig_command_line()
cmdline[2] = fork_string

Просмотреть файл

@ -181,12 +181,6 @@ class BuildMonitor(MozbuildObject):
def start_resource_recording(self):
# This should be merged into start() once bug 892342 lands.
# Resource monitoring on Windows is currently busted because of
# multiprocessing issues. Bug 914563.
if self._is_windows():
return
self.resources.start()
self._resources_started = True