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 6 function_count_only 7 0 8 1 9 97531 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 16 name with spaces 17 1024 18 2 19 0 20 0 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 27 large_numbers 28 4611686018427387903 29 6 30 2305843009213693952 31 1152921504606846976 32 576460752303423488 33 288230376151711744 34 144115188075855872 35 72057594037927936 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 hex_hash | FileCheck %s -check-prefix=HEX-HASH 42 hex_hash 43 0x1234 44 1 45 0 46 # HEX-HASH: Hash: 0x0000000000001234 47 # HEX-HASH-NEXT: Counters: 1 48 49 # RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC 50 # NOSUCHFUNC-NOT: Counters: 51 # NOSUCHFUNC: Functions shown: 0 52 53 # RUN: llvm-profdata show %t.profdata --function _ | FileCheck %s -check-prefix=SOMEFUNCS 54 # SOMEFUNCS: Counters: 55 # SOMEFUNCS: function_count_only: 56 # SOMEFUNCS: large_numbers: 57 # SOMEFUNCS: Functions shown: 3 58 59 # RUN: llvm-profdata show %t.profdata | FileCheck %s -check-prefix=SUMMARY 60 # SUMMARY-NOT: Counters: 61 # SUMMARY-NOT: Functions shown: 62 # SUMMARY: Total functions: 4 63 # SUMMARY: Maximum function count: 2305843009213693952 64 # SUMMARY: Maximum internal block count: 1152921504606846976 65