summaryrefslogtreecommitdiff
path: root/test/profile/Linux
AgeCommit message (Collapse)Author
2017-12-01[ubsan] Re-commit: lit changes for lld testing, future lto testing.Roman Lebedev
Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. The original attempt, r319525 was reverted in r319526 due to the failures in compiler-rt standalone builds. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319575 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19[profile] Update Linux-only tests after r313597Vedant Kumar
Addresses bot failure: http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/9803 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-14[llvm-cov] Fix compiler-rt tests failing in build bots after rL310827.Sean Eveson
The compiler-rt tests used llvm-cov with -filename-equivelence, which was replaced with the new option -path-equivalence in rL310827. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310836 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-04coverage: Update tests to reflect changes from r310012Vedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310015 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13Fix broken testXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307869 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12[PGO] Add a test for 2-deep loop nestXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-25[PGO] Implementate profile counter regiser promotion (test case)Xinliang David Li
Differential Revision: http://reviews.llvm.org/D34085 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306232 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09Minor clean up of profile rt testsXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-20Revert "[PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-write"Renato Golin
Revert "[PGO] remove unintended debug trace. NFC" This reverts commit r295469, r295364, as they are unstable on ARM/AArch64. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@295664 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16[PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-writeRong Xu
Summary: We found a nondeterministic behavior when doing online profile merging for multi-process applications. The application forks a sub-process and sub-process sets to get SIGKILL when the parent process exits, The first process gets the lock, and dumps the profile. The second one will mmap the file, do the merge and write out the file. Note that before the merged write, we truncate the profile. Depending on the timing, the child process might be terminated abnormally when the parent exits first. If this happens: (1) before the truncation, we will get the profile for the main process (2) after the truncation, and before write-out the profile, we will get 0 size profile. (3) after the merged write, we get merged profile. This patch temporarily suspend the SIGKILL for PR_SET_PDEATHSIG before profile-write and restore it after the write. This patch only applies to Linux system. Reviewers: davidxl Reviewed By: davidxl Subscribers: xur, llvm-commits Differential Revision: https://reviews.llvm.org/D29954 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@295364 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14[PGO] Delay profile dir creation until writeXinliang David Li
Differential Revision: http://reviews.llvm.org/D29960 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@295108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10[PGO] Update the test cases after r291588.Rong Xu
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291594 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02compiler-rt/test/profile/Linux/lit.local.cfg: [Py3] Use text mode ↵NAKAMURA Takumi
(universal_newlines=True). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18[profile] Mark lprofCurFilename as COMPILER_RT_WEAKVedant Kumar
This makes __llvm_profile_set_filename() work across dylib boundaries on Darwin. This functionality was originally meant to work on all platforms, but was moved to a Linux-only directory with r272404. The root cause of the test failure on Darwin was that lprofCurFilename was not marked weak. Each dylib maintained its own copy of the variable due to the two-level namespace. Tested with check-profile (on Darwin). I don't expect this to regress other platforms. Differential Revision: https://reviews.llvm.org/D25707 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@284440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23Fix the following tests when running under cross-compilation:Chad Rosier
Profile-aarch64 :: Linux/comdat_rename.test Profile-aarch64 :: Linux/extern_template.test Profile-aarch64 :: Linux/instrprof-comdat.test Profile-aarch64 :: Linux/instrprof-cs.c The issue is that the created (aarch64) binaries were attempting to run natively instead of running through %run, which guarantees running in the proper environment if the compilation was configured correctly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-01Fix profile test assuming dumb compilerRenato Golin
Commit r280364 has introduced some call-graph optmisations making a profiler test "fail" due to not expecting the compiler to be "smart", and fold constants across functions. This commit works around the issue, leaving the origial semantics intact. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-09[test] Update coverage tests to sync up with r278152Vedant Kumar
This should fix the following bot failure: http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/6522 Patch by Ying Yi! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01[Profile] Add new test case to cover comdat renamingXinliang David Li
Test checks that context specific profiles for comdat functions are not lost. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-30[Profile] Add a new test caseXinliang David Li
The end-end test checks that cs-profile counter update is obtained as expected. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-12[libprofile] Define an expansion `%clang_profgen=`Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10[profile] fix bot failure on darwinXinliang David Li
Profile setting accross shared lib is broken on darwin (to be investigated). Move the test to Linux only for now git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06add -f to rm so the test passes the first time it's run the file file is not ↵David Blaikie
present (otherwise it just keeps failing at the rm step and never passes... ) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271959 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[profile] code cleanup /NFCXinliang David Li
Address review feedback for better readability. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271922 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[profile] in-process mergeing support (part-2)Xinliang David Li
(Part-1 merging API is in profile runtime) This patch implements a portable file opening API with exclusive access for the process. In-process profile merge requires profile file update to be atomic/fully sychronized. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28Move test only for the relevant platformXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271098 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27[profile] Add a test to ensure runtime allocator is not invokedXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22[profile] initialize static pool properly Xinliang David Li
Remove dependency on runtime initializer to avoid issues related to initialization order. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26Make vp merge test more robustXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-06[PGO] internal API name cleanups (for better consistency)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03[PGO] Add API for profile merge from bufferXinliang David Li
Differential Revision: http://reviews.llvm.org/D17831 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-28Test cleanupsXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-28[PGO] add a test for available_externally functionsXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-19minor test runline cleanupXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261361 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-18Add test coverage for default linkerXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10Rollback 260394 -- 32bit test needs more config supportXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10Add tests for -m32Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08[PGO] Simpflify test and increase coverageXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260142 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07Test update : tighten up checksXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07Revert 260050 -- new test case should not be includedXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07Test update : tighten up checksXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07Add coverage tests (defaulted constructors/destructor)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260041 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21Resubmit test case with more restrictionXinliang David Li
The original submittion triggered a BFD linker bug (2.24) on Aarch64 only. Before the build bot is upgraded to more recent linker, restrict the test to be executed only with gold linker. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14[Coverage] add test cases for coverage testingXinliang David Li
1. One test covering coverage-mapping interfaction with linker GC 2. one test covering coverage-mapping with shared libaries git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12[PGO] Add Linux specific test cases for profile runtimeXinliang David Li
(second try with more strict config check) Currently, only gc-sections related tests are added. Gold linker currently is required due to PR19161 of bfd linker. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 Revert r257444 : arm build bots failureXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257446 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12[PGO] Add Linux specific test cases for profile runtimeXinliang David Li
Currently, only gc-sections related tests are added. Gold linker currently is required due to PR19161 of bfd linker. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257444 91177308-0d34-0410-b5e6-96231b3b80d8