search for: instrprofiling

Displaying 14 results from an estimated 14 matches for "instrprofiling".

2015 May 20
2
[LLVMdev] why is coverage map and profile names mixed?
Hi I'm referencing the method: Lib/Transforms/Instrumentation/InstrProfiling.cpp:InstrProfiling::lowerCoverageData() At the end of the function, why is the variable being placed in __llvm_prf_names section? Shouldn't it be placed in __llvm_covmap section? Thanks Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.or...
2014 Mar 12
2
[LLVMdev] RFC: Instrumentation based profiling file libraries
The frontend-driven instrumentation based profiling used for clang's -fprofile-instr-generate and -fprofile-instr-use currently has logic for handling its data format spread about a few different places: 1. Reading files is done in clang when -fprofile-instr-use is specified. The logic is in CodeGen/CodeGenPGO.cpp. 2. Reading files is done by the (very preliminary) llvm-profdata tool,
2017 Sep 06
5
Using source-based code coverage on baremetal
...nd symbols to find the sections, rather than .init code.  This isn't strictly necessary, but our linker supports __start and __end, and this was easier than changing the baremetal image to handle a .init section.  See needsRuntimeRegistrationOfSectionRange in lib/Transforms/Instrumentation/InstrProfiling.cpp; we currently only whitelist a few platforms.  Not sure what would be appropriate here; maybe we could assume any *-none-* triple supports __start and __end symbols?  Or maybe control it with a flag somehow? Or something else I'm not thinking of? Other problem areas: 1. We turned valu...
2019 Jan 17
2
[RFC] Order File Instrumentation
...e the edge profiling counters >> defined? >> > > There is no needed to define the counter explicitly. What is needed is to > introduce a new intrinsic to update the order counter, and the InstProf > lowerer will create the counter for you. See > Transforms/Instrumentation/InstrProfiling.cpp. +Vedant Kumar > <vsk at apple.com> > We need the instrumentation to be run late as an IR pass, so it has all the function symbols. Are you suggesting a front-end instrumentation by mentioning InstrProfiling.cpp? > > >> So the difference will be where we store the p...
2017 Jun 27
4
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
...g coverage shouldn't increase the name section size much. I only see one place where this happens, and it's relatively cold: http://lab.llvm.org:8080/coverage/coverage-reports/llvm/coverage/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R at 2/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp.html#L512 <http://lab.llvm.org:8080/coverage/coverage-reports/llvm/coverage/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R at 2/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp.html#L512> > On Jun 27, 2017, at 2:40 PM, Friedman, Eli <efriedma at codeaurora.org&...
2015 Feb 10
3
[LLVMdev] Coverage mapping issue: Malformed profile data
Hi all! It seems I came across on issue with coverage mapping (http://www.llvm.org/docs/CoverageMappingFormat.html) check on: llvm revision: r228136 clang Last Changed Rev: 228121 build: Debug+Asserts OS: ubuntu 14.04 Here is simple snippets test1.c: NOT OK ================== #include <stdio.h> static int foo() { return 42; } int main() { return 0; } ================== cp src/test1.c
2019 Jan 17
2
[RFC] Order File Instrumentation
On Thu, Jan 17, 2019 at 10:53 AM Xinliang David Li <davidxl at google.com> wrote: > Hi Manman, > > Ordering profiling is certainly something very useful to have to startup > time performance. GCC has something similar. > > In terms of implementation, it is possible to simply extend the edge > profiling counters by 1 for each function, and instrument the function to >
2017 Sep 11
2
Using source-based code coverage on baremetal
...ALIGN(4); PROVIDE(__start___llvm_prf_vnds = .); *(__llvm_prf_vnds) PROVIDE(__stop___llvm_prf_vnds = .); This removed the need for the '.ctors' model for registering functions (which also reduces the run-time cost) and enabled our target to use the model described in 'InstrProfilingPlatformLinux.cpp' instead of 'InstrProfilingPlatformOther.cpp', adding our triple to 'lib/Transforms/Instrumentation/InstrProfiling.cpp'. We use Newlib for our LibC so we have a reasonably complete ISO C library, but we do not have a file-system so the FILE based I/O cannot wor...
2017 Jun 27
2
My experience using -DLLVM_BUILD_INSTRUMENTED_COVERAGE to generate coverage
I had an old build of llc with FE instrumentation, the name section size is about 5MB. Using coverage is likely to cause the name section to be larger as there are more references to dead/unused function names. What do you see when readelf --string-dump=__llvm_prf_names llc David On Tue, Jun 27, 2017 at 2:23 PM, Xinliang David Li <davidxl at google.com> wrote: > > > On Tue,
2017 Oct 24
7
Code coverage BoF - notes and updates
...y're lowered. Just to recap: the frontend emits calls to the llvm.instrprof_increment intrinsic to implement counter updates. Each increment intrinsic is passed a function name and a counter index (there's a mapping between AST nodes and counter indices). The intrinsics are lowered in the InstrProfiling pass. During lowering, an array of uint64_t counters is created for each function, and the intrinsic calls are replaced by a load-add-store pattern. Frontend counter updates can look highly redundant because of inlining. It's common to see single basic blocks with tens of distinct counter upda...
2017 Sep 11
2
Building LLVM's fuzzers
...sts for this, only > compiler-rt tests) but please also check if this looks ok. This looks fine, though I'd rather if we just did it on all platforms for consistency / clear semantic intent. Running appendToUsed once should be cheap, and we do it unguarded in our other instrumentation (like InstrProfiling.cpp). > But this all still sounds bad on linux at least: > * with the old bfd linker and -ffunction-sections -Wl,-gc-sections these > arrays get removed (as discussed here) This is sad, and I don't think we have any particularly good ideas to fix this. > * with newer link...
2017 Oct 24
2
Code coverage BoF - notes and updates
...>> >> Just to recap: the frontend emits calls to the llvm.instrprof_increment intrinsic to implement counter updates. Each increment intrinsic is passed a function name and a counter index (there's a mapping between AST nodes and counter indices). The intrinsics are lowered in the InstrProfiling pass. During lowering, an array of uint64_t counters is created for each function, and the intrinsic calls are replaced by a load-add-store pattern. >> >> Frontend counter updates can look highly redundant because of inlining. It's common to see single basic blocks with tens of dis...
2017 Aug 25
2
Building LLVM's fuzzers
On Thu, Aug 24, 2017 at 6:30 PM, Justin Bogner <mail at justinbogner.com> wrote: > Peter Collingbourne <peter at pcc.me.uk> writes: > > On Thu, Aug 24, 2017 at 3:38 PM, Kostya Serebryany <kcc at google.com> > wrote: > > > >> > >> > >> On Thu, Aug 24, 2017 at 3:35 PM, Peter Collingbourne <peter at pcc.me.uk> > >> wrote:
2015 Jul 29
1
[LLVMdev] Error when i am using command make -j4 command in cygwin to compile safecode
...cpp for Release+Asserts build llvm[3]: Compiling FastISel.cpp for Release+Asserts build llvm[2]: Compiling CaptureTracking.cpp for Release+Asserts build llvm[3]: Compiling CmpInstAnalysis.cpp for Release+Asserts build llvm[3]: Compiling CodeExtractor.cpp for Release+Asserts build llvm[3]: Compiling InstrProfiling.cpp for Release+Asserts build llvm[2]: Compiling CodeMetrics.cpp for Release+Asserts build llvm[3]: Compiling Instrumentation.cpp for Release+Asserts build llvm[2]: Compiling ConstantFolding.cpp for Release+Asserts build llvm[3]: Compiling MemorySanitizer.cpp for Release+Asserts build llvm[3]: Comp...