search for: __llvm_prf_data

Displaying 20 results from an estimated 26 matches for "__llvm_prf_data".

2017 Jun 27
3
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
...t; You can speed up "make check" a bit by using non-instrumented versions > of count, not, FileCheck, etc. I tried looking into this a bit more. It looks like the profile data file generated by llc contains approximately 5MB of counters (__llvm_prf_cnts), 10MB of "data" (__llvm_prf_data), and 70MB of __llvm_prf_names. __llvm_prf_data and __llvm_prf_names contain which can be read from the original binary, as far as I can tell. The 80MB of data wouldn't be a big deal if it were just sitting on disk... but we also erase the whole file and rewrite it from scratch after we me...
2017 Jun 27
2
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
..." a bit by using non-instrumented >> versions of count, not, FileCheck, etc. > > I tried looking into this a bit more. It looks like the profile > data file generated by llc contains approximately 5MB of counters > (__llvm_prf_cnts), 10MB of "data" (__llvm_prf_data), and 70MB of > __llvm_prf_names. __llvm_prf_data and __llvm_prf_names contain > which can be read from the original binary, as far as I can tell. > The 80MB of data wouldn't be a big deal if it were just sitting on > disk... but we also erase the whole file and rewr...
2019 Sep 17
2
PGO is ineffective for Rust - but why?
Interestingly, a C version of the same test program [1] compiled with Clang 8 does not have any problems with GNU ld: The `__llvm_prf_data` section is the same size for all three linkers. It must be something specific to the Rust compiler that's going wrong here. [1] https://github.com/michaelwoerister/rust-pgo-test-programs/tree/master/cpp_branch_weights On Tue, Sep 17, 2019 at 3:26 PM Michael Woerister <mwoerister at mozill...
2017 Jul 25
2
PGO, zlib and 'default.profraw'
...ey are both built with ‘zlib’ enabled or ‘zlib’ disabled. On Windows with VS2015 there is no ‘zlib’. But I think that there is something different causing the problem, possibly in the linking. When profiling instrumentation is enabled, there are 4 new sections introduced: __llvm_prf_cnts __llvm_prf_data __llvm_prf_names __llvm_prf_vnds Since our target is an heterogeneous multi-core embedded system, it requires the use of some elaborate linking techniques, and the LD scripts are carefully crafted for this purpose. We use ‘ld’ from Binutils v2.28. However, I do not know what these new secti...
2020 Sep 09
2
Code Coverage Compile Issue LLVM 10
Hello, I recently updated LLVM from version 6.0.0 to 10.0.0. I see the following issue when I compile an application only with code coverage compiler options. Thes issue does not appear in any other build type. *...:(__llvm_prf_data[__profv__**ZNK4llvm3cfg6UpdateIPNS_**10BasicBlockEE4dumpEv]+0x18): **undefined reference to `llvm::cfg::Update<llvm::**BasicBlock*>::dump() const'* I see this issue only when I compile the app with the following compiler options: *-g -O2 -fprofile-instr-generate -fcoverage-mapping* I d...
2017 Jun 27
2
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
...ented versions >>> of count, not, FileCheck, etc. >>> >>> >>> I tried looking into this a bit more. It looks like the profile data >>> file generated by llc contains approximately 5MB of counters >>> (__llvm_prf_cnts), 10MB of "data" (__llvm_prf_data), and 70MB of >>> __llvm_prf_names. __llvm_prf_data and __llvm_prf_names contain which can >>> be read from the original binary, as far as I can tell. The 80MB of data >>> wouldn't be a big deal if it were just sitting on disk... but we also erase >>> the w...
2019 Sep 24
3
PGO is ineffective for Rust - but why?
...ere: https://bugs.llvm.org/show_bug.cgi?id=25286 > > On Tue, Sep 17, 2019 at 8:39 AM Michael Woerister <mwoerister at mozilla.com> wrote: >> >> Interestingly, a C version of the same test program [1] compiled with >> Clang 8 does not have any problems with GNU ld: The `__llvm_prf_data` >> section is the same size for all three linkers. It must be something >> specific to the Rust compiler that's going wrong here. >> >> [1] https://github.com/michaelwoerister/rust-pgo-test-programs/tree/master/cpp_branch_weights >> >> On Tue, Sep 17, 2019 a...
2017 Jun 27
4
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
...p "make check" a bit by using non-instrumented versions of count, not, FileCheck, etc. >>> >>> I tried looking into this a bit more. It looks like the profile data file generated by llc contains approximately 5MB of counters (__llvm_prf_cnts), 10MB of "data" (__llvm_prf_data), and 70MB of __llvm_prf_names. __llvm_prf_data and __llvm_prf_names contain which can be read from the original binary, as far as I can tell. The 80MB of data wouldn't be a big deal if it were just sitting on disk... but we also erase the whole file and rewrite it from scratch after we merge...
2019 Sep 16
2
PGO is ineffective for Rust - but why?
Can you clarify if performance difference is caused by using different linkers at instrumentation build? If that is the case, try dump the sections of the resulting binary and compare __llvm_prf_** sections. Also check the arguments passed to the linker. It should have -u__llvm_profile_runtime to force the profile runtime to be linked in. David On Mon, Sep 16, 2019 at 8:42 AM Michael
2017 Dec 20
2
Question about : lprofValueProfNodes
...tive is to implement PGO and code coverage on a system that does not exit and does not have any file io, or any of stdc libraries that libclang-profile is using. (more like a kernel) So what I’m trying to do is instead of calling __llvm_profile_write_file () from the application, read the sections __llvm_prf_data, __llvm_prf_names, __llvm_prf_cnts and __llvm_prf_vnds after the critical tasks are done and transfer them to outside of the system. Then dump these sections in a char * array in a c file and attribute them to be in the associated section. Then compile that file with –u__llvm_profile_runtime to cr...
2018 Mar 13
1
Profiling Support for BareMetal Target
.../llvm-dev/2017-September/117156.html I am using clang 4.0.1 and compiler-rt 4.0 release 1. I made changes in the LCF to mimic Linux Platform (for linker magic) In data section i have added: __start___llvm_prf_cnts = .; KEEP(*(__llvm_prf_cnts)) __stop___llvm_prf_cnts = .; __start___llvm_prf_data = .; KEEP(*(__llvm_prf_data)) __stop___llvm_prf_data = .; __start___llvm_prf_names = .; KEEP(*(__llvm_prf_names)) __stop___llvm_prf_names = .; __start___llvm_prf_vnds = .; KEEP(*(__llvm_prf_vnds)) __stop___llvm_prf_vnds = .; 2. Since there are not .ctors or atexit a...
2014 Feb 21
12
[LLVMdev] asan coverage
> > > > We may need some additional info. What kind of additional info? > I haven't put a ton of thought into > this, but I'm hoping we can either (a) use debug info as is or add some > extra (valid) debug info to support this, or (b) add an extra > debug-info-like section to instrumented binaries with the information we > need. > I'd try this data
2017 Dec 20
2
Question about : lprofValueProfNodes
...PGO and code coverage on a system that does > not exit and does not have any file io, or any of stdc libraries that > libclang-profile is using. (more like a kernel) > So what I’m trying to do is instead of calling __llvm_profile_write_file > () from the application, read the sections __llvm_prf_data, > __llvm_prf_names, __llvm_prf_cnts and __llvm_prf_vnds after the critical > tasks are done and transfer them to outside of the system. > > > You may already have worked this out, but for completeness I'll mention > that this is typically done by: > 1. Allocating a buffer...
2017 Sep 06
5
Using source-based code coverage on baremetal
...to write out the profile data yourself.  We used __llvm_profile_get_size_for_buffer() and __llvm_profile_write_buf() for this (and semihosting APIs to transfer the resulting buffer to the host). 3. Then, you have to edit your linker script to include the necessary sections.  __llvm_prf_names, __llvm_prf_data, and __llvm_prf_cnts need to be included in the final image.  And __llvm_covmap needs to be in a non-allocatable section in the ELF output.  And depending on how your linker behaves, you might need to explicitly mark all of these sections KEEP so parts don't get dropped.  This is actually t...
2019 Jan 24
2
答复: 答复: How to add new arch for llvm-cov show?
...vide this e_machine information to compiler). 2. New error was “Failed to load coverage: No coverage data found” since the compiler cannot get NamesSection(at loadBinaryFormat in CoverageMappingReader.cpp). I thought it was my ldscript problem because I put __llvm_prf_names, __llvm_prf_cnts, __llvm_prf_data and __llvm_prf_vnds inside .rodata section. Compiler checked .rodata but not things inside .rodata. What’s the right position to put these 4 __llvm_prf_* sections? Best, Ruobin. 发件人: vsk at apple.com [mailto:vsk at apple.com] 代表 Vedant Kumar 发送时间: 2019年1月24日 0:12 收件人: xuruobin <xuruobin at hua...
2019 Jan 25
2
答复: How to add new arch for llvm-cov show?
...AsString(getHeader()->e_machine, Type); 2. New error was “Failed to load coverage: No coverage data found” since the compiler cannot get NamesSection(at loadBinaryFormat in CoverageMappingReader.cpp). I thought it was my ldscript problem because I put __llvm_prf_names, __llvm_prf_cnts, __llvm_prf_data and __llvm_prf_vnds inside .rodata section. Compiler checked .rodata but not things inside .rodata. What’s the right position to put these 4 __llvm_prf_* sections? I’m not sure what changed, exactly, between the point you encountered the last error and this one. Could you elaborate? This is just...
2019 Jan 23
3
答复: How to add new arch for llvm-cov show?
Hi vedant, The program didn't pass the checking "OF->getArch() != Triple(Arch).getArch()" loadBinaryFormat in CoverageMappingReader.cpp and returned an error. It's because "OF->getArch()" returned null and "Triple(Arch).getArch()" returned XXXX(name of my arch). The returned value of " OF->getArch()" is decided by "
2017 Jun 19
3
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
On 6/18/2017 3:51 PM, Vedant Kumar wrote: >> My experience: >> >> 1. You have to specify -DLLVM_USE_LINKER=gold (or maybe lld works; I >> didn't try). If you link with binutils ld, the program will generate >> broken profile information. Apparently, the linked binary is missing >> the __llvm_prf_names section. This took me half a day to figure out.
2017 Jul 18
2
PGO, zlib and 'default.profraw'
set LLVM_ENABLE_ZLIB=ON with cmake invocation. zlib should be installed and zlib.h header file needs to be in the header search path. Is your llvm-profdata tool built together with clang? David On Tue, Jul 18, 2017 at 1:04 PM, Martin J. O'Riordan via llvm-dev < llvm-dev at lists.llvm.org> wrote: > How can I build the profile reader with ZLIB support enabled? I configure > and
2017 Dec 19
3
Question about : lprofValueProfNodes
Hi This array is defined in compiler-rt: InstrProfilingValue.c but I can’t find where it is used? And the comment on it does not say much about why we need it either. Can someone explain why we need this and where it is used? /* A shared static pool in addition to the vnodes statically * allocated by the compiler. */ COMPILER_RT_VISIBILITY ValueProfNode