mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
The lots-of-regions tests in the MemoryMap test case were very time-consuming, particularly in debug mode. MemoryMap.MapRunningChild took as long as 15 seconds on-device (Nexus 5X), and the best result was in the neighborhood of 7 seconds. The bulk of the time spent in these tests was in ExpectMappings(), which calls MemoryMap::FindMapping() in a loop to verify each region. Each call to FindMapping() traverses the MemoryMap (internally, currently just a std::vector<>) from the beginning. With the need to verify 4,096 regions, a single call to ExpectMappings() had to perform over 8,000,000 checks to find the regions it needed. In turn, ExpectMappings() is called once by the SelfLargeMapFile test, and eight times by MapRunningChild. By reducing the number of regions to 1,024, each call to ExpectMappings() needs to perform “only” fewer than 600,000 checks. After this change, MemoryMap.MapRunningChild completes in about a half a second on-device. https://crashpad.chromium.org/bug/181 is concerned with implementing a RangeMap to serve MemoryMap and other similar code. After that’s done, it, it should be feasible to raise the number of regions used for these tests again. Bug: crashpad:30, crashpad:181 Test: crashpad_util_test MemoryMap.SelfLargeMapFile:MemoryMap.MapRunningChild Change-Id: I8ff88dac72a63c97ac937304b578fbe3b4ebf316 Reviewed-on: https://chromium-review.googlesource.com/494128 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Crashpad
Crashpad is a crash-reporting system.
Documentation
- Project status
- Developing Crashpad: instructions for getting the source code, building, testing, and contributing to the project.
- Crashpad interface documentation
- Crashpad tool man pages
- Crashpad overview design
Source Code
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.
Other Links
- Bugs can be reported at the Crashpad issue tracker.
- The Crashpad Buildbot performs automated builds and tests.
- crashpad-dev is the Crashpad developers’ mailing list.
Description
Languages
C++
92.5%
Objective-C++
2.5%
C
2%
Python
1.8%
Assembly
0.9%
Other
0.3%