blob: a854a51afa6b50a9a99dc1d61d772271751ee995 [file] [log] [blame]
Xinliang David Li872362c2016-05-23 16:36:11 +00001# RUN: llvm-profdata show -ic-targets -all-functions %s | FileCheck %s --check-prefix=ICTXT --check-prefix=ICSUM
Xinliang David Lie3bf4fd32015-12-14 18:44:01 +00002# 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 Li872362c2016-05-23 16:36:11 +00004# RUN: llvm-profdata show -ic-targets -all-functions %t.profdata | FileCheck %s --check-prefix=IC --check-prefix=ICSUM
Xinliang David Lie3bf4fd32015-12-14 18:44:01 +00005
6foo
7# Func Hash:
810
9# Num Counters:
102
11# Counter Values:
12999000
13359800
14
15foo2
16# Func Hash:
1710
18# Num Counters:
192
20# Counter Values:
211001000
22360200
23
24main
25# Func Hash:
2616650
27# Num Counters:
284
29# Counter Values:
302
312000
322000000
33999000
34# NumValueKinds
351
36# Value Kind IPVK_IndirectCallTarget
370
38# NumSites
393
40# Values for each site
410
422
43foo:100
44foo2:1000
451
46foo2:20000
47
Xinliang David Li062cde92016-01-08 05:45:21 +000048#ICTXT: Indirect Call Site Count: 3
Rong Xu0cf1f562017-03-09 19:03:57 +000049#ICTXT-NEXT: Indirect Target Results:
Rong Xu52aa2242019-01-08 22:41:48 +000050#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 Li062cde92016-01-08 05:45:21 +000053
Xinliang David Lie3bf4fd32015-12-14 18:44:01 +000054#IC: Indirect Call Site Count: 3
Rong Xu0cf1f562017-03-09 19:03:57 +000055#IC-NEXT: Indirect Target Results:
Xinliang David Lie3bf4fd32015-12-14 18:44:01 +000056#IC-NEXT: [ 1, foo2, 1000 ]
Xinliang David Li062cde92016-01-08 05:45:21 +000057#IC-NEXT: [ 1, foo, 100 ]
Xinliang David Lie3bf4fd32015-12-14 18:44:01 +000058#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 Li872362c2016-05-23 16:36:11 +000064#
65
Rong Xu6241c2a2017-03-03 21:56:34 +000066bar
67# Func Hash:
6810
69# Num Counters:
702
71# Counter Values:
72999000
73359800
74
Rong Xu0cf1f562017-03-09 19:03:57 +000075#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 Lideda33c2016-09-20 21:04:22 +000079#ICSUM: NumTargets, SiteCount
Rong Xu0cf1f562017-03-09 19:03:57 +000080#ICSUM 1, 1
81#ICSUM 2, 1