summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merging r311674:release_50Hans Wennborg2017-08-251-1/+2
| | | | | | | | | | | | | ------------------------------------------------------------------------ r311674 | hans | 2017-08-24 10:00:36 -0700 (Thu, 24 Aug 2017) | 3 lines Mark allocator_oom_test.cc unsupported on arm & aarch64 (PR33972) The buildbots don't seem to like it. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_50@311736 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r311555:Hans Wennborg2017-08-232-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r311555 | oleg | 2017-08-23 07:26:31 -0700 (Wed, 23 Aug 2017) | 14 lines [ARM][Compiler-rt] Fix AEABI builtins to correctly pass arguments to non-AEABI functions on HF targets Summary: This is a patch for PR34167. On HF targets functions like `__{eq,lt,le,ge,gt}df2` and `__{eq,lt,le,ge,gt}sf2` expect their arguments to be passed in d/s registers, while some of the AEABI builtins pass them in r registers. Reviewers: compnerd, peter.smith, asl Reviewed By: peter.smith, asl Subscribers: peter.smith, aemerson, dberris, javed.absar, llvm-commits, asl, kristof.beyls Differential Revision: https://reviews.llvm.org/D36675 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_50@311606 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r311496:Hans Wennborg2017-08-231-8/+8
| | | | | | | | | | | ------------------------------------------------------------------------ r311496 | hans | 2017-08-22 14:54:37 -0700 (Tue, 22 Aug 2017) | 1 line [profile] Fix warning about C++ style comment in C file ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_50@311584 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r311495:Hans Wennborg2017-08-231-1/+1
| | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r311495 | hans | 2017-08-22 14:54:37 -0700 (Tue, 22 Aug 2017) | 6 lines [esan] Use stack_t instead of struct sigaltstack (PR34011) The struct tag is going away in soon-to-be-released glibc 2.26 and the stack_t typedef seems to have been there forever. Patch by Bernhard Rosenkraenzer! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_50@311583 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating release_50 branch off revision 308441Hans Wennborg2017-07-190-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_50@308446 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86][builtins] Sync getX86CpuIDAndInfoEx with llvm's Host.cpp again.Craig Topper2017-07-191-29/+10
| | | | | | We now use __cpuidex intrinsics intead of inline asm on 32-bit Windows. We already used it on 64-bit. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308420 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add MemoryMappedSection struct for two-level memory map iteration"Francis Ricci2017-07-182-54/+9
| | | | | | | | This reverts commit c8095ce74118dee8544b0f1ffaba8f46aa10215c. Reverted due to some buildbot timeouts, perhaps due to 10.11 issues. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308395 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Only scan global sections containing data in LSan on darwin"Francis Ricci2017-07-185-28/+11
| | | | | | This reverts commit 7e46d78d47832f03ce42adcf56417fbfd47cbaad. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308394 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't call exit() from atexit handlers on DarwinFrancis Ricci2017-07-186-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Calling exit() from an atexit handler is undefined behavior. On Linux, it's unavoidable, since we cannot intercept exit (_exit isn't called if a user program uses return instead of exit()), and I haven't seen it cause issues regardless. However, on Darwin, I have a fairly complex internal test that hangs roughly once in every 300 runs after leak reporting finishes, which is resolved with this patch, and is presumably due to the undefined behavior (since the Die() is the only thing that happens after the end of leak reporting). In addition, this is the way TSan works as well, where an atexit handler+Die() is used on Linux, and an _exit() interceptor is used on Darwin. I'm not sure if it's intentionally structured that way in TSan, since TSan sets up the atexit handler and the _exit() interceptor on both platforms, but I have observed that on Darwin, only the _exit() interceptor is used, and on Linux the atexit handler is used. There is some additional related discussion here: https://reviews.llvm.org/D35085 Reviewers: alekseyshl, kubamracek Subscribers: eugenis, vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D35513 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308353 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] ASan/MSan/LSan allocators set errno on failure.Alex Shlyapnikov2017-07-1812-112/+202
| | | | | | | | | | | | | | | | | | | | | Summary: ASan/MSan/LSan allocators set errno on allocation failures according to malloc/calloc/etc. expected behavior. MSan allocator was refactored a bit to make its structure more similar with other allocators. Also switch Scudo allocator to the internal errno definitions. TSan allocator changes will follow. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35275 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308344 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Remove recent asan tests which expect death in allocatorVitaly Buka2017-07-181-10/+0
| | | | | | | | These tests assume allocator_may_return_null=false If allocator_may_return_null=true, gtest would not be able to switch it. Tests needs to be re-implemented as lit tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308254 91177308-0d34-0410-b5e6-96231b3b80d8
* Only scan global sections containing data in LSan on darwinFrancis Ricci2017-07-175-11/+28
| | | | | | | | | | | | | | | | | | | | Summary: __DATA segments on Darwin contain a large number of separate sections, most of which cannot actually contain pointers, and contain const values or objc metadata. Only scanning sections which can contain pointers greatly improves performance. On a medium-sized (~4000 files) internal project, I saw a speedup of about 50% in standalone LSan's execution time (50% improvement in the time spent running LSan, not the total program time). Reviewers: kcc, kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35432 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308231 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizers] Make sure that all complex macros uses parenthesisVitaly Buka2017-07-171-55/+61
| | | | | | | | | | | | | | Summary: Without them expressions like this may have different values. (SANITIZER_INTERCEPT_MEMRCHR && SANITIZER_INTERCEPT_PREADV) Reviewers: alekseyshl Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35512 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308228 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing && to fix syntax.Kamil Rytarowski2017-07-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308221 91177308-0d34-0410-b5e6-96231b3b80d8
* Add NetBSD support in platform_interceptors.hKamil Rytarowski2017-07-171-41/+57
| | | | | | | | | | | | | | | | | | | | | | | Summary: Introduce SI_NETBSD for NetBSD. Add NetBSD support for appropriate `SANITIZER_INTERCEPT_*`. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dim, kcc, alekseyshl, filcab, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35468 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308217 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce SANITIZER_NETBSD in sanitizer_platform.hKamil Rytarowski2017-07-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Add defines for new NetBSD: SANITIZER_NETBSD, it will be used across the codebase for sanitizers. NetBSD is a POSIX-like platform, add it to SANITIZER_POSIX. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, dim, alekseyshl, filcab, eugenis, vitalybuka Reviewed By: kcc Subscribers: kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35467 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308216 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MemoryMappedSection struct for two-level memory map iterationFrancis Ricci2017-07-172-9/+54
| | | | | | | | | | | | Summary: This will allow sanitizer_procmaps on mac to expose section information. Reviewers: kubamracek, alekseyshl, kcc Subscribers: llvm-commits, emaste Differential Revision: https://reviews.llvm.org/D35422 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308210 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Disable not working new test on WindowsVitaly Buka2017-07-161-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308123 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Add missing include for fix test on WindowsVitaly Buka2017-07-161-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308122 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] Disable test with debug runtimeVitaly Buka2017-07-161-0/+2
| | | | | | Test expects at least -O1 compiled runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308121 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Attempt to fix test in Windows after r308064Vitaly Buka2017-07-161-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308120 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix fix format specifies type in testVitaly Buka2017-07-161-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308117 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag ↵George Karpenkov2017-07-151-3/+9
| | | | | | | | says so Differential Revision: https://reviews.llvm.org/D35400 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308072 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] ASan and LSan allocator set errno on failure.Alex Shlyapnikov2017-07-143-18/+57
| | | | | | | | | | | | | | | | | | | Summary: Set proper errno code on alloction failures and change some implementations to satisfy their man-specified requirements: LSan: valloc and memalign ASan: pvalloc, memalign and posix_memalign Changing both allocators in one patch since LSan depends on ASan allocator in some configurations. Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35440 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308064 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] LSan allocator set errno on failure.Alex Shlyapnikov2017-07-142-11/+33
| | | | | | | Set proper errno code on alloction failures and change valloc and memalign implementations to satisfy their man-specified requirements. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308063 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] Scudo allocator set errno on failure.Alex Shlyapnikov2017-07-142-25/+33
| | | | | | | | | | | | | | | Summary: Set proper errno code on alloction failure and change pvalloc and posix_memalign implementation to satisfy their man-specified requirements. Reviewers: cryptoad Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35429 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308053 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: optimize sync clock memory consumptionDmitry Vyukov2017-07-144-197/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change implements 2 optimizations of sync clocks that reduce memory consumption: Use previously unused first level block space to store clock elements. Currently a clock for 100 threads consumes 3 512-byte blocks: 2 64-bit second level blocks to store clock elements +1 32-bit first level block to store indices to second level blocks Only 8 bytes of the first level block are actually used. With this change such clock consumes only 2 blocks. Share similar clocks differing only by a single clock entry for the current thread. When a thread does several release operations on fresh sync objects without intervening acquire operations in between (e.g. initialization of several fields in ctor), the resulting clocks differ only by a single entry for the current thread. This change reuses a single clock for such release operations. The current thread time (which is different for different clocks) is stored in dirty entries. We are experiencing issues with a large program that eats all 64M clock blocks (32GB of non-flushable memory) and crashes with dense allocator overflow. Max number of threads in the program is ~170 which is currently quite unfortunate (consume 4 blocks per clock). Currently it crashes after consuming 60+ GB of memory. The first optimization brings clock block consumption down to ~40M and allows the program to work. The second optimization further reduces block consumption to "modest" 16M blocks (~8GB of RAM) and reduces overall RAM consumption to ~30GB. Measurements on another real world C++ RPC benchmark show RSS reduction from 3.491G to 3.186G and a modest speedup of ~5%. Go parallel client/server HTTP benchmark: https://github.com/golang/benchmarks/blob/master/http/http.go shows RSS reduction from 320MB to 240MB and a few percent speedup. Reviewed in https://reviews.llvm.org/D35323 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308018 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix sanitizer build against latest glibcKostya Serebryany2017-07-134-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: libsanitizer doesn't build against latest glibc anymore, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81066 for details. One of the changes is that stack_t changed from typedef struct sigaltstack { ... } stack_t; to typedef struct { ... } stack_t; for conformance reasons. And the other change is that the glibc internal __need_res_state macro is now ignored, so when doing ``` #define __need_res_state #include <resolv.h> ``` the effect is now the same as just ``` #include <resolv.h> ``` and thus one doesn't get just the ``` struct __res_state { ... }; ``` definition, but newly also the ``` extern struct __res_state *__res_state(void) __attribute__ ((__const__)); ``` prototype. So __res_state is no longer a type, but a function. Reviewers: kcc, ygribov Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D35246 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307969 91177308-0d34-0410-b5e6-96231b3b80d8
* [scudo] Do not grab a cache for secondary allocation & per related changesKostya Kortchinsky2017-07-132-55/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Secondary backed allocations do not require a cache. While it's not necessary an issue when each thread has its cache, it becomes one with a shared pool of caches (Android), as a Secondary backed allocation or deallocation holds a cache that could be useful to another thread doing a Primary backed allocation. We introduce an additional PRNG and its mutex (to avoid contention with the Fallback one for Primary allocations) that will provide the `Salt` needed for Secondary backed allocations. I changed some of the code in a way that feels more readable to me (eg: using some values directly rather than going through ternary assigned variables, using directly `true`/`false` rather than `FromPrimary`). I will let reviewers decide if it actually is. An additional change is to mark `CheckForCallocOverflow` as `UNLIKELY`. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35358 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307958 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" ↵Vedant Kumar2017-07-132-9/+21
| | | | | | | | (compiler-rt) Compiler-rt changes associated with: D34121 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307956 91177308-0d34-0410-b5e6-96231b3b80d8
* For Darwin's GetTaskInfoMaxAddress, define the real structure with real ↵Kuba Mracek2017-07-131-5/+26
| | | | | | fields to avoid confusion. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307945 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt][X86] Match the detection of cpu's for __cpu_model to the ↵Craig Topper2017-07-131-309/+109
| | | | | | | | | | | | | | | | | | | | | latest version of gcc Summary: We were missing many feature flags that newer gcc supports and we had our own set of feature flags that gcc didnt' support that were overlapping. Clang's implementation assumes gcc's features list so a mismatch here is problematic. I've also matched the cpu type/subtype lists with gcc and removed all the cpus that gcc doesn't support. I've also removed the fallback autodetection logic that was taken from Host.cpp. It was the main reason we had extra feature flags relative to gcc. I don't think gcc does this in libgcc. Once this support is in place we can consider implementing __builtin_cpu_is in clang. This could also be needed for function dispatching that Erich Keane is working on. Reviewers: echristo, asbirlea, RKSimon, erichkeane, zvi Reviewed By: asbirlea Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D35214 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307878 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken testXinliang David Li2017-07-131-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307869 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Avoid recompilation of the same code in the testVitaly Buka2017-07-121-13/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307868 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] For iOS/AArch64, if the dynamic shadow doesn't fit, restrict the VM spaceKuba Mracek2017-07-1212-17/+93
| | | | | | | | | | | | On iOS/AArch64, the address space is very limited and has a dynamic maximum address based on the configuration of the device. We're already using a dynamic shadow, and we find a large-enough "gap" in the VM where we place the shadow memory. In some cases and some device configuration, we might not be able to find a large-enough gap: E.g. if the main executable is linked against a large number of libraries that are not part of the system, these libraries can fragment the address space, and this happens before ASan starts initializing. This patch has a solution, where we have a "backup plan" when we cannot find a large-enough gap: We will restrict the address space (via MmapFixedNoAccess) to a limit, for which the shadow limit will fit. Differential Revision: https://reviews.llvm.org/D35098 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307865 91177308-0d34-0410-b5e6-96231b3b80d8
* [PGO] Add a test for 2-deep loop nestXinliang David Li2017-07-121-0/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307864 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit CMake targets for ASan/TSan iOS Simulator testing and update ↵Kuba Mracek2017-07-122-8/+26
| | | | | | the instructions how to run them. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307844 91177308-0d34-0410-b5e6-96231b3b80d8
* On Darwin, start building the TSan iOS dylib by default.Kuba Mracek2017-07-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307839 91177308-0d34-0410-b5e6-96231b3b80d8
* [builtins] Better Fuchsia supportPetr Hosek2017-07-122-4/+19
| | | | | | | | | Add Fuchsia support to some builtings and avoid building builtins that are not and will never be used on Fuchsia. Differential Revision: https://reviews.llvm.org/D34075 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307832 91177308-0d34-0410-b5e6-96231b3b80d8
* On Darwin, start building the TSan dylib for the iOS simulator.Kuba Mracek2017-07-122-3/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307816 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the declaration of DARWIN_PREFER_PUBLIC_SDK cmake variable (move before ↵Kuba Mracek2017-07-121-1/+2
| | | | | | the return). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307815 91177308-0d34-0410-b5e6-96231b3b80d8
* [scudo] PRNG makeoverKostya Kortchinsky2017-07-124-56/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This follows the addition of `GetRandom` with D34412. We remove our `/dev/urandom` code and use the new function. Additionally, change the PRNG for a slightly faster version. One of the issues with the old code is that we have 64 full bits of randomness per "next", using only 8 of those for the Salt and discarding the rest. So we add a cached u64 in the PRNG that can serve up to 8 u8 before having to call the "next" function again. During some integration work, I also realized that some very early processes (like `init`) do not benefit from `/dev/urandom` yet. So if there is no `getrandom` syscall as well, we have to fallback to some sort of initialization of the PRNG. Now a few words on why XoRoShiRo and not something else. I have played a while with various PRNGs on 32 & 64 bit platforms. Some results are below. LCG 32 & 64 are usually faster but produce respectively 15 & 31 bits of entropy, meaning that to get a full 64-bit, you would need to call them several times. The simple XorShift is fast, produces 32 bits but is mediocre with regard to PRNG test suites, PCG is slower overall, and XoRoShiRo is faster than XorShift128+ and produces full 64 bits. %%% root@tulip-chiphd:/data # ./randtest.arm [+] starting xs32... [?] xs32 duration: 22431833053ns [+] starting lcg32... [?] lcg32 duration: 14941402090ns [+] starting pcg32... [?] pcg32 duration: 44941973771ns [+] starting xs128p... [?] xs128p duration: 48889786981ns [+] starting lcg64... [?] lcg64 duration: 33831042391ns [+] starting xos128p... [?] xos128p duration: 44850878605ns root@tulip-chiphd:/data # ./randtest.aarch64 [+] starting xs32... [?] xs32 duration: 22425151678ns [+] starting lcg32... [?] lcg32 duration: 14954255257ns [+] starting pcg32... [?] pcg32 duration: 37346265726ns [+] starting xs128p... [?] xs128p duration: 22523807219ns [+] starting lcg64... [?] lcg64 duration: 26141304679ns [+] starting xos128p... [?] xos128p duration: 14937033215ns %%% Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: aemerson, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D35221 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307798 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: remove some clock-related statsDmitry Vyukov2017-07-123-12/+4
| | | | | | | | | The stats are too dependent on implementation and won't be relevant in future. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307786 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: refactor SyncClock codeDmitry Vyukov2017-07-122-55/+54
| | | | | | | | | | | 1. Add SyncClock::ResetImpl which removes code duplication between ctor and Reset. 2. Move SyncClock::Resize to SyncClock methods, currently it's defined between ThreadClock methods. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307785 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: prepare clock for future changesDmitry Vyukov2017-07-126-23/+35
| | | | | | | | | Pass ClockCache to ThreadClock::set and introduce ThreadCache::ResetCached. For now both are unused, but will reduce future diffs. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307784 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: s/-1/kInvalidTid/Dmitry Vyukov2017-07-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307781 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: give debug names to dense allocatorsDmitry Vyukov2017-07-123-5/+13
| | | | | | | | | Improves crash message on dense alloc overflow. Allows to understand what alloc overflowed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307780 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: don't create sync objects on acquire-loadDmitry Vyukov2017-07-121-5/+11
| | | | | | | | | Don't create sync object if it does not exist yet. For example, an atomic pointer is initialized to nullptr and then periodically acquire-loaded. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307778 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add another test for clock growthDmitry Vyukov2017-07-121-0/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307777 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add test for __tsan_java_findDmitry Vyukov2017-07-121-0/+69
| | | | | | | | | | | | | The test should have been added in 289682 "tsan: allow Java VM iterate over allocated objects" but I forgot to avn add. Author: Alexander Smundak (asmundak) Reviewed in https://reviews.llvm.org/D27720 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307776 91177308-0d34-0410-b5e6-96231b3b80d8