[PATCH] D74696: [scudo][standalone] Shift some data from dynamic to static

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 16 15:30:42 PST 2020


cryptoad created this revision.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.

Most of our larger data is dynamically allocated (via `map`) but it
became an hindrance with regard to init time, for a cost to benefit
ratio that is not great. So change the `TSD`s, `RegionInfo`, `ByteMap`
to be static.

Additionally, for reclaiming, we used mapped & unmapped a buffer each
time, which is costly. It turns out that we can have a static buffer,
and that there isn't much contention on it.

One of the other things changed here, is that we hard set the number
of TSDs on Android to the maximum number, as there could be a
situation where cores are put to sleep and we could miss some.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74696

Files:
  compiler-rt/lib/scudo/standalone/CMakeLists.txt
  compiler-rt/lib/scudo/standalone/bytemap.h
  compiler-rt/lib/scudo/standalone/primary64.h
  compiler-rt/lib/scudo/standalone/release.cpp
  compiler-rt/lib/scudo/standalone/release.h
  compiler-rt/lib/scudo/standalone/tsd_exclusive.h
  compiler-rt/lib/scudo/standalone/tsd_shared.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74696.244901.patch
Type: text/x-patch
Size: 9010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200216/4e913b75/attachment.bin>


More information about the llvm-commits mailing list