1 You need a checkout of clang with compiler-rt to generate the
2 binary file here. These shell commands can be used to regenerate
6 $ TESTDIR=$SRC/test/tools/llvm-profdata
7 $ CFE_TESTDIR=$CFE/test/Profile
8 $ clang -o a.out -fprofile-instr-generate $CFE_TESTDIR/c-general.c
9 $ LLVM_PROFILE_FILE=$TESTDIR/Inputs/c-general.profraw ./a.out
11 RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - | FileCheck %s
12 RUN: llvm-profdata show %p/Inputs/c-general.profraw --topn=3 -o - | FileCheck %s --check-prefix=TOPN
13 RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - --function=switches | FileCheck %s -check-prefix=SWITCHES -check-prefix=CHECK
15 SWITCHES-LABEL: Counters:
16 SWITCHES-NEXT: switches:
17 SWITCHES-NEXT: Hash: 0x2618e4f23f2e8daa
18 SWITCHES-NEXT: Counters: 19
19 SWITCHES-NEXT: Function count: 1
20 SWITCHES-LABEL: Functions shown: 1
22 CHECK-LABEL: Total functions: 12
23 CHECK-NEXT: Maximum function count: 1
24 CHECK-NEXT: Maximum internal block count: 100
25 TOPN: boolean_operators, max count = 100
26 TOPN-NEXT: simple_loops, max count = 100
27 TOPN-NEXT: conditionals, max count = 100