Xinliang David Li | 872362c | 2016-05-23 16:36:11 +0000 | [diff] [blame] | 1 | # RUN: llvm-profdata show -ic-targets -all-functions %s | FileCheck %s --check-prefix=ICTXT --check-prefix=ICSUM |
Xinliang David Li | e3bf4fd3 | 2015-12-14 18:44:01 +0000 | [diff] [blame] | 2 | # RUN: llvm-profdata show -ic-targets -counts -text -all-functions %s | FileCheck %s --check-prefix=ICTEXT |
| 3 | # RUN: llvm-profdata merge -o %t.profdata %s |
Xinliang David Li | 872362c | 2016-05-23 16:36:11 +0000 | [diff] [blame] | 4 | # RUN: llvm-profdata show -ic-targets -all-functions %t.profdata | FileCheck %s --check-prefix=IC --check-prefix=ICSUM |
Xinliang David Li | e3bf4fd3 | 2015-12-14 18:44:01 +0000 | [diff] [blame] | 5 | |
| 6 | foo |
| 7 | # Func Hash: |
| 8 | 10 |
| 9 | # Num Counters: |
| 10 | 2 |
| 11 | # Counter Values: |
| 12 | 999000 |
| 13 | 359800 |
| 14 | |
| 15 | foo2 |
| 16 | # Func Hash: |
| 17 | 10 |
| 18 | # Num Counters: |
| 19 | 2 |
| 20 | # Counter Values: |
| 21 | 1001000 |
| 22 | 360200 |
| 23 | |
| 24 | main |
| 25 | # Func Hash: |
| 26 | 16650 |
| 27 | # Num Counters: |
| 28 | 4 |
| 29 | # Counter Values: |
| 30 | 2 |
| 31 | 2000 |
| 32 | 2000000 |
| 33 | 999000 |
| 34 | # NumValueKinds |
| 35 | 1 |
| 36 | # Value Kind IPVK_IndirectCallTarget |
| 37 | 0 |
| 38 | # NumSites |
| 39 | 3 |
| 40 | # Values for each site |
| 41 | 0 |
| 42 | 2 |
| 43 | foo:100 |
| 44 | foo2:1000 |
| 45 | 1 |
| 46 | foo2:20000 |
| 47 | |
Xinliang David Li | 062cde9 | 2016-01-08 05:45:21 +0000 | [diff] [blame] | 48 | #ICTXT: Indirect Call Site Count: 3 |
Rong Xu | 0cf1f56 | 2017-03-09 19:03:57 +0000 | [diff] [blame] | 49 | #ICTXT-NEXT: Indirect Target Results: |
Rong Xu | 52aa224 | 2019-01-08 22:41:48 +0000 | [diff] [blame] | 50 | #ICTXT-NEXT: [ 1, foo, 100 ] (9.09%) |
| 51 | #ICTXT-NEXT: [ 1, foo2, 1000 ] (90.91%) |
| 52 | #ICTXT-NEXT: [ 2, foo2, 20000 ] (100.00%) |
Xinliang David Li | 062cde9 | 2016-01-08 05:45:21 +0000 | [diff] [blame] | 53 | |
Xinliang David Li | e3bf4fd3 | 2015-12-14 18:44:01 +0000 | [diff] [blame] | 54 | #IC: Indirect Call Site Count: 3 |
Rong Xu | 0cf1f56 | 2017-03-09 19:03:57 +0000 | [diff] [blame] | 55 | #IC-NEXT: Indirect Target Results: |
Xinliang David Li | e3bf4fd3 | 2015-12-14 18:44:01 +0000 | [diff] [blame] | 56 | #IC-NEXT: [ 1, foo2, 1000 ] |
Xinliang David Li | 062cde9 | 2016-01-08 05:45:21 +0000 | [diff] [blame] | 57 | #IC-NEXT: [ 1, foo, 100 ] |
Xinliang David Li | e3bf4fd3 | 2015-12-14 18:44:01 +0000 | [diff] [blame] | 58 | #IC-NEXT: [ 2, foo2, 20000 ] |
| 59 | |
| 60 | #ICTEXT: foo:100 |
| 61 | #ICTEXT-NEXT: foo2:1000 |
| 62 | #ICTEXT-NEXT: 1 |
| 63 | #ICTEXT-NEXT: foo2:20000 |
Xinliang David Li | 872362c | 2016-05-23 16:36:11 +0000 | [diff] [blame] | 64 | # |
| 65 | |
Rong Xu | 6241c2a | 2017-03-03 21:56:34 +0000 | [diff] [blame] | 66 | bar |
| 67 | # Func Hash: |
| 68 | 10 |
| 69 | # Num Counters: |
| 70 | 2 |
| 71 | # Counter Values: |
| 72 | 999000 |
| 73 | 359800 |
| 74 | |
Rong Xu | 0cf1f56 | 2017-03-09 19:03:57 +0000 | [diff] [blame] | 75 | #ICSUM: Statistics for indirect call sites profile: |
| 76 | #ICSUM: Total number of sites: 3 |
| 77 | #ICSUM: Total number of sites with values: 2 |
| 78 | #ICSUM: Total number of profiled values: 3 |
Xinliang David Li | deda33c | 2016-09-20 21:04:22 +0000 | [diff] [blame] | 79 | #ICSUM: NumTargets, SiteCount |
Rong Xu | 0cf1f56 | 2017-03-09 19:03:57 +0000 | [diff] [blame] | 80 | #ICSUM 1, 1 |
| 81 | #ICSUM 2, 1 |