28 lines · plain
1The input gcov file has been generated on a little endian machine. Expect2failures on big endian systems.3 4Tests for sample profiles encoded in GCC's gcov format.5 61- Show all functions. This profile has a single main() function with several7 inlined callees.8RUN: llvm-profdata show --sample %p/Inputs/gcc-sample-profile.gcov | FileCheck %s --check-prefix=SHOW19SHOW1: Function: main: 364084, 0, 6 sampled lines10SHOW1: 2.3: inlined callee: _Z3fool: 243786, 0, 3 sampled lines11SHOW1: 1.3: inlined callee: _Z3bari: 0, 0, 2 sampled lines12SHOW1: 1.7: inlined callee: _Z3bari: 98558, 0, 2 sampled lines13SHOW1: 1.8: inlined callee: _Z3bari: 0, 0, 2 sampled lines14 152- Convert the profile to text encoding and check that they are both16 identical.17RUN: llvm-profdata merge --sample %p/Inputs/gcc-sample-profile.gcov --text -o - | llvm-profdata show --sample - -o %t-text18RUN: llvm-profdata show --sample %p/Inputs/gcc-sample-profile.gcov -o %t-gcov19RUN: diff %t-text %t-gcov20 214- Merge the gcov and text encodings of the profile and check that the22 counters have doubled.23RUN: llvm-profdata merge --sample --text %p/Inputs/gcc-sample-profile.gcov -o %t-gcov24RUN: llvm-profdata merge --sample --text %p/Inputs/gcc-sample-profile.gcov %t-gcov -o - | FileCheck %s --check-prefix=MERGE125MERGE1: main:728168:026MERGE1: 2.3: 12029827MERGE1: 2.3: _Z3fool:48757228