summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-04-27 08:23:02 +0000
committerDmitry Vyukov <dvyukov@google.com>2016-04-27 08:23:02 +0000
commitd87c7b321af8790cb41cc105331a08fba4975a27 (patch)
treea344470912bca00c9f536fbf5efb62632642c2fd /lldb/packages/Python/lldbsuite/test/lang/cpp
parent4ba78a46ff760b254d4853e676e12ce35b4f65ac (diff)
downloadbcm5719-llvm-d87c7b321af8790cb41cc105331a08fba4975a27.tar.gz
bcm5719-llvm-d87c7b321af8790cb41cc105331a08fba4975a27.zip
tsan: split thread into logical and physical state
This is reincarnation of http://reviews.llvm.org/D17648 with the bug fix pointed out by Adhemerval (zatrazz). Currently ThreadState holds both logical state (required for race-detection algorithm, user-visible) and physical state (various caches, most notably malloc cache). Move physical state in a new Process entity. Besides just being the right thing from abstraction point of view, this solves several problems: Cache everything on P level in Go. Currently we cache on a mix of goroutine and OS thread levels. This unnecessary increases memory consumption. Properly handle free operations in Go. Frees are issue by GC which don't have goroutine context. As the result we could not do anything more than just clearing shadow. For example, we leaked sync objects and heap block descriptors. This will allow to get rid of libc malloc in Go (now we have Processor context for internal allocator cache). This in turn will allow to get rid of dependency on libc entirely. Potentially we can make Processor per-CPU in C++ mode instead of per-thread, which will reduce resource consumption. The distinction between Thread and Processor is currently used only by Go, C++ creates Processor per OS thread, which is equivalent to the current scheme. llvm-svn: 267678
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud