mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-08 17:11:33 +00:00
Avoid unnecessary calls to vm_region_recurse
Summary: This should significantly improve darwin lsan performance in cases where root regions are not used. Reviewers: alekseyshl, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32966 llvm-svn: 302530
This commit is contained in:
parent
31b37297de
commit
0f3d30960e
@ -144,6 +144,11 @@ void ProcessPlatformSpecificAllocations(Frontier *frontier) {
|
||||
if (info.user_tag == VM_MEMORY_OS_ALLOC_ONCE) {
|
||||
ScanRangeForPointers(address, end_address, frontier, "GLOBAL",
|
||||
kReachable);
|
||||
|
||||
// Recursing over the full memory map is very slow, break out
|
||||
// early if we don't need the full iteration.
|
||||
if (!flags()->use_root_regions || !root_regions->size())
|
||||
break;
|
||||
}
|
||||
|
||||
// This additional root region scan is required on Darwin in order to
|
||||
|
Loading…
Reference in New Issue
Block a user