| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Revert "[compiler-rt][Profile] Disable test on Arm/AArch64 Linux" This reverts commit 8b86f8a3256a59cbaa12858cb0842025d48f549f. The inconsistent behaviour has been fixed with 5e50d3073a5ead122a731580ded3f1cb3c21ee54. | 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 年前 | |
[Profile] Add -no-opaque-pointers to IR tests (NFC) The output differs slightly with opaque pointers (no GEP constexpr), add -no-opaque-pointers for now. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
[InstrProfiling] Delete linkage/visibility toggling for Windows The linkage/visibility of __profn_* variables are derived from the profiled functions. extern_weak => linkonce available_externally => linkonce_odr internal => private extern => private _ => unchanged The linkage/visibility of __profc_*/__profd_* variables are derived from __profn_* with linkage/visibility wrestling for Windows. The changes can be folded to the following without changing semantics. if (TT.isOSBinFormatCOFF() && !NeedComdat) { Linkage = GlobalValue::InternalLinkage; Visibility = GlobalValue::DefaultVisibility; } That said, I think we can just delete the code block. An extern/internal function will now use private __profc_*/__profd_* variables, instead of internal ones. This saves some symbol table entries. A non-comdat {linkonce,weak}_odr function will now use hidden external __profc_*/__profd_* variables instead of internal ones. There is potential object file size increase because such symbols need /INCLUDE: directives. However such non-comdat functions are rare (note that non-comdat weak definitions don't prevent duplicate definition error). The behavior changes match ELF. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D103355 | 5 年前 | |
[CMake][profile] Don't use TARGET lld to avoid ordering issues Depending on the order in which lld and compiler-rt projects are processed by CMake, TARGET lld might evaluate to TRUE or FALSE even though lld-available lit stanza is always set because lld is being built. We check whether lld project is enabled instead which is used by other compiler-rt tests. The ideal solution here would be to use CMake generator expressions, but those cannot be used for dependencies yet, see: https://gitlab.kitware.com/cmake/cmake/-/issues/19467 Differential Revision: https://reviews.llvm.org/D97256 | 5 年前 | |
[InstrProf] Use separate comdat group for data and counters Summary: I hadn't realized that instrumentation runs before inlining, so we can't use the function as the comdat group. Doing so can create relocations against discarded sections when references to discarded __profc_ variables are inlined into functions outside the function's comdat group. In the future, perhaps we should consider standardizing the comdat group names that ELF and COFF use. It will save object file size, since __profv_$sym won't appear in the symbol table again. Reviewers: xur, vsk Subscribers: eraman, hiraditya, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58737 llvm-svn: 355044 | 7 年前 | |
[test] Fix compiler-rt/test/profile/coverage_emptylines.cpp if the build directory is under /tmp llvm-cov -path-equivalence=/tmp,... is used by some checked-in coverage mapping files where the original filename is under /tmp. If the test itself produces the coverage mapping file, there is no need for /tmp. For coverage_emptylines.cpp: the source filename is under the build directory. If the build directory is under /tmp, the path mapping will make llvm-cov fail to find the file. | 5 年前 | |
[test] Fix compiler-rt/test/profile/coverage_emptylines.cpp if the build directory is under /tmp llvm-cov -path-equivalence=/tmp,... is used by some checked-in coverage mapping files where the original filename is under /tmp. If the test itself produces the coverage mapping file, there is no need for /tmp. For coverage_emptylines.cpp: the source filename is under the build directory. If the build directory is under /tmp, the path mapping will make llvm-cov fail to find the file. | 5 年前 | |
[InstrProf] Allow CSIRPGO function entry coverage The flag -fcs-profile-generate for enabling CSIRPGO moves the pass pgo-instrumentation after inlining. Function entry coverage works fine with this change, so remove the assert. I had originally left this assert in because I had not tested this at the time. Reviewed By: davidxl, MaskRay Differential Revision: https://reviews.llvm.org/D129407 | 3 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
[profile] Eliminate dynamic memory allocation for buffered writer With this change, dynamic memory allocation is only used for testing purpose. This change is one of the many steps to make instrument profiler dynamic allocation free. llvm-svn: 269453 | 9 年前 | |
[InstrProf] Allow CSIRPGO function entry coverage The flag -fcs-profile-generate for enabling CSIRPGO moves the pass pgo-instrumentation after inlining. Function entry coverage works fine with this change, so remove the assert. I had originally left this assert in because I had not tested this at the time. Reviewed By: davidxl, MaskRay Differential Revision: https://reviews.llvm.org/D129407 | 3 年前 | |
[profile] Specify "-V" to otool to get expected test output Newer Xcode toolchains ship a new otool implementation that prints out section contents in a slightly different way than otool-classic. Specify "-V" to otool to get the expected test output. Differential Revision: https://reviews.llvm.org/D108929 | 4 年前 | |
[profile] Add explanatory comments to instrprof-darwin-exports.c, NFC | 6 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
[profile] PROF_ERR, PROF_WARN 1) Move common prefix to the macro def 2) Introduced PROF_WARN 3) Make error message unconditionally printed out. llvm-svn: 270185 | 9 年前 | |
[profile][test] Delete profraw directory so that tests are immune to format version upgrade | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
[InstrProf] Add options to profile function groups Add two options, -fprofile-function-groups=N and -fprofile-selected-function-group=i used to partition functions into N groups and only instrument the functions in group i. Similar options were added to xray in https://reviews.llvm.org/D87953 and the goal is the same; to reduce instrumented size overhead by spreading the overhead across multiple builds. Raw profiles from different groups can be added like normal using the llvm-profdata merge command. Reviewed By: ianlevesque Differential Revision: https://reviews.llvm.org/D129594 | 3 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
[profile][test] Delete profraw directory so that tests are immune to format version upgrade | 4 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
[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] Handle invalid profile data This mostly follows LLVM's InstrProfReader.cpp error handling. Previously, attempting to merge corrupted profile data would result in crashes. See https://crbug.com/1216811#c4. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D104050 | 4 年前 | |
[Coverage] Collect all function records in an object (D69471 followup) After the format change from D69471, there can be more than one section in an object that contains coverage function records. Look up each of these sections and concatenate all the records together. This re-enables the instrprof-merging.cpp test, which previously was failing on OSes which use comdats. Thanks to Jeremy Morse, who very kindly provided object files from the bot I broke to help me debug. | 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 年前 | |
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 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 | |
[compiler-rt][profile] Enable profile tests for AIX This patch enable profile test for supported options on AIX. Reviewed By: w2yehia Differential Revision: https://reviews.llvm.org/D110945 | 4 年前 | |
[compiler-rt][profile] Enable profile tests for AIX This patch enable profile test for supported options on AIX. Reviewed By: w2yehia Differential Revision: https://reviews.llvm.org/D110945 | 4 年前 | |
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 年前 | |
[profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR Add support for expanding the %t filename specifier in LLVM_PROFILE_FILE to the TMPDIR environment variable. This is supported on all platforms. On Darwin, TMPDIR is used to specify a temporary application-specific scratch directory. When testing apps on remote devices, it can be challenging for the host device to determine the correct TMPDIR, so it's helpful to have the runtime do this work. rdar://68524185 Differential Revision: https://reviews.llvm.org/D87332 | 5 年前 | |
[PGO] Don't reference functions unless value profiling is enabled This reduces the size of chrome.dll.pdb built with optimizations, coverage, and line table info from 4,690,210,816 to 2,181,128,192, which makes it possible to fit under the 4GB limit. This change can greatly reduce binary size in coverage builds, which do not need value profiling. IR PGO builds are unaffected. There is a minor behavior change for frontend PGO. PGO and coverage both use InstrProfiling to create profile data with counters. PGO records the address of each function in the __profd_ global. It is used later to map runtime function pointer values back to source-level function names. Coverage does not appear to use this information. Recording the address of every function with code coverage drastically increases code size. Consider this program: void foo(); void bar(); inline void inlineMe(int x) { if (x > 0) foo(); else bar(); } int getVal(); int main() { inlineMe(getVal()); } With code coverage, the InstrProfiling pass runs before inlining, and it captures the address of inlineMe in the __profd_ global. This greatly increases code size, because now the compiler can no longer delete trivial code. One downside to this approach is that users of frontend PGO must apply the -mllvm -enable-value-profiling flag globally in TUs that enable PGO. Otherwise, some inline virtual method addresses may not be recorded and will not be able to be promoted. My assumption is that this mllvm flag is not popular, and most frontend PGO users don't enable it. Differential Revision: https://reviews.llvm.org/D102818 | 5 年前 | |
[Profile] Test cleanup -- use new lit var for IR PGO tests /NFC llvm-svn: 276036 | 9 年前 | |
[Profile] Fix value profiler eviction bug Differential Revision: https://reviews.llvm.org/D27224 llvm-svn: 288204 | 9 年前 | |
[PGO] Don't reference functions unless value profiling is enabled This reduces the size of chrome.dll.pdb built with optimizations, coverage, and line table info from 4,690,210,816 to 2,181,128,192, which makes it possible to fit under the 4GB limit. This change can greatly reduce binary size in coverage builds, which do not need value profiling. IR PGO builds are unaffected. There is a minor behavior change for frontend PGO. PGO and coverage both use InstrProfiling to create profile data with counters. PGO records the address of each function in the __profd_ global. It is used later to map runtime function pointer values back to source-level function names. Coverage does not appear to use this information. Recording the address of every function with code coverage drastically increases code size. Consider this program: void foo(); void bar(); inline void inlineMe(int x) { if (x > 0) foo(); else bar(); } int getVal(); int main() { inlineMe(getVal()); } With code coverage, the InstrProfiling pass runs before inlining, and it captures the address of inlineMe in the __profd_ global. This greatly increases code size, because now the compiler can no longer delete trivial code. One downside to this approach is that users of frontend PGO must apply the -mllvm -enable-value-profiling flag globally in TUs that enable PGO. Otherwise, some inline virtual method addresses may not be recorded and will not be able to be promoted. My assumption is that this mllvm flag is not popular, and most frontend PGO users don't enable it. Differential Revision: https://reviews.llvm.org/D102818 | 5 年前 | |
[profile] Delete stale profiles in test/profile/instrprof-value-prof.test, NFC | 6 年前 | |
[profile] Enabled test on windows Works with D34797 | 5 年前 | |
[Profile] Handle invalid profile data This mostly follows LLVM's InstrProfReader.cpp error handling. Previously, attempting to merge corrupted profile data would result in crashes. See https://crbug.com/1216811#c4. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D104050 | 4 年前 | |
[InstrProf][NFC] Do not assume size of counter type Existing code tended to assume that counters had type uint64_t and computed size from the number of counters. Fix this code to directly compute the counters size in number of bytes where possible. When the number of counters is needed, use __llvm_profile_counter_entry_size() or getCounterTypeSize(). In a later diff these functions will depend on the profile mode. Change the meaning of DataSize and CountersSize to make them more clear. * DataSize (CountersSize) - the size of the data (counter) section in bytes. * NumData (NumCounters) - the number of data (counter) entries. Reviewed By: kyulee Differential Revision: https://reviews.llvm.org/D116179 | 4 年前 | |
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 年前 | |
Revert "Use uint64_t for branch weights instead of uint32_t" This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4. More uint64_t overflows. | 5 年前 | |
[InstrProf] Allow CSIRPGO function entry coverage The flag -fcs-profile-generate for enabling CSIRPGO moves the pass pgo-instrumentation after inlining. Function entry coverage works fine with this change, so remove the assert. I had originally left this assert in because I had not tested this at the time. Reviewed By: davidxl, MaskRay Differential Revision: https://reviews.llvm.org/D129407 | 3 年前 | |
[compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591 | 6 年前 | |
[builtins][test] Delete unneeded file headers We don't add file headers to tests. The comments are useless as well - their purpose can be easily inferred from the filenames. | 5 年前 | |
XFAIL some PGO tests on AIX until the new linker becomes publicly available. | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 9 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 9 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 4 年前 |