commit | 6e946c4af851722b9d444af89590d65cd2c3ec38 | [log] [tgz] |
---|---|---|
author | Justin Cohen <[email protected]> | Thu Jun 23 03:12:41 2022 +0000 |
committer | Crashpad LUCI CQ <[email protected]> | Thu Jun 23 12:08:23 2022 +0000 |
tree | 1caab394e9273c6b467eb9af2f4247747597a4cb | |
parent | 23cefd04177be4020c00edc681d1765b76e2cd0b [diff] |
Revert "posix: Replace DoubleForkAndExec() with ForkAndSpawn()" This reverts commit 460943dd9a71dc76f68182a8ede766d5543e5341. Reason for revert: This fails to compile in Chromium Android. posix_spawn and posix_spawnp are available in Android NDK 28, but Chromium is building with version 23. https://ci.chromium.org/ui/p/chromium/builders/try/android_compile_dbg/1179765/overview Original change's description: > posix: Replace DoubleForkAndExec() with ForkAndSpawn() > > The DoubleForkAndExec() function was taking over 622 milliseconds to run > on macOS 11 (BigSur) on Intel i5-1038NG7. I did some debugging by adding > some custom traces and found that the fork() syscall is the bottleneck > here, i.e., the first fork() takes around 359 milliseconds and the > nested fork() takes around 263 milliseconds. Replacing the nested fork() > and exec() with posix_spawn() reduces the time consumption to 257 > milliseconds! > > See https://github.com/libuv/libuv/pull/3064 to know why fork() is so > slow on macOS and why posix_spawn() is a better replacement. > > Another point to note is that even base::LaunchProcess() from Chromium > calls posix_spawnp() on macOS - > https://source.chromium.org/chromium/chromium/src/+/8f8d82dea0fa8f11f57c74dbb65126f8daba58f7:base/process/launch_mac.cc;l=295-296 > > Change-Id: I25c6ee9629a1ae5d0c32b361b56a1ce0b4b0fd26 > Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386 > Reviewed-by: Mark Mentovai <[email protected]> > Commit-Queue: Mark Mentovai <[email protected]> Change-Id: I7f6161bc4734c50308438cdde1e193023ee9bfb8 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3719439 Reviewed-by: Mark Mentovai <[email protected]> Commit-Queue: Justin Cohen <[email protected]>
Crashpad is a crash-reporting system.
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.