Justin Bogner | 821d747 | 2014-08-01 22:50:07 +0000 | [diff] [blame^] | 1 | # If we see the same function name, but with different hashes, make |
| 2 | # sure we keep both. |
Justin Bogner | cf36a36 | 2014-07-29 22:29:23 +0000 | [diff] [blame] | 3 | |
Justin Bogner | 821d747 | 2014-08-01 22:50:07 +0000 | [diff] [blame^] | 4 | # RUN: llvm-profdata merge %s -o %t 2>&1 |
| 5 | # RUN: llvm-profdata show %t -all-functions -counts > %t.out |
| 6 | |
| 7 | # The function ordering is non-deterministic, so we need to do our |
| 8 | # checks in multiple runs. |
| 9 | # RUN: FileCheck -check-prefix=FOO3 -check-prefix=BOTH %s -input-file %t.out |
| 10 | # RUN: FileCheck -check-prefix=FOO4 -check-prefix=BOTH %s -input-file %t.out |
| 11 | |
| 12 | # FOO3: Hash: 0x{{0+}}3 |
| 13 | # FOO3-NEXT: Counters: 3 |
| 14 | # FOO3-NEXT: Function count: 1 |
| 15 | # FOO3-NEXT: Block counts: [2, 3] |
Justin Bogner | cf36a36 | 2014-07-29 22:29:23 +0000 | [diff] [blame] | 16 | foo |
| 17 | 3 |
| 18 | 3 |
| 19 | 1 |
| 20 | 2 |
| 21 | 3 |
| 22 | |
Justin Bogner | 821d747 | 2014-08-01 22:50:07 +0000 | [diff] [blame^] | 23 | # FOO4: Hash: 0x{{0+}}4 |
| 24 | # FOO4-NEXT: Counters: 4 |
| 25 | # FOO4-NEXT: Function count: 11 |
| 26 | # FOO4-NEXT: Block counts: [22, 33, 44] |
Justin Bogner | cf36a36 | 2014-07-29 22:29:23 +0000 | [diff] [blame] | 27 | foo |
| 28 | 4 |
| 29 | 4 |
| 30 | 11 |
| 31 | 22 |
| 32 | 33 |
| 33 | 44 |
Justin Bogner | 821d747 | 2014-08-01 22:50:07 +0000 | [diff] [blame^] | 34 | |
| 35 | # BOTH: Total functions: 2 |
| 36 | # BOTH: Maximum function count: 11 |
| 37 | # BOTH: Maximum internal block count: 44 |