[scudo] Scudo thread specific data refactor, part 3
authorKostya Kortchinsky <kostyak@google.com>
Tue, 26 Sep 2017 17:20:02 +0000 (17:20 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Tue, 26 Sep 2017 17:20:02 +0000 (17:20 +0000)
commitb59abb2590898d1325f1b67b6ea2f75a1bfbd78c
tree24744bbdb1fb7bf6680ec4498b70a53e46d3ab7e
parentbab95c70874e3890dfac0fb03246aa1fb88f9506
[scudo] Scudo thread specific data refactor, part 3

Summary:
Previous parts: D38139, D38183.

In this part of the refactor, we abstract the Linux vs Android TSD dissociation
in favor of a Exclusive vs Shared one, allowing for easier platform introduction
and configuration.

Most of this change consist of shuffling the files around to reflect the new
organization.

We introduce `scudo_platform.h` where platform specific definition lie. This
involves the TSD model and the platform specific allocator parameters. In an
upcoming CL, those will be configurable via defines, but we currently stick
with conservative defaults.

Reviewers: alekseyshl, dvyukov

Reviewed By: alekseyshl, dvyukov

Subscribers: srhines, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D38244

llvm-svn: 314224
compiler-rt/lib/scudo/CMakeLists.txt
compiler-rt/lib/scudo/scudo_allocator.cpp
compiler-rt/lib/scudo/scudo_allocator.h
compiler-rt/lib/scudo/scudo_platform.h [new file with mode: 0644]
compiler-rt/lib/scudo/scudo_tsd.h [moved from compiler-rt/lib/scudo/scudo_tls.h with 78% similarity]
compiler-rt/lib/scudo/scudo_tsd_exclusive.cpp [moved from compiler-rt/lib/scudo/scudo_tls_linux.cpp with 86% similarity]
compiler-rt/lib/scudo/scudo_tsd_exclusive.inc [moved from compiler-rt/lib/scudo/scudo_tls_linux.inc with 73% similarity]
compiler-rt/lib/scudo/scudo_tsd_shared.cpp [moved from compiler-rt/lib/scudo/scudo_tls_android.cpp with 90% similarity]
compiler-rt/lib/scudo/scudo_tsd_shared.inc [moved from compiler-rt/lib/scudo/scudo_tls_android.inc with 72% similarity]