summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/profile/Inputs
Commit message (Collapse)AuthorAgeFilesLines
* [compiler-rt] Reduce the number of threads in gcov test to avoid failureCalixte Denizet2020-06-231-15/+5
| | | | | | | | | | | | | | | | | | | | Summary: Patch in D78477 introduced a new test for gcov and this test is failing on arm: - http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-full-sh/builds/4752/steps/ninja%20check%202/logs/stdio - http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/10501/steps/ninja%20check%202/logs/stdio So try to fix it in reducing the number of threads. Reviewers: marco-c Reviewed By: marco-c Subscribers: dberris, kristof.beyls, #sanitizers, serge-sans-paille, sylvestre.ledru Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D79621 (cherry picked from commit 0da37bedc2667da371eda30595a06210595881d0)
* [profile] Don't crash when forking in several threadsCalixte Denizet2020-05-071-0/+35
| | | | | | | | | | | | | | | | | | | Summary: When forking in several threads, the counters were written out in using the same global static variables (see GCDAProfiling.c): that leads to crashes. So when there is a fork, the counters are resetted in the child process and they will be dumped at exit using the interprocess file locking. When there is an exec, the counters are written out and in case of failures they're resetted. Reviewers: jfb, vsk, marco-c, serge-sans-paille Reviewed By: marco-c, serge-sans-paille Subscribers: llvm-commits, serge-sans-paille, dmajor, cfe-commits, hiraditya, dexonsmith, #sanitizers, marco-c, sylvestre.ledru Tags: #sanitizers, #clang, #llvm Differential Revision: https://reviews.llvm.org/D78477 (cherry picked from commit bec223a9bc4eb9747993ee9a4c1aa135c32123e6)
* [profile] Do not cache __llvm_profile_get_filename resultVedant Kumar2019-10-181-0/+5
| | | | | | | | | | | | | | | | | When the %m filename pattern is used, the filename is unique to each image, so the cached value is wrong. It struck me that the full filename isn't something that's recomputed often, so perhaps it doesn't need to be cached at all. David Li pointed out we can go further and just hide lprofCurFilename. This may regress workflows that depend on using the set-filename API to change filenames across all loaded DSOs, but this is expected to be very rare. rdar://55137071 Differential Revision: https://reviews.llvm.org/D69137 llvm-svn: 375301
* compiler-rt: Rename remaining cc files in test/profile to cppNico Weber2019-08-054-1/+1
| | | | | | See r367803 and similar other changes. llvm-svn: 367858
* [profile][test] Fix Profile-* :: instrprof-merge.c etc. on SPARCRainer Orth2019-07-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working on https://reviews.llvm.org/D40900 (which effectively is about enabling compiler-rt on sparc these days), I came across two failing profile testcases: Profile-sparc :: instrprof-merge-match.test Profile-sparc :: instrprof-merge.c Profile-sparcv9 :: instrprof-merge-match.test Profile-sparcv9 :: instrprof-merge.c All of them crashed with a SIGBUS in __llvm_profile_merge_from_buffer: Thread 2 received signal SIGSEGV, Segmentation fault. [Switching to Thread 1 (LWP 1)] 0x00012368 in __llvm_profile_merge_from_buffer ( ProfileData=0x2384c <main.Buffer> "\377lprofR\201", ProfileSize=360) at /vol/llvm/src/llvm/local/projects/compiler-rt/lib/profile/InstrProfilingMerge.c:95 95 SrcDataEnd = SrcDataStart + Header->DataSize; where Header is insufficiently aligned for a strict-alignment target like SPARC. Fixed by forcing the alignment to uint64_t, the members of struct __llvm_profile_header, in the callers. Tested on sparcv9-sun-solaris2.11. https://reviews.llvm.org/D64498 llvm-svn: 365805
* Prospective test fix in response to r358104.John McCall2019-04-111-1/+1
| | | | llvm-svn: 358149
* Reland compiler-rt support for order file instrumentation.Manman Ren2019-03-082-0/+24
| | | | | | | | | | | | | | r355343 was landed and was reverted in r355363 due to build breakage. This patch adds Linux/Windows support on top of r355343. In this patch, Darwin should be working with testing case. Linux should be working, I will enable the testing case in a follwup diff. Windows/Other should be building. Correct implementation for Other platforms will be added. Thanks David for reviewing the original diff, helping me with issues on Linux, and giving suggestions for adding support for Other platforms. llvm-svn: 355701
* Revert compiler-rt diffs for order file instrumentation to get bot green!Manman Ren2019-03-052-24/+0
| | | | | | | | This caused issues on Linux/Windows and other platforms. r355343 355350 355350 llvm-svn: 355363
* Order File Instrumentation: dump the data in compiler-rtManman Ren2019-03-042-0/+24
| | | | | | | | The profile data will be dumped in a file default_xxx.profraw.order. Differential Revision: https://reviews.llvm.org/D57530 llvm-svn: 355343
* Set hidden attribute on lprofMergeValueProfDataAna Pazos2019-02-141-0/+60
| | | | | | | | | | | | | | | | | | | | | Summary: The changes in https://reviews.llvm.org/D44847 cause load time failure due to lprofMergeValueProfData in Android libs enabled with profile generation: "dlopen failed: cannot locate symbol "lprofMergeValueProfData" referenced by..." Marking lprofMergeValueProfData as hidden so the correct in-module definition is picked by the linker. Reviewers: davidxl Reviewed By: davidxl Subscribers: efriedma, xur, davidxl, llvm-commits Differential Revision: https://reviews.llvm.org/D55893 llvm-svn: 354064
* [InstrProf] Port test suite to WindowsReid Kleckner2019-02-0719-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change, check-profile would run, but all tests would be marked unsupported on Windows. This is the new status of 'check-profile' after this change: Testing Time: 6.66s Expected Passes : 29 Expected Failures : 5 Unsupported Tests : 39 I moved many tests that exercise posix-y features like dlopen and DSOs into the Posix subdirectory, and ran the tests on Linux to validate my changes. These are the remaining tests that I handled on a case by case basis: - instrprof-path.c Passes, Fixed some path portability issues - instrprof-gcov-exceptions.test Passes, the FileCheck actually succeeds on Windows, so I RUNX'd it - instrprof-icall-promo.test XFAILed, probably due to C++ ABI differences in vtables - instrprof-merge-match.test - instrprof-merge.c - instrprof-merging.cpp XFAILed, These seem like real bugs that need fixing - instrprof-version-mismatch.c XFAILed, Overriding the weak version symbol doesn't work - instrprof-without-libc.c UNSUPPORTED, test needs an executable symbol table, Windows has none Reviewers: davidxl, wmi, void Subscribers: fedor.sergeev, #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D57853 llvm-svn: 353435
* [Profile] Fix fork test and add tests for execlp and execvp after patch ↵Calixte Denizet2018-11-075-2/+82
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D53593 Summary: This is a follow-up of patch https://reviews.llvm.org/D53593 Reviewers: marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D54167 llvm-svn: 346314
* [GCOV] Close file mapping handle on Windows, so flushed gcda files can be ↵Marco Castelluccio2018-11-072-0/+37
| | | | | | removed while the process is in execution llvm-svn: 346300
* [GCOV] Make test path generic so it passes on all machinesMarco Castelluccio2018-10-301-1/+1
| | | | llvm-svn: 345656
* [GCOV] Add a test for function defined on one line (follow-up of ↵Calixte Denizet2018-10-302-0/+27
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D53600) Summary: Add a test for coverage for function definition like void foo() { }. Reviewers: marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D53601 llvm-svn: 345625
* [profile] Fix the gcov tests after the patch in D49853 landed.Calixte Denizet2018-10-1114-19/+19
| | | | | | | | | | | | | | | | Summary: The goal of the patch in D49853 is to display counter on the line of function definition. So some tests need to be fixed. Reviewers: marco-c, davidxl Reviewed By: marco-c Subscribers: sylvestre.ledru, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49854 llvm-svn: 344229
* [profile] Revert commit https://reviews.llvm.org/rL342718Calixte Denizet2018-09-2415-18/+18
| | | | llvm-svn: 342913
* [profile] Fix the tests for patch in https://reviews.llvm.org/D49916.Calixte Denizet2018-09-2115-18/+18
| | | | | | | | | | | | | | | | | Summary: The goal of D49916 is to remove some hit counters from lines like '}'. So as a consequence, the tests must be fixed. FYI, after holidays, I'll add more tests. Reviewers: marco-c, davidxl Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D49917 llvm-svn: 342718
* [profile] Fix tests in compiler-rt for patch in gcov ↵Calixte Denizet2018-09-202-3/+3
| | | | | | | | | | | | | | | | (https://reviews.llvm.org/D49659) Summary: Some tests are broken if patch in D49659 is accepted so this patch fixes them. Reviewers: marco-c Reviewed By: marco-c Subscribers: dberris, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49721 llvm-svn: 342661
* [gcov] Fix branch counters with switch statements (fix PR38821)Vedant Kumar2018-09-112-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Right now, the counters are added in regards of the number of successors for a given BasicBlock: it's good when we've only 1 or 2 successors (at least with BranchInstr). But in the case of a switch statement, the BasicBlock after switch has several predecessors and we need know from which BB we're coming from. So the idea is to revert what we're doing: add a PHINode in each block which will select the counter according to the incoming BB. They're several pros for doing that: - we fix the "switch" bug - we remove the function call to "__llvm_gcov_indirect_counter_increment" and the lookup table stuff - we replace by PHINodes, so the optimizer will probably makes a better job. Patch by calixte! Differential Revision: https://reviews.llvm.org/D51619 llvm-svn: 341977
* [gcov] Add test which uses forkMarco Castelluccio2018-08-012-0/+38
| | | | | | Test for https://bugs.llvm.org/show_bug.cgi?id=38180. llvm-svn: 338500
* [gcov] Add tests using switch, one with break clauses and one with fallthroughMarco Castelluccio2018-07-314-0/+82
| | | | llvm-svn: 338453
* [gcov] Add a test showing differences in line counts when building with or ↵Marco Castelluccio2018-07-162-0/+27
| | | | | | | | without exceptions enabled. Test for https://bugs.llvm.org/show_bug.cgi?id=38066. llvm-svn: 337174
* Add a test with __gcov_flush called before terminating the program.Marco Castelluccio2018-07-162-0/+31
| | | | | | Test for https://bugs.llvm.org/show_bug.cgi?id=38067. llvm-svn: 337150
* Add a test with multiple BBs on the same lineMarco Castelluccio2018-07-132-0/+54
| | | | | | Test for https://bugs.llvm.org/show_bug.cgi?id=38065. llvm-svn: 336996
* Simplify instrprof-dlopen-dlclose-gcov.test to avoid failures on Aarch64.Marco Castelluccio2018-07-126-6/+6
| | | | | | The test for a function with an if block in a single line (https://bugs.llvm.org/show_bug.cgi?id=38065) will be moved to a separate test. llvm-svn: 336942
* Reapply "Make __gcov_flush flush counters for all shared libraries"Marco Castelluccio2018-07-1016-14/+505
| | | | | | | This reapplies r336365, after marking tests as failing on various configurations. llvm-svn: 336678
* Revert "Make __gcov_flush flush counters for all shared libraries"Michael Zolotukhin2018-07-0716-505/+14
| | | | | | | This reverts r336365: the added tests are failing on various configurations (e.g. on green-dragon). llvm-svn: 336474
* Make __gcov_flush flush counters for all shared librariesMarco Castelluccio2018-07-0516-14/+505
| | | | | | | | | | | | | | | | | Summary: This will make the behavior of __gcov_flush match the GCC behavior. I would like to rename __gcov_flush to __llvm_gcov_flush (in case of programs linking to libraries built with different compilers), but I guess we can't for compatibility reasons. Reviewers: davidxl Reviewed By: davidxl Subscribers: samsonov, vitalybuka, pcc, kcc, junbuml, glider, fhahn, eugenis, dvyukov, davidxl, srhines, chh, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D48538 llvm-svn: 336365
* [profile] Add llvm_gcov_flush to be called outside a shared libraryChih-Hung Hsieh2018-06-291-0/+30
| | | | | | | | | | __gcov_flush is hidden. For applications to dump profiling data of selected .so files, they can use dlsym to find and call llvm_gcov_flush in each .so file. Differential Revision: https://reviews.llvm.org/D45454 llvm-svn: 336019
* Hide some symbols to avoid a crash on shutdown when using code coverageMarco Castelluccio2018-01-031-0/+26
| | | | | | | | | | | | | | | | | | | Summary: gcov / gcda-based profiling crashes when shared libraries are unloaded Patch by Benoit Belley and test by Marco Castelluccio for Firefox See https://bugs.llvm.org/show_bug.cgi?id=27224 & https://bugzilla.mozilla.org/show_bug.cgi?id=1401230 Reviewers: davidxl, rnk, void Subscribers: jessicah, marco-c, belleyb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D38124 llvm-svn: 321703
* [profile] Update Linux-only tests after r313597Vedant Kumar2017-09-191-1/+1
| | | | | | | Addresses bot failure: http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/9803 llvm-svn: 313602
* coverage: Update tests to reflect changes from r310012Vedant Kumar2017-08-041-1/+1
| | | | llvm-svn: 310015
* Try to fix another profile testRenato Golin2016-09-011-1/+1
| | | | | | | Another CFG optimisation patch (280364) has broken bad profile tests, and this is a similar attempt to fix the test without changing the semantics. llvm-svn: 280373
* [test] Update coverage tests to sync up with r278152Vedant Kumar2016-08-093-18/+18
| | | | | | | | | | This should fix the following bot failure: http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/6522 Patch by Ying Yi! llvm-svn: 278164
* improve test cases to fix bot failureXinliang David Li2016-08-012-4/+4
| | | | llvm-svn: 277403
* Make test more robust with better matchingXinliang David Li2016-08-012-4/+4
| | | | llvm-svn: 277387
* [Profile] Add new test case to cover comdat renamingXinliang David Li2016-08-013-0/+64
| | | | | | | Test checks that context specific profiles for comdat functions are not lost. llvm-svn: 277381
* [profile] Fix test to bail on failed waitpid in instrprof-file_ex.cVedant Kumar2016-06-091-1/+1
| | | | | | | | This resolves PR28066. Patch by David Binderman! llvm-svn: 272268
* [profile] code cleanup /NFCXinliang David Li2016-06-061-2/+2
| | | | | | | Address review feedback for better readability. llvm-svn: 271922
* [profile] in-process mergeing support (part-2)Xinliang David Li2016-06-061-0/+59
| | | | | | | | | | | (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. llvm-svn: 271864
* [profile] Add end-end test of vp for inline virtual functionsXinliang David Li2016-06-023-0/+26
| | | | | | | | | Make sure inline virtual function's address is properly recorded and dumped in raw profile so that value profiling does not loss tracking. (Second part of the test will be enabled after the lowering bug is fixed in LLVM) llvm-svn: 271528
* [profile] Add a test to ensure runtime allocator is not invokedXinliang David Li2016-05-271-0/+41
| | | | llvm-svn: 271017
* Add missing test case changesXinliang David Li2016-05-261-0/+17
| | | | llvm-svn: 270930
* [profile] entry eviction support in value profilerXinliang David Li2016-05-192-4/+145
| | | | | | Differential revision: http://reviews.llvm.org/D20408 llvm-svn: 270141
* Reapply r268608 Rong Xu2016-05-111-0/+1
| | | | | | | Re-enable the tests after IR instrumentation fix (r269146). Check-in on behalf of davidxl. llvm-svn: 269219
* Revert r268130 -- more bot failureXinliang David Li2016-05-101-1/+0
| | | | llvm-svn: 269142
* Reapply r268608 after IR instr bug fixXinliang David Li2016-05-101-0/+1
| | | | llvm-svn: 269130
* Revert r268608 -- unexplained darwin bot failureXinliang David Li2016-05-061-1/+0
| | | | llvm-svn: 268779
* Add a test of VP with shared libXinliang David Li2016-05-051-1/+523
| | | | llvm-svn: 268612
OpenPOWER on IntegriCloud