Justin Bogner | cf36a36 | 2014-07-29 22:29:23 +0000 | [diff] [blame] | 1 | Some very basic tests for the multiple input cases. |
| 2 | |
Justin Bogner | af3001e | 2014-07-30 23:02:01 +0000 | [diff] [blame] | 3 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t |
Justin Bogner | b7aa263 | 2014-04-18 21:48:40 +0000 | [diff] [blame] | 4 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 |
Justin Bogner | af3001e | 2014-07-30 23:02:01 +0000 | [diff] [blame] | 5 | RUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t |
Justin Bogner | b7aa263 | 2014-04-18 21:48:40 +0000 | [diff] [blame] | 6 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 |
Justin Bogner | b9bd7f8 | 2014-03-21 17:46:22 +0000 | [diff] [blame] | 7 | FOO3: foo: |
| 8 | FOO3: Counters: 3 |
| 9 | FOO3: Function count: 8 |
| 10 | FOO3: Block counts: [7, 6] |
| 11 | FOO3: Total functions: 1 |
| 12 | FOO3: Maximum function count: 8 |
| 13 | FOO3: Maximum internal block count: 7 |
Justin Bogner | ec49f98 | 2014-03-12 22:00:57 +0000 | [diff] [blame] | 14 | |
Justin Bogner | af3001e | 2014-07-30 23:02:01 +0000 | [diff] [blame] | 15 | RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t |
Justin Bogner | b7aa263 | 2014-04-18 21:48:40 +0000 | [diff] [blame] | 16 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY |
Justin Bogner | b9bd7f8 | 2014-03-21 17:46:22 +0000 | [diff] [blame] | 17 | FOO3EMPTY: foo: |
| 18 | FOO3EMPTY: Counters: 3 |
| 19 | FOO3EMPTY: Function count: 1 |
| 20 | FOO3EMPTY: Block counts: [2, 3] |
| 21 | FOO3EMPTY: Total functions: 1 |
| 22 | FOO3EMPTY: Maximum function count: 1 |
| 23 | FOO3EMPTY: Maximum internal block count: 3 |
| 24 | |
Justin Bogner | af3001e | 2014-07-30 23:02:01 +0000 | [diff] [blame] | 25 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t |
Georgii Rymar | b6d77e7 | 2020-04-15 18:28:08 +0300 | [diff] [blame] | 26 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefixes=FOO3FOO3BAR3,FOO3FOO3BAR3-1 |
| 27 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefixes=FOO3FOO3BAR3,FOO3FOO3BAR3-2 |
Richard Smith | 1fd6d1f | 2016-03-26 02:02:59 +0000 | [diff] [blame] | 28 | FOO3FOO3BAR3-1: foo: |
| 29 | FOO3FOO3BAR3-1: Counters: 3 |
| 30 | FOO3FOO3BAR3-1: Function count: 3 |
| 31 | FOO3FOO3BAR3-1: Block counts: [5, 8] |
| 32 | FOO3FOO3BAR3-2: bar: |
| 33 | FOO3FOO3BAR3-2: Counters: 3 |
| 34 | FOO3FOO3BAR3-2: Function count: 7 |
| 35 | FOO3FOO3BAR3-2: Block counts: [11, 13] |
Justin Bogner | b9bd7f8 | 2014-03-21 17:46:22 +0000 | [diff] [blame] | 36 | FOO3FOO3BAR3: Total functions: 2 |
| 37 | FOO3FOO3BAR3: Maximum function count: 7 |
| 38 | FOO3FOO3BAR3: Maximum internal block count: 13 |
| 39 | |
Justin Bogner | af3001e | 2014-07-30 23:02:01 +0000 | [diff] [blame] | 40 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t |
Georgii Rymar | b6d77e7 | 2020-04-15 18:28:08 +0300 | [diff] [blame] | 41 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefixes=DISJOINT,DISJOINT-1 |
| 42 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefixes=DISJOINT,DISJOINT-2 |
Richard Smith | 1fd6d1f | 2016-03-26 02:02:59 +0000 | [diff] [blame] | 43 | DISJOINT-1: foo: |
| 44 | DISJOINT-1: Counters: 3 |
| 45 | DISJOINT-1: Function count: 1 |
| 46 | DISJOINT-1: Block counts: [2, 3] |
| 47 | DISJOINT-2: bar: |
| 48 | DISJOINT-2: Counters: 3 |
| 49 | DISJOINT-2: Function count: 1 |
| 50 | DISJOINT-2: Block counts: [2, 3] |
Justin Bogner | b9bd7f8 | 2014-03-21 17:46:22 +0000 | [diff] [blame] | 51 | DISJOINT: Total functions: 2 |
| 52 | DISJOINT: Maximum function count: 1 |
| 53 | DISJOINT: Maximum internal block count: 3 |
Vedant Kumar | e3a0bf5 | 2016-07-19 01:17:20 +0000 | [diff] [blame] | 54 | |
| 55 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 56 | RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 57 | RUN: -num-threads 2 -o %t |
| 58 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 |
| 59 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 60 | RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 61 | RUN: -j 3 -o %t |
| 62 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 |
| 63 | FOO4: foo: |
| 64 | FOO4: Counters: 3 |
| 65 | FOO4: Function count: 4 |
| 66 | FOO4: Block counts: [8, 12] |
| 67 | FOO4: Total functions: 1 |
| 68 | FOO4: Maximum function count: 4 |
| 69 | FOO4: Maximum internal block count: 12 |
| 70 | |
| 71 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 72 | RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 73 | RUN: %p/Inputs/foo3-1.proftext -j 2 -o %t |
| 74 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 |
| 75 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 76 | RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 77 | RUN: %p/Inputs/foo3-1.proftext -j 3 -o %t |
| 78 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 |
| 79 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 80 | RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 81 | RUN: %p/Inputs/foo3-1.proftext -o %t |
| 82 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 |
| 83 | RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 84 | RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ |
| 85 | RUN: %p/Inputs/foo3-1.proftext -j 1 -o %t |
| 86 | RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 |
| 87 | FOO5: foo: |
| 88 | FOO5: Counters: 3 |
| 89 | FOO5: Function count: 5 |
| 90 | FOO5: Block counts: [10, 15] |
| 91 | FOO5: Total functions: 1 |
| 92 | FOO5: Maximum function count: 5 |
| 93 | FOO5: Maximum internal block count: 15 |