1
2
3# RUN: llvm-profdata merge %s -o %t.profdata
4
5# RUN: llvm-profdata show %t.profdata --function function_count_only --counts | FileCheck %s -check-prefix=FUNC_COUNT_ONLY
6function_count_only
70
81
997531
10# FUNC_COUNT_ONLY:      Hash: 0x{{0+$}}
11# FUNC_COUNT_ONLY-NEXT: Counters: 1
12# FUNC_COUNT_ONLY-NEXT: Function count: 97531
13# FUNC_COUNT_ONLY-NEXT: Block counts: []
14
15# RUN: llvm-profdata show %t.profdata --function "name with spaces" --counts | FileCheck %s -check-prefix=SPACES
16name with spaces
171024
182
190
200
21# SPACES:      Hash: 0x{{0+}}400
22# SPACES-NEXT: Counters: 2
23# SPACES-NEXT: Function count: 0
24# SPACES-NEXT: Block counts: [0]
25
26# RUN: llvm-profdata show %t.profdata --function large_numbers --counts | FileCheck %s -check-prefix=LARGENUM
27large_numbers
284611686018427387903
296
302305843009213693952
311152921504606846976
32576460752303423488
33288230376151711744
34144115188075855872
3572057594037927936
36# LARGENUM:      Hash: 0x3fffffffffffffff
37# LARGENUM-NEXT: Counters: 6
38# LARGENUM-NEXT: Function count: 2305843009213693952
39# LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936]
40
41# RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC
42# NOSUCHFUNC-NOT: Counters:
43# NOSUCHFUNC: Functions shown: 0
44
45# RUN: llvm-profdata show %t.profdata --function _ | FileCheck %s -check-prefix=SOMEFUNCS
46# SOMEFUNCS: Counters:
47# SOMEFUNCS: function_count_only:
48# SOMEFUNCS: large_numbers:
49# SOMEFUNCS: Functions shown: 2
50
51# RUN: llvm-profdata show %t.profdata | FileCheck %s -check-prefix=SUMMARY
52# SUMMARY-NOT: Counters:
53# SUMMARY-NOT: Functions shown:
54# SUMMARY: Total functions: 3
55# SUMMARY: Maximum function count: 2305843009213693952
56# SUMMARY: Maximum internal block count: 1152921504606846976
57