Title: [97204] trunk/Source/WebCore
- Revision
- 97204
- Author
- [email protected]
- Date
- 2011-10-11 17:41:06 -0700 (Tue, 11 Oct 2011)
Log Message
[chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes.
https://bugs.webkit.org/show_bug.cgi?id=69589
Reviewed by Dirk Pranke.
When building with `make -j40`, all the binding rules are built en bloc. Since this script currently
uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of
255 by default, so the build used to fail with
"open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60"
As a fix, use execvp() instead, which replaces the current process instead of spawning a new one.
* WebCore.gyp/scripts/rule_binding.py:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (97203 => 97204)
--- trunk/Source/WebCore/ChangeLog 2011-10-12 00:24:12 UTC (rev 97203)
+++ trunk/Source/WebCore/ChangeLog 2011-10-12 00:41:06 UTC (rev 97204)
@@ -1,3 +1,18 @@
+2011-10-11 Nico Weber <[email protected]>
+
+ [chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes.
+ https://bugs.webkit.org/show_bug.cgi?id=69589
+
+ Reviewed by Dirk Pranke.
+
+ When building with `make -j40`, all the binding rules are built en bloc. Since this script currently
+ uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of
+ 255 by default, so the build used to fail with
+ "open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60"
+ As a fix, use execvp() instead, which replaces the current process instead of spawning a new one.
+
+ * WebCore.gyp/scripts/rule_binding.py:
+
2011-10-11 Fady Samuel <[email protected]>
Towards making PopupMenuClient more testable
Modified: trunk/Source/WebCore/WebCore.gyp/scripts/rule_binding.py (97203 => 97204)
--- trunk/Source/WebCore/WebCore.gyp/scripts/rule_binding.py 2011-10-12 00:24:12 UTC (rev 97203)
+++ trunk/Source/WebCore/WebCore.gyp/scripts/rule_binding.py 2011-10-12 00:41:06 UTC (rev 97204)
@@ -124,8 +124,13 @@
command.extend(['--outputHeadersDir', hdir])
command.extend(['--outputDir', cppdir, input])
- # Do it. check_call is new in 2.5, so simulate its behavior with call and
- # assert.
+ # Do it. Use os.execvp() to save a child process on posix. On win32,
+ # execvp() does't do the escaping of spaces that subprocess.call() does,
+ # so use subprocess.call() on win32.
+ if sys.platform != 'win32':
+ os.execvp('perl', command) # Does not return.
+
+ # check_call is new in 2.5, so simulate its behavior with call and assert.
returnCode = subprocess.call(command)
assert returnCode == 0
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes