blob: ed4e61962e42587dff1fdcd92bbb63828925130e [file] [log] [blame]
David Blaikie79c316a2017-07-20 17:20:36 +00001You need a checkout of clang with compiler-rt to generate the
2binary file here. These shell commands can be used to regenerate
3it.
4$ SRC=path/to/llvm
5$ CFE=$SRC/tools/clang
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
Duncan P. N. Exon Smithaf777bb2014-03-21 21:20:35 +000010
Mandeep Singh Grang029a0562016-04-19 23:51:52 +000011RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - | FileCheck %s
Xinliang David Li801b5312017-07-11 20:30:43 +000012RUN: llvm-profdata show %p/Inputs/c-general.profraw --topn=3 -o - | FileCheck %s --check-prefix=TOPN
Justin Bogneraf3001e2014-07-30 23:02:01 +000013RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - --function=switches | FileCheck %s -check-prefix=SWITCHES -check-prefix=CHECK
Duncan P. N. Exon Smithaf777bb2014-03-21 21:20:35 +000014
15SWITCHES-LABEL: Counters:
16SWITCHES-NEXT: switches:
Betul Buyukkurt6fac1742015-11-18 18:14:55 +000017SWITCHES-NEXT: Hash: 0x2618e4f23f2e8daa
Duncan P. N. Exon Smithaf777bb2014-03-21 21:20:35 +000018SWITCHES-NEXT: Counters: 19
19SWITCHES-NEXT: Function count: 1
20SWITCHES-LABEL: Functions shown: 1
21
Betul Buyukkurt6fac1742015-11-18 18:14:55 +000022CHECK-LABEL: Total functions: 12
Duncan P. N. Exon Smithaf777bb2014-03-21 21:20:35 +000023CHECK-NEXT: Maximum function count: 1
24CHECK-NEXT: Maximum internal block count: 100
Xinliang David Li801b5312017-07-11 20:30:43 +000025TOPN: boolean_operators, max count = 100
26TOPN-NEXT: simple_loops, max count = 100
27TOPN-NEXT: conditionals, max count = 100