[PATCH] D35432: Only scan global sections containing data in LSan on darin

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 12:15:43 PDT 2017


fjricci created this revision.

__DATA segments on Darwin contain a large number of separate sections,
most of which cannot actually contain pointers, and contain const values or
objc metadata. Only scanning sections which can contain pointers greatly improves
performance.

On a medium-sized (~4000 files) internal project, I saw a speedup of about 50%
in standalone LSan's execution time (50% improvement in the time spent running
LSan, not the total program time).


https://reviews.llvm.org/D35432

Files:
  lib/lsan/lsan_common_mac.cc
  lib/sanitizer_common/sanitizer_common.cc
  lib/sanitizer_common/sanitizer_common.h
  lib/sanitizer_common/sanitizer_procmaps.h
  lib/sanitizer_common/sanitizer_procmaps_mac.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35432.106688.patch
Type: text/x-patch
Size: 5115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/5304c668/attachment.bin>


More information about the llvm-commits mailing list