summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
Commit message (Collapse)AuthorAgeFilesLines
* tsan: add acquire/release functions to java interfaceDmitry Vyukov2014-12-221-0/+30
| | | | | | they are required to handle synchronization on volatile/final fields llvm-svn: 224697
* [TSan] Use StackTrace from sanitizer_common where applicableAlexey Samsonov2014-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change removes `__tsan::StackTrace` class. There are now three alternatives: # Lightweight `__sanitizer::StackTrace`, which doesn't own a buffer of PCs. It is used in functions that need stack traces in read-only mode, and helps to prevent unnecessary allocations/copies (e.g. for StackTraces fetched from StackDepot). # `__sanitizer::BufferedStackTrace`, which stores buffer of PCs in a constant array. It is used in TraceHeader (non-Go version) # `__tsan::VarSizeStackTrace`, which owns buffer of PCs, dynamically allocated via TSan internal allocator. Test Plan: compiler-rt test suite Reviewers: dvyukov, kcc Reviewed By: kcc Subscribers: llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D6004 llvm-svn: 221194
* tsan: allow memory overlap in __tsan_java_moveDmitry Vyukov2014-07-081-2/+10
| | | | | | JVM actually moves memory between overlapping ranges. llvm-svn: 212560
* tsan: add __tsan_java_finalize interface functionDmitry Vyukov2014-06-271-0/+6
| | | | | | | It is required to prevent false positives between object ctor and finalizer, as otherwise they look completely unsynchronized. llvm-svn: 211829
* tsan: refactor storage of meta information for heap blocks and sync objectsDmitry Vyukov2014-05-291-133/+13
| | | | | | | | | | | | | | | The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists). This solves a number of problems: - eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26) - eliminates contention in SyncTab - eliminates contention in internal allocator during allocation of sync objects - removes a bunch of ad-hoc code in java interface - reduces java shadow from 2x to 1/2x - allows to memorize heap block meta info for Java and Go - allows to cleanup sync object meta info for Go - which in turn enabled deadlock detector for Go llvm-svn: 209810
* tsan: deobfuscate global ctx variableDmitry Vyukov2014-03-201-1/+1
| | | | llvm-svn: 204327
* tsan: remove in_rtl counterDmitry Vyukov2013-12-241-4/+0
| | | | | | | | This is intended to address the following problem. Episodically we see CHECK-failures when recursive interceptors call back into user code. Effectively we are not "in_rtl" at this point, but it's very complicated and fragile to properly maintain in_rtl property. Instead get rid of it. It was used mostly for sanity CHECKs, which basically never uncover real problems. Instead introduce ignore_interceptors flag, which is used in very few narrow places to disable recursive interceptors (e.g. during runtime initialization). llvm-svn: 197979
* tsan: ignore interceptors coming from specified librariesDmitry Vyukov2013-10-031-13/+0
| | | | | | | | | | | | | LibIgnore allows to ignore all interceptors called from a particular set of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions from the provided SuppressionContext; finds code ranges for the libraries; and checks whether the provided PC value belongs to the code ranges. Also make malloc and friends interceptors use SCOPED_INTERCEPTOR_RAW instead of SCOPED_TSAN_INTERCEPTOR, because if they are called from an ignored lib, then must call our internal allocator instead of libc malloc. llvm-svn: 191897
* tsan: ignore all interceptors coming directly from JVMDmitry Vyukov2013-09-211-0/+14
| | | | llvm-svn: 191152
* tsan: consistently use return pc as top frame pcDmitry Vyukov2013-06-171-1/+2
| | | | | | | always substract 1 from the top pc this allows to get correct stacks with -O2 llvm-svn: 184112
* tsan: introduce recursive mutex lock/unlock java interfaceDmitry Vyukov2013-05-171-0/+24
| | | | | | this is required to handle Object.Wait() llvm-svn: 182088
* [Sanitizer] update style checker script and fix namespace style warningsAlexey Samsonov2013-01-301-1/+1
| | | | llvm-svn: 173910
* tsan: fix Java memory move operations and add the testDmitry Vyukov2012-12-211-10/+23
| | | | llvm-svn: 170891
* tsan: update mutex table for javaDmitry Vyukov2012-12-211-5/+3
| | | | llvm-svn: 170884
* tsan: java: move shadow memory on GC compactionDmitry Vyukov2012-12-211-7/+28
| | | | llvm-svn: 170882
* tsan: java interface implementation skeletonDmitry Vyukov2012-12-201-2/+229
| | | | llvm-svn: 170707
* tsan: add java interface implementation stubDmitry Vyukov2012-12-201-0/+46
llvm-svn: 170681
OpenPOWER on IntegriCloud