| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 1 | RUN: printf '\201rforpl\377' > %t-foo.profraw | 
| Xinliang David Li | 78d61b1 | 2016-05-05 04:07:30 +0000 | [diff] [blame] | 2 | RUN: printf '\4\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 3 | RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw | 
|  | 4 | RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw | 
|  | 5 | RUN: printf '\10\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 6 | RUN: printf '\0\0\4\0\1\0\0\0' >> %t-foo.profraw | 
|  | 7 | RUN: printf '\0\0\4\0\2\0\0\0' >> %t-foo.profraw | 
| Betul Buyukkurt | 6fac174 | 2015-11-18 18:14:55 +0000 | [diff] [blame] | 8 | RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 9 |  | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 10 | RUN: printf '\254\275\030\333\114\302\370\134' >> %t-foo.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 11 | RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 12 | RUN: printf '\0\0\4\0\1\0\0\0' >> %t-foo.profraw | 
| Betul Buyukkurt | 6fac174 | 2015-11-18 18:14:55 +0000 | [diff] [blame] | 13 | RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw | 
|  | 14 | RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 15 | RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 16 |  | 
|  | 17 | RUN: printf '\023\0\0\0\0\0\0\0' >> %t-foo.profraw | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 18 | RUN: printf '\3\0foo\0\0\0' >> %t-foo.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 19 |  | 
|  | 20 | RUN: printf '\201rforpl\377' > %t-bar.profraw | 
| Xinliang David Li | 78d61b1 | 2016-05-05 04:07:30 +0000 | [diff] [blame] | 21 | RUN: printf '\4\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 22 | RUN: printf '\1\0\0\0\0\0\0\0' >> %t-bar.profraw | 
|  | 23 | RUN: printf '\2\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 24 | RUN: printf '\10\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 25 | RUN: printf '\0\0\6\0\1\0\0\0' >> %t-bar.profraw | 
|  | 26 | RUN: printf '\0\0\6\0\2\0\0\0' >> %t-bar.profraw | 
| Betul Buyukkurt | 6fac174 | 2015-11-18 18:14:55 +0000 | [diff] [blame] | 27 | RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 28 |  | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 29 | RUN: printf '\067\265\035\031\112\165\023\344' >> %t-bar.profraw | 
|  | 30 | RUN: printf '\02\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 31 | RUN: printf '\0\0\6\0\1\0\0\0' >> %t-bar.profraw | 
| Betul Buyukkurt | 6fac174 | 2015-11-18 18:14:55 +0000 | [diff] [blame] | 32 | RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw | 
|  | 33 | RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 34 | RUN: printf '\02\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 35 |  | 
|  | 36 | RUN: printf '\067\0\0\0\0\0\0\0' >> %t-bar.profraw | 
|  | 37 | RUN: printf '\101\0\0\0\0\0\0\0' >> %t-bar.profraw | 
| Xinliang David Li | a82d6c0 | 2016-02-08 18:13:49 +0000 | [diff] [blame] | 38 | RUN: printf '\3\0bar\0\0\0' >> %t-bar.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 39 |  | 
| Betul Buyukkurt | 6fac174 | 2015-11-18 18:14:55 +0000 | [diff] [blame] | 40 | RUN: cat %t-foo.profraw %t-bar.profraw > %t-pad.profraw | 
| Justin Bogner | a119f32 | 2014-05-16 00:38:00 +0000 | [diff] [blame] | 41 | RUN: llvm-profdata show %t-pad.profraw -all-functions -counts | FileCheck %s | 
|  | 42 |  | 
|  | 43 | CHECK: Counters: | 
|  | 44 | CHECK:   foo: | 
|  | 45 | CHECK:     Hash: 0x0000000000000001 | 
|  | 46 | CHECK:     Counters: 1 | 
|  | 47 | CHECK:     Function count: 19 | 
|  | 48 | CHECK:     Block counts: [] | 
|  | 49 | CHECK:   bar: | 
|  | 50 | CHECK:     Hash: 0x0000000000000002 | 
|  | 51 | CHECK:     Counters: 2 | 
|  | 52 | CHECK:     Function count: 55 | 
|  | 53 | CHECK:     Block counts: [65] | 
|  | 54 | CHECK: Functions shown: 2 | 
|  | 55 | CHECK: Total functions: 2 | 
|  | 56 | CHECK: Maximum function count: 55 | 
|  | 57 | CHECK: Maximum internal block count: 65 |