summaryrefslogtreecommitdiff
path: root/test/profile
AgeCommit message (Collapse)Author
2017-12-14[profile] Port the runtime to Solaris (retry)Vedant Kumar
This includes a few nice bits of refactoring (e.g splitting out the exclusive locking code into a common utility). Hopefully the Windows support is fixed now. Patch by Rainer Orth! Differential Revision: https://reviews.llvm.org/D40944 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320731 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-14Revert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the ↵Vedant Kumar
runtime to Solaris" This reverts commit r320726. It looks like flock isn't available on Windows: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21317/steps/build%20compiler-rt/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320728 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-14[profile] Port the runtime to SolarisVedant Kumar
This includes a few nice bits of refactoring (e.g splitting out the exclusive locking code into a common utility). Patch by Rainer Orth! Differential Revision: https://reviews.llvm.org/D40944 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320726 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08Update test case for r320180Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320181 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-07Test case update for D40873Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05Revert test case change for r319794Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319842 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05[PGO] fix test case for D40702Xinliang David Li
Differential Revision: http://reviews.llvm.org/D40702 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319795 91177308-0d34-0410-b5e6-96231b3b80d8
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-11-30[PGO] Add a test case for infinite loopsXinliang David Li
Differential Revision: http://reviews.llvm.org/D40663 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319463 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-14Adjust test after r318159Adam Nemet
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318170 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11Disable profile tests on Android.Evgeniy Stepanov
They never actually worked, but this way they are not included in "check-all". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315511 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-09-15Resubmit "[lit] Force site configs to run before source-tree configs"Zachary Turner
This is a resubmission of r313270. It broke standalone builds of compiler-rt because we were not correctly generating the llvm-lit script in the standalone build directory. The fixes incorporated here attempt to find llvm/utils/llvm-lit from the source tree returned by llvm-config. If present, it will generate llvm-lit into the output directory. Regardless, the user can specify -DLLVM_EXTERNAL_LIT to point to a specific lit.py on their file system. This supports the use case of someone installing lit via a package manager. If it cannot find a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or invalid, then we print a warning that tests will not be able to run. Differential Revision: https://reviews.llvm.org/D37756 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313407 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15Revert "[lit] Force site configs to run before source-tree configs"Zachary Turner
This patch is still breaking several multi-stage compiler-rt bots. I already know what the fix is, but I want to get the bots green for now and then try re-applying in the morning. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313335 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14[lit] Force site configs to be run before source-tree configsZachary Turner
This patch simplifies LLVM's lit infrastructure by enforcing an ordering that a site config is always run before a source-tree config. A significant amount of the complexity from lit config files arises from the fact that inside of a source-tree config file, we don't yet know if the site config has been run. However it is *always* required to run a site config first, because it passes various variables down through CMake that the main config depends on. As a result, every config file has to do a bunch of magic to try to reverse-engineer the location of the site config file if they detect (heuristically) that the site config file has not yet been run. This patch solves the problem by emitting a mapping from source tree config file to binary tree site config file in llvm-lit.py. Then, during discovery when we find a config file, we check to see if we have a target mapping for it, and if so we use that instead. This mechanism is generic enough that it does not affect external users of lit. They will just not have a config mapping defined, and everything will work as normal. On the other hand, for us it allows us to make many simplifications: * We are guaranteed that a site config will be executed first * Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere. * We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line. * It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects. * All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone. One potentially noteworthy thing that was required to implement this change is that whereas the ninja check targets previously used the first method to spawn lit, they now use the second. In particular, you can no longer run lit.py against the source tree while specifying the various `foo_site_config=<path>` parameters. Instead, you need to run llvm-lit.py. Differential Revision: https://reviews.llvm.org/D37756 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313270 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15Revert: Enable profile on NetBSDKamil Rytarowski
Requested by V.Kumar. Not all tests pass. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310912 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15Revert r310857 due to internal test failureXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310907 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-14[PGO] Add support for relocate profile dumping directoryXinliang David Li
Differential Revsion: http://reviews.llvm.org/D36648 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310857 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-13Enable profile on NetBSDKamil Rytarowski
Summary: make check-profile: Failing Tests (2): Profile-i386 :: instrprof-dlopen.test Profile-x86_64 :: instrprof-dlopen.test Expected Passes : 64 Unsupported Tests : 42 Unexpected Failures: 2 Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, filcab, fjricci Reviewed By: vitalybuka Subscribers: vsk, llvm-commits, srhines, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36603 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310800 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-29[profile] Move __llvm_profile_filename into a separate objectVedant Kumar
Users can specify the path a raw profile is written to by passing -fprofile-instr-generate=<path>, but this functionality broke on Darwin after __llvm_profile_filename was made weak [1], resulting in profiles being written to "default.profraw" even when <path> is specified. The situation is that instrumented programs provide a weak definition of __llvm_profile_filename, which conflicts with a weak redefinition provided by the profiling runtime. The linker appears to pick the 'winning' definition arbitrarily: on Darwin, it usually prefers the larger definition, which is probably why the instrprof-override-filename.c test has been passing. The fix is to move the runtime's definition into a separate object file within the archive. This means that the linker won't "see" the runtime's definition unless the user program has not provided one. I couldn't think of a great way to test this other than to mimic the Darwin failure: use -fprofile-instr-generate=<some-small-path>. Testing: check-{clang,profile}, modified instrprof-override-filename.c. [1] [Profile] deprecate __llvm_profile_override_default_filename https://reviews.llvm.org/D22613 https://reviews.llvm.org/D22614 Differential Revision: https://reviews.llvm.org/D34797 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306710 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
2017-01-10Make cmake link flag naming consistentFrancis Ricci
Summary: The build system was inconsistent in its naming conventions for link flags. This patch changes all uses of LINKFLAGS to LINK_FLAGS, for consistency with cmake's LINK_FLAGS property. This patch should make it easier to search the source code for uses of link flags, as well as providing the benefit of improved style and consistency. Reviewers: compnerd, beanz Subscribers: kubabrecka, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28506 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291539 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-11-29[Profile] Fix value profiler eviction bugXinliang David Li
Differential Revision: https://reviews.llvm.org/D27224 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29[sanitizer] Add macOS minimum deployment target to all compiler invocations ↵Kuba Mracek
in lit tests The Clang driver on macOS decides the deployment target based on various things, like your host OS version, the SDK version and some environment variables, which makes lit tests pass or fail based on your environment. Let's make sure we run all lit tests with `-mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}` (10.9 unless overriden). Differential Revision: https://reviews.llvm.org/D26929 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288186 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-10-11[profile] Add test for dead_strip+live_support functionalityVedant Kumar
Differential Revision: https://reviews.llvm.org/D25457 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@283948 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-01Try to fix another profile testRenato Golin
Another CFG optimisation patch (280364) has broken bad profile tests, and this is a similar attempt to fix the test without changing the semantics. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280373 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-09[Profile] Implement new API __llvm_profile_dumpXinliang David Li
The API is intended to be used by user to do fine grained (per-region) control of profile dumping. Differential Revision: http://reviews.llvm.org/D23106 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01improve test cases to fix bot failureXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277403 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01Make test more robust with better matchingXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277387 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-08-01Fix a bug in lit var def: remove extra spaceXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277312 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-07-23Fix buildbot failureXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22[Profile] Tighten test with expected profile countXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22[Profile] Fix a fixme in the testXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22[Profile] Add new testXinliang David Li
To test that online merging is enabled by default. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276493 91177308-0d34-0410-b5e6-96231b3b80d8