search for: __llvm_prf_cnts

Displaying 20 results from an estimated 21 matches for "__llvm_prf_cnts".

2017 Jun 27
3
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
...ot so bad for other >> cases. > > 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...
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 Jun 27
2
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....
2017 Dec 20
2
Question about : lprofValueProfNodes
...overage 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 create an executable that calls __llv...
2017 Jul 25
2
PGO, zlib and 'default.profraw'
...in any event, they 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 wha...
2018 Mar 13
1
Profiling Support for BareMetal Target
...sts.llvm.org/pipermail/llvm-dev/2017-September/117339.html and http://lists.llvm.org/pipermail/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(...
2017 Dec 20
2
Question about : lprofValueProfNodes
...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 big enough to contain all the data >...
2017 Jun 27
2
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
...;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...
2017 Sep 06
5
Using source-based code coverage on baremetal
...file 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 the trickiest part, i...
2017 Jun 27
4
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 fil...
2019 Jan 24
2
答复: 答复: How to add new arch for llvm-cov show?
...ght it was MC provide 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 &l...
2019 Jan 25
2
答复: How to add new arch for llvm-cov show?
...urn getDynamicTagAsString(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 elaborat...
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 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
2019 May 16
2
How data is laid out in default.profraw when doing profiling?
Hi all, I'm now working on llvm-cov for a new target and have a problem here. Because of some reasons, users do not stub in the main function and after running elf file, they cannot get a default profraw. Now they want to construct a default profraw manually but don't know how data is laid out in `default profraw` file. We found a struct ProfDataIOVec in InstrProfilingWriter.c in
2017 Sep 11
2
Using source-based code coverage on baremetal
...embedded bare-metal target. Recently we implemented support for just the '-fprofile-instr-generate' option and the 'compiler-rt/lib/profile' sources, and added the following to our LD scripts: /* Append the LLVM profiling sections */ . = ALIGN(4); PROVIDE(__start___llvm_prf_cnts = .); *(__llvm_prf_cnts) PROVIDE(__stop___llvm_prf_cnts = .); . = ALIGN(4); PROVIDE(__start___llvm_prf_data = .); *(__llvm_prf_data) PROVIDE(__stop___llvm_prf_data = .); . = ALIGN(4); PROVIDE(__start___llvm_prf_names = .); *(__llvm_prf_names)...
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.
2015 Aug 08
3
RFC: PGO Late instrumentation for LLVM
...83.57% 64.37% 252.eon 72.06% 91.22% 30.02% ---------------------------------------- Geomean 66.50% 76.36% 47.01% For FE based instrumentation, profile count variables generated for the dead functions will not be removed (like __llvm_prf_names, __llvm_prf_data, and __llvm_prf_cnts) from the data/text segment, nor in the result profile. There is a recent patch that removes these unused data for COMDAT functions, but that patch won’t touch regular functions. This is the main reason for the larger number of instrumented functions and larger profile file size for the FE based in...
2015 Aug 08
2
RFC: PGO Late instrumentation for LLVM
...>> ---------------------------------------- >> Geomean 66.50% 76.36% 47.01% >> >> >> For FE based instrumentation, profile count variables generated for the >> dead functions will not be removed (like __llvm_prf_names, __llvm_prf_data, >> and __llvm_prf_cnts) from the data/text segment, nor in the result >> profile. There is a recent patch that removes these unused data for COMDAT >> functions, but that patch won’t touch regular functions. This is the main >> reason for the larger number of instrumented functions and larger profile &g...