EEllis Hoag[InstrProf] Add single byte coverage mode
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Try to fix another profile test 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 | 9 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
[PGO] add a test for available_externally functions llvm-svn: 262161 | 10 年前 | |
[profile] Update Linux-only tests after r313597 Addresses bot failure: http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/9803 llvm-svn: 313602 | 8 年前 | |
[PGO] add a test for available_externally functions llvm-svn: 262161 | 10 年前 | |
[PGO] add a test for available_externally functions llvm-svn: 262161 | 10 年前 | |
Add support for generating profiles in a given directory. When the file is initialized, this patch checks whether the path specifies a directory. If so, it creates the directory tree before truncating the file. Use default.profdata instead of pgo-data for default indexed profile name. llvm-svn: 241824 | 10 年前 | |
[profile] Add a test to ensure runtime allocator is not invoked llvm-svn: 271017 | 9 年前 | |
Resubmit test case with more restriction 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. llvm-svn: 258437 | 10 年前 | |
Resubmit test case with more restriction 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. llvm-svn: 258437 | 10 年前 | |
Reland [Coverage] Add comment to skipped regions Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. Add comment to skipped regions so we don't track execution count for lines containing only comments. Differential Revision: https://reviews.llvm.org/D83592 | 5 年前 | |
[InstrProf] Add single byte coverage mode Use the llvm flag -pgo-function-entry-coverage to create single byte "counters" to track functions coverage. This mode has significantly less size overhead in both code and data because * We mark a function as "covered" with a store instead of an increment which generally requires fewer assembly instructions * We use a single byte per function rather than 8 bytes per block The trade off of course is that this mode only tells you if a function has been covered. This is useful, for example, to detect dead code. When combined with debug info correlation [0] we are able to create an instrumented Clang binary that is only 150M (the vanilla Clang binary is 143M). That is an overhead of 7M (4.9%) compared to the default instrumentation (without value profiling) which has an overhead of 31M (21.7%). [0] https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4 Reviewed By: kyulee Differential Revision: https://reviews.llvm.org/D116180 | 4 年前 | |
[InstrProf] Add single byte coverage mode Use the llvm flag -pgo-function-entry-coverage to create single byte "counters" to track functions coverage. This mode has significantly less size overhead in both code and data because * We mark a function as "covered" with a store instead of an increment which generally requires fewer assembly instructions * We use a single byte per function rather than 8 bytes per block The trade off of course is that this mode only tells you if a function has been covered. This is useful, for example, to detect dead code. When combined with debug info correlation [0] we are able to create an instrumented Clang binary that is only 150M (the vanilla Clang binary is 143M). That is an overhead of 7M (4.9%) compared to the default instrumentation (without value profiling) which has an overhead of 31M (21.7%). [0] https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4 Reviewed By: kyulee Differential Revision: https://reviews.llvm.org/D116180 | 4 年前 | |
[InstrProf] Add single byte coverage mode Use the llvm flag -pgo-function-entry-coverage to create single byte "counters" to track functions coverage. This mode has significantly less size overhead in both code and data because * We mark a function as "covered" with a store instead of an increment which generally requires fewer assembly instructions * We use a single byte per function rather than 8 bytes per block The trade off of course is that this mode only tells you if a function has been covered. This is useful, for example, to detect dead code. When combined with debug info correlation [0] we are able to create an instrumented Clang binary that is only 150M (the vanilla Clang binary is 143M). That is an overhead of 7M (4.9%) compared to the default instrumentation (without value profiling) which has an overhead of 31M (21.7%). [0] https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4 Reviewed By: kyulee Differential Revision: https://reviews.llvm.org/D116180 | 4 年前 | |
[gcov] Add __gcov_dump/__gcov_reset and delete __gcov_flush GCC r187297 (2012-05) introduced __gcov_dump and __gcov_reset. __gcov_flush = __gcov_dump + __gcov_reset The resolution to https://gcc.gnu.org/PR93623 ("No need to dump gcdas when forking" target GCC 11.0) removed the unuseful and undocumented __gcov_flush. Close PR38064. Reviewed By: calixte, serge-sans-paille Differential Revision: https://reviews.llvm.org/D83149 | 5 年前 | |
Simplify instrprof-dlopen-dlclose-gcov.test to avoid failures on Aarch64. 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 | 7 年前 | |
Simplify instrprof-dlopen-dlclose-gcov.test to avoid failures on Aarch64. 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 | 7 年前 | |
Simplify instrprof-dlopen-dlclose-gcov.test to avoid failures on Aarch64. 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 | 7 年前 | |
profile: add logging on failure Add logging to report any failures that may occur on calls to libdl. Without this, it is difficult to identify the actual problem if the test fails. llvm-svn: 209097 | 11 年前 | |
[test] Update coverage tests to sync up with r278152 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 | 9 年前 | |
profile: Fix link errors in this test on darwin llvm-svn: 238622 | 10 年前 | |
profile: Fix link errors in this test on darwin llvm-svn: 238622 | 10 年前 | |
profile: Fix link errors in this test on darwin llvm-svn: 238622 | 10 年前 | |
[profile] Fix test to bail on failed waitpid in instrprof-file_ex.c This resolves PR28066. Patch by David Binderman! llvm-svn: 272268 | 9 年前 | |
[gcov] Add a test showing differences in line counts when building with or without exceptions enabled. Test for https://bugs.llvm.org/show_bug.cgi?id=38066. llvm-svn: 337174 | 7 年前 | |
[InstrProf] Port test suite to Windows 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 | 7 年前 | |
Add a test with multiple BBs on the same line Test for https://bugs.llvm.org/show_bug.cgi?id=38065. llvm-svn: 336996 | 7 年前 | |
[llvm-cov gcov] Compute unmeasured arc counts by Kirchhoff's circuit law For a CFG G=(V,E), Knuth describes that by Kirchoff's circuit law, the minimum number of counters necessary is |E|-(|V|-1). The emitted edges form a spanning tree. libgcov emitted .gcda files leverages this optimization while clang --coverage's doesn't. Propagate counts by Kirchhoff's circuit law so that llvm-cov gcov can correctly print line counts of gcc --coverage emitted files and enable the future improvement of clang --coverage. | 5 年前 | |
[compiler-rt] Reduce the number of threads in gcov test to avoid failure 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 | 6 年前 | |
[GCOV] Add a test for function defined on one line (follow-up of 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 | 7 年前 | |
[InstrProf] Port test suite to Windows 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 | 7 年前 | |
Fix simultaneous .gcda creation The intent of the llvm_gcda_start_file function is that only one process create the .gcda file and initialize it to be updated by other processes later. Before this change, if multiple processes are started simultaneously, some of them may initialize the file because both the first and second open calls may succeed in a race condition and new_file becomes 1 in those processes. This leads incorrect coverage counter values. This often happens in MPI (Message Passing Interface) programs. The test program added in this change is a simple reproducer. This change ensures only one process creates/initializes the file by using the O_EXCL flag. Differential Revision: https://reviews.llvm.org/D76206 | 6 年前 | |
Fix simultaneous .gcda creation The intent of the llvm_gcda_start_file function is that only one process create the .gcda file and initialize it to be updated by other processes later. Before this change, if multiple processes are started simultaneously, some of them may initialize the file because both the first and second open calls may succeed in a race condition and new_file becomes 1 in those processes. This leads incorrect coverage counter values. This often happens in MPI (Message Passing Interface) programs. The test program added in this change is a simple reproducer. This change ensures only one process creates/initializes the file by using the O_EXCL flag. Differential Revision: https://reviews.llvm.org/D76206 | 6 年前 | |
[gcov] Add tests using switch, one with break clauses and one with fallthrough llvm-svn: 338453 | 7 年前 | |
[InstrProf] Port test suite to Windows 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 | 7 年前 | |
[gcov] Add tests using switch, one with break clauses and one with fallthrough llvm-svn: 338453 | 7 年前 | |
[InstrProf] Port test suite to Windows 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 | 7 年前 | |
[profile] Do not cache __llvm_profile_get_filename result 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 | 6 年前 | |
[profile] Add end-end test of vp for inline virtual functions 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 | 9 年前 | |
compiler-rt: Rename remaining cc files in test/profile to cpp See r367803 and similar other changes. llvm-svn: 367858 | 6 年前 | |
compiler-rt: Rename remaining cc files in test/profile to cpp See r367803 and similar other changes. llvm-svn: 367858 | 6 年前 | |
Fix a minor bug in test llvm-svn: 263028 | 10 年前 | |
[profile][test] Fix Profile-* :: instrprof-merge.c etc. on SPARC 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 | 6 年前 | |
Reland compiler-rt support for order file instrumentation. 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 | 7 年前 | |
Reland compiler-rt support for order file instrumentation. 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 | 7 年前 | |
[PGO] Ensure profile section symbols are created (linux) - This is to handle a corner case where profile lib is linked in but non of the modules are instrumented (On linux, since we avoided the overhead to emit runtime hook use functions so this is the side effect of that size optimization). - Added a profile runtime test case to cover all scenarios of shared library builds. Differential Revision: http://reviews.llvm.org/D14468 llvm-svn: 253098 | 10 年前 | |
[InstrProf] Port test suite to Windows 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 | 7 年前 | |
[PGO] Ensure profile section symbols are created (linux) - This is to handle a corner case where profile lib is linked in but non of the modules are instrumented (On linux, since we avoided the overhead to emit runtime hook use functions so this is the side effect of that size optimization). - Added a profile runtime test case to cover all scenarios of shared library builds. Differential Revision: http://reviews.llvm.org/D14468 llvm-svn: 253098 | 10 年前 | |
[InstrProf] Port test suite to Windows 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 | 7 年前 | |
[profile] entry eviction support in value profiler Differential revision: http://reviews.llvm.org/D20408 llvm-svn: 270141 | 9 年前 | |
Add missing test case changes llvm-svn: 270930 | 9 年前 | |
Set hidden attribute on lprofMergeValueProfData 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 | 7 年前 |