[PATCH] D37590: [scudo] RFC thread specific data refactoring
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 13:30:12 PDT 2017
cryptoad created this revision.
Herald added subscribers: mgorny, srhines.
This is a request for comment, not an actual patch submission.
I would like to get some reviewers feedback on a refactoring of how the thread
specific data is handled in Scudo. The Linux or Android distinction is too
narrow and can't be sensically extanded to other platforms.
The core of the idea is to not make this distinction anymore, but to introduce
a shared TSD model (N caches shared between threads, locking) vs an exclusive
TSD model (1 cache per thread, no locking required). This would allow for easy
platform inclusions, as demonstrated with the addition of Fuchsia here. The
model could ultimately be specified via defines as opposed to be set in stone
for a given platform (eg: we could do shared caches on Linux).
While the code included works, it's merely for demonstration purposes. The
previous organization involved .inc files per platform, which I am not opposed
to do again but felt cumbersome to deal with. I am looking for comments,
suggestions, ideas regarding code organization, naming, so that this refactoring
would make sense to others.
Thanks in advance!
https://reviews.llvm.org/D37590
Files:
lib/scudo/CMakeLists.txt
lib/scudo/scudo_allocator.cpp
lib/scudo/scudo_platform.h
lib/scudo/scudo_tls_android.cpp
lib/scudo/scudo_tls_android.inc
lib/scudo/scudo_tls_context_android.inc
lib/scudo/scudo_tls_context_linux.inc
lib/scudo/scudo_tls_linux.cpp
lib/scudo/scudo_tls_linux.inc
lib/scudo/scudo_tsd.cpp
lib/scudo/scudo_tsd.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37590.114247.patch
Type: text/x-patch
Size: 26531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170907/623e6e64/attachment-0001.bin>
More information about the llvm-commits
mailing list