AAndi-Bogdan Postelnicu[Compiler-RT] Remove FlushViewOfFile call when unmapping gcda files on win32.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[compiler-rt] Silence warnings when building with MSVC Differential Revision: https://reviews.llvm.org/D116872 | 4 年前 | |
[Compiler-RT] Remove FlushViewOfFile call when unmapping gcda files on win32. This patch was pushed for calixte@mozilla.com - this function (Windows only) is called when gcda are dumped on disk; - according to its documentation, it's only useful in case of hard failures, this is highly improbable; - it drastically decreases the time in the tests and consequently it avoids timeouts when we use slow disks. Differential Revision: https://reviews.llvm.org/D129128 | 3 年前 | |
Giving a lot more functions prototypes; NFC This should address https://lab.llvm.org/buildbot/#/builders/37/builds/12315 and speculatively fix other similar diagnostics. | 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 年前 | |
[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 年前 | |
Giving a lot more functions prototypes; NFC This should address https://lab.llvm.org/buildbot/#/builders/37/builds/12315 and speculatively fix other similar diagnostics. | 4 年前 | |
Giving a lot more functions prototypes; NFC This should address https://lab.llvm.org/buildbot/#/builders/37/builds/12315 and speculatively fix other similar diagnostics. | 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 年前 | |
Giving a lot more functions prototypes; NFC This should address https://lab.llvm.org/buildbot/#/builders/37/builds/12315 and speculatively fix other similar diagnostics. | 4 年前 | |
Reland "[CMake] Support installation of InstrProfData.inc" This header fragment is useful on its own for any consumer that wants to use custom instruction profile runtime with the LLVM instrumentation. The concrete use case is in Fuchsia's kernel where we want to use instruction profile instrumentation, but we cannot use the compiler-rt runtime because it's not designed for use in the kernel environment. This change allows installing this header as part of compiler-rt. Differential Revision: https://reviews.llvm.org/D64532 | 6 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[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 年前 | |
Giving a lot more functions prototypes; NFC This should address https://lab.llvm.org/buildbot/#/builders/37/builds/12315 and speculatively fix other similar diagnostics. | 4 年前 | |
[AIX][PGO] Enable linux style PGO on AIX This patch switches the PGO implementation on AIX from using the runtime registration-based section tracking to the __start_SECNAME/__stop_SECNAME based. In order to enable the recognition of __start_SECNAME/__stop_SECNAME symbols in the AIX linker, the -bdbg:namedsects:ss needs to be used. Reviewed By: jsji, MaskRay, davidxl Differential Revision: https://reviews.llvm.org/D124857 | 4 年前 | |
[AIX][PGO] Enable linux style PGO on AIX This patch switches the PGO implementation on AIX from using the runtime registration-based section tracking to the __start_SECNAME/__stop_SECNAME based. In order to enable the recognition of __start_SECNAME/__stop_SECNAME symbols in the AIX linker, the -bdbg:namedsects:ss needs to be used. Reviewed By: jsji, MaskRay, davidxl Differential Revision: https://reviews.llvm.org/D124857 | 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 年前 | |
[profile] Add __attribute__((used)) to zero size dummy sections D14468 added these dummy sections. This patch adds __attribute__((used)) so that when compiled by GCC>=11 or (expected, D96838) Clang>=13 on some ELF platforms, these sections will get SHF_GNU_RETAIN to make sure they will not be discarded by ld --gc-sections. We are trying to get rid of LLD's "__start_/__stop_ references retain C identifier name sections" rule. If LLD drops the rule in the future (we will retain compatibility for __llvm_prf_* for a while), __llvm_prf_* will need to have the SHF_GNU_RETAIN flag, otherwise: // __llvm_prf_cnts/__llvm_prf_data usually exist, but {names,vnds} may not exist. // Such diagnostics will happen with {cnts,data} as well if no input object file is instrumented. % clang++ -fprofile-generate a.cc -fuse-ld=lld -Wl,--gc-sections ld.lld: error: undefined hidden symbol: __start___llvm_prf_names >>> referenced by InstrProfilingPlatformLinux.c >>> InstrProfilingPlatformLinux.c.o:(__llvm_profile_begin_names) in archive /tmp/RelA/lib/clang/13.0.0/lib/linux/libclang_rt.profile-x86_64.a ... Differential Revision: https://reviews.llvm.org/D96902 | 5 年前 | |
[profile] Make atexit hook a no-op on Fuchsia On Fuchsia, we always use the continuous mode with runtime counter relocation, so there's no need for atexit hook or support for dumping the profile manually. Differential Revision: https://reviews.llvm.org/D76556 | 6 年前 | |
[InstrProf] Stop exporting lprofDirMode This symbol should not be exposed and doesn't need to be. Differential revision: https://reviews.llvm.org/D126548 | 4 年前 | |
[Profile][NFC] Clean up initializeProfileForContinuousMode Merge two versions of initializeProfileForContinuousMode function into one. Differential Revision: https://reviews.llvm.org/D107591 | 4 年前 | |
Giving a lot more functions prototypes; NFC This should address https://lab.llvm.org/buildbot/#/builders/37/builds/12315 and speculatively fix other similar diagnostics. | 4 年前 | |
[compiler-rt/profile] Reland mark __llvm_profile_raw_version as hidden Since libclang_rt.profile is added later in the command line, a definition of __llvm_profile_raw_version is not included if it is provided from an earlier object, e.g. from a shared dependency. This causes an extra dependence edge where if libA.so depends on libB.so and both are coverage-instrumented, libA.so uses libB.so's definition of __llvm_profile_raw_version. This leads to a runtime link failure if the libB.so available at runtime does not provide this symbol (but provides the other dependent symbols). Such a scenario can occur in Android's mainline modules. E.g.: ld -o libB.so libclang_rt.profile-x86_64.a ld -o libA.so -l B libclang_rt.profile-x86_64.a libB.so has a global definition of __llvm_profile_raw_version. libA.so uses libB.so's definition of __llvm_profile_raw_version. At runtime, libB.so may not be coverage-instrumented (i.e. not export __llvm_profile_raw_version) so runtime linking of libA.so will fail. Marking this symbol as hidden forces each binary to use the definition of __llvm_profile_raw_version from libclang_rt.profile. The visiblity is unchanged for Apple platforms where its presence is checked by the TAPI tool. Reviewed By: MaskRay, phosek, davidxl Differential Revision: https://reviews.llvm.org/D111759 | 4 年前 | |
[InstrProf] Restore InstrProfData.inc to fix Fuchsia builds https://reviews.llvm.org/D116179 introduced some changes to InstrProfData.inc which broke some downstream builds. This commit reverts those changes since they only changes two field names. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D117631 | 4 年前 | |
[profile] Decommit memory after counter relocation After we relocate counters, we no longer need to keep the original copy around so we can return the memory back to the operating system. Differential Revision: https://reviews.llvm.org/D104839 | 4 年前 | |
[profile] Decommit memory after counter relocation After we relocate counters, we no longer need to keep the original copy around so we can return the memory back to the operating system. Differential Revision: https://reviews.llvm.org/D104839 | 4 年前 |