1RUN: printf '\201rforpl\377' > %t-foo.profraw
2RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw
3RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw
4RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw
5RUN: printf '\3\0\0\0\0\0\0\0' >> %t-foo.profraw
6RUN: printf '\0\0\4\0\1\0\0\0' >> %t-foo.profraw
7RUN: printf '\0\0\4\0\2\0\0\0' >> %t-foo.profraw
8
9RUN: printf '\3\0\0\0' >> %t-foo.profraw
10RUN: printf '\1\0\0\0' >> %t-foo.profraw
11RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw
12RUN: printf '\0\0\4\0\2\0\0\0' >> %t-foo.profraw
13RUN: printf '\0\0\4\0\1\0\0\0' >> %t-foo.profraw
14
15RUN: printf '\023\0\0\0\0\0\0\0' >> %t-foo.profraw
16RUN: printf 'foo' >> %t-foo.profraw
17
18RUN: printf '\201rforpl\377' > %t-bar.profraw
19RUN: printf '\1\0\0\0\0\0\0\0' >> %t-bar.profraw
20RUN: printf '\1\0\0\0\0\0\0\0' >> %t-bar.profraw
21RUN: printf '\2\0\0\0\0\0\0\0' >> %t-bar.profraw
22RUN: printf '\3\0\0\0\0\0\0\0' >> %t-bar.profraw
23RUN: printf '\0\0\6\0\1\0\0\0' >> %t-bar.profraw
24RUN: printf '\0\0\6\0\2\0\0\0' >> %t-bar.profraw
25
26RUN: printf '\3\0\0\0' >> %t-bar.profraw
27RUN: printf '\2\0\0\0' >> %t-bar.profraw
28RUN: printf '\2\0\0\0\0\0\0\0' >> %t-bar.profraw
29RUN: printf '\0\0\6\0\2\0\0\0' >> %t-bar.profraw
30RUN: printf '\0\0\6\0\1\0\0\0' >> %t-bar.profraw
31
32RUN: printf '\067\0\0\0\0\0\0\0' >> %t-bar.profraw
33RUN: printf '\101\0\0\0\0\0\0\0' >> %t-bar.profraw
34RUN: printf 'bar' >> %t-bar.profraw
35
36Versions of the profiles that are padded to eight byte alignment.
37RUN: cat %t-foo.profraw > %t-foo-padded.profraw
38RUN: printf '\0\0\0\0\0' >> %t-foo-padded.profraw
39RUN: cat %t-bar.profraw > %t-bar-padded.profraw
40RUN: printf '\0\0\0\0\0' >> %t-bar-padded.profraw
41
42RUN: cat %t-foo-padded.profraw %t-bar.profraw > %t-pad-between.profraw
43RUN: cat %t-foo-padded.profraw %t-bar-padded.profraw > %t-pad.profraw
44
45RUN: llvm-profdata show %t-pad-between.profraw -all-functions -counts | FileCheck %s
46RUN: llvm-profdata show %t-pad.profraw -all-functions -counts | FileCheck %s
47
48CHECK: Counters:
49CHECK:   foo:
50CHECK:     Hash: 0x0000000000000001
51CHECK:     Counters: 1
52CHECK:     Function count: 19
53CHECK:     Block counts: []
54CHECK:   bar:
55CHECK:     Hash: 0x0000000000000002
56CHECK:     Counters: 2
57CHECK:     Function count: 55
58CHECK:     Block counts: [65]
59CHECK: Functions shown: 2
60CHECK: Total functions: 2
61CHECK: Maximum function count: 55
62CHECK: Maximum internal block count: 65
63