2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata merge -sparse=true %s -o %t.profdata
|
2014-08-02 03:59:48 +08:00
|
|
|
|
2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata merge -sparse=false %s -o %t.profdata.dense
|
2014-08-02 03:59:48 +08:00
|
|
|
|
|
|
|
# RUN: llvm-profdata show %t.profdata --function function_count_only --counts | FileCheck %s -check-prefix=FUNC_COUNT_ONLY
|
|
|
|
function_count_only
|
|
|
|
0
|
|
|
|
1
|
|
|
|
97531
|
|
|
|
# FUNC_COUNT_ONLY: Hash: 0x{{0+$}}
|
|
|
|
# FUNC_COUNT_ONLY-NEXT: Counters: 1
|
|
|
|
# FUNC_COUNT_ONLY-NEXT: Function count: 97531
|
|
|
|
# FUNC_COUNT_ONLY-NEXT: Block counts: []
|
|
|
|
|
2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata show %t.profdata.dense --function "name with spaces" --counts | FileCheck %s -check-prefix=SPACES
|
|
|
|
# RUN: llvm-profdata show %t.profdata --function "name with spaces" --counts | FileCheck %s --check-prefix=SPARSE_SPACES
|
2014-08-02 03:59:48 +08:00
|
|
|
name with spaces
|
|
|
|
1024
|
|
|
|
2
|
|
|
|
0
|
|
|
|
0
|
|
|
|
# SPACES: Hash: 0x{{0+}}400
|
|
|
|
# SPACES-NEXT: Counters: 2
|
|
|
|
# SPACES-NEXT: Function count: 0
|
|
|
|
# SPACES-NEXT: Block counts: [0]
|
2016-01-30 06:54:45 +08:00
|
|
|
# SPARSE_SPACES-NOT: Function count: 0
|
2014-08-02 03:59:48 +08:00
|
|
|
|
|
|
|
# RUN: llvm-profdata show %t.profdata --function large_numbers --counts | FileCheck %s -check-prefix=LARGENUM
|
|
|
|
large_numbers
|
|
|
|
4611686018427387903
|
|
|
|
6
|
|
|
|
2305843009213693952
|
|
|
|
1152921504606846976
|
|
|
|
576460752303423488
|
|
|
|
288230376151711744
|
|
|
|
144115188075855872
|
|
|
|
72057594037927936
|
|
|
|
# LARGENUM: Hash: 0x3fffffffffffffff
|
|
|
|
# LARGENUM-NEXT: Counters: 6
|
|
|
|
# LARGENUM-NEXT: Function count: 2305843009213693952
|
|
|
|
# LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936]
|
|
|
|
|
2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata show %t.profdata.dense --function hex_hash | FileCheck %s -check-prefix=HEX-HASH
|
2015-03-10 02:54:49 +08:00
|
|
|
hex_hash
|
|
|
|
0x1234
|
|
|
|
1
|
|
|
|
0
|
|
|
|
# HEX-HASH: Hash: 0x0000000000001234
|
|
|
|
# HEX-HASH-NEXT: Counters: 1
|
|
|
|
|
2014-08-02 03:59:48 +08:00
|
|
|
# RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC
|
|
|
|
# NOSUCHFUNC-NOT: Counters:
|
|
|
|
# NOSUCHFUNC: Functions shown: 0
|
|
|
|
|
|
|
|
# RUN: llvm-profdata show %t.profdata --function _ | FileCheck %s -check-prefix=SOMEFUNCS
|
2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata show %t.profdata.dense --function _ | FileCheck %s -check-prefix=SOMEFUNCS_DENSE
|
2014-08-02 03:59:48 +08:00
|
|
|
# SOMEFUNCS: Counters:
|
2016-03-26 10:02:59 +08:00
|
|
|
# SOMEFUNCS-DAG: large_numbers:
|
|
|
|
# SOMEFUNCS-DAG: function_count_only:
|
2016-01-30 06:54:45 +08:00
|
|
|
# SOMEFUNCS: Functions shown: 2
|
|
|
|
# SOMEFUNCS_DENSE: Functions shown: 3
|
2014-08-02 03:59:48 +08:00
|
|
|
|
2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata show %t.profdata.dense | FileCheck %s -check-prefix=SUMMARY
|
2014-08-02 03:59:48 +08:00
|
|
|
# SUMMARY-NOT: Counters:
|
|
|
|
# SUMMARY-NOT: Functions shown:
|
2015-03-10 02:54:49 +08:00
|
|
|
# SUMMARY: Total functions: 4
|
2014-08-02 03:59:48 +08:00
|
|
|
# SUMMARY: Maximum function count: 2305843009213693952
|
|
|
|
# SUMMARY: Maximum internal block count: 1152921504606846976
|
2016-01-14 05:44:36 +08:00
|
|
|
|
2016-01-30 06:54:45 +08:00
|
|
|
# RUN: llvm-profdata show --detailed-summary %t.profdata.dense | FileCheck %s -check-prefix=DETAILED-SUMMARY
|
2016-01-16 13:29:49 +08:00
|
|
|
# DETAILED-SUMMARY: Total number of blocks: 10
|
|
|
|
# DETAILED-SUMMARY: Total count: 4539628424389557499
|
2020-05-02 23:34:10 +08:00
|
|
|
# DETAILED-SUMMARY: Detailed summary:
|
2016-01-16 13:29:49 +08:00
|
|
|
# DETAILED-SUMMARY: 3 blocks with count >= 576460752303423488 account for 80 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY: 4 blocks with count >= 288230376151711744 account for 90 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY: 4 blocks with count >= 288230376151711744 account for 95 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY: 6 blocks with count >= 72057594037927936 account for 99 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY: 6 blocks with count >= 72057594037927936 account for 99.9 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY: 6 blocks with count >= 72057594037927936 account for 99.99 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY: 6 blocks with count >= 72057594037927936 account for 99.999 percentage of the total counts.
|
2016-01-14 05:44:36 +08:00
|
|
|
|
|
|
|
# RUN: llvm-profdata show --detailed-summary --detailed-summary-cutoffs=600000 %t.profdata | FileCheck %s -check-prefix=DETAILED-SUMMARY-2
|
2016-01-16 13:29:49 +08:00
|
|
|
# DETAILED-SUMMARY-2: 2 blocks with count >= 1152921504606846976 account for 60 percentage of the total counts.
|
2016-01-14 05:44:36 +08:00
|
|
|
#
|
|
|
|
# RUN: llvm-profdata show --detailed-summary --detailed-summary-cutoffs=600000,900000,999999 %t.profdata | FileCheck %s -check-prefix=DETAILED-SUMMARY-3
|
2016-01-16 13:29:49 +08:00
|
|
|
# DETAILED-SUMMARY-3: 2 blocks with count >= 1152921504606846976 account for 60 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY-3: 4 blocks with count >= 288230376151711744 account for 90 percentage of the total counts.
|
|
|
|
# DETAILED-SUMMARY-3: 6 blocks with count >= 72057594037927936 account for 99.9999 percentage of the total counts.
|