• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1REGENERATE: You need a checkout of clang with compiler-rt to generate the
2REGENERATE: binary file here.  These shell commands can be used to regenerate
3REGENERATE: it.
4REGENERATE:
5REGENERATE: $ SRC=path/to/llvm
6REGENERATE: $ CFE=$SRC/tools/clang
7REGENERATE: $ TESTDIR=$SRC/test/tools/llvm-profdata
8REGENERATE: $ CFE_TESTDIR=$CFE/test/Profile
9REGENERATE: $ clang -o a.out -fprofile-instr-generate $CFE_TESTDIR/c-general.c
10REGENERATE: $ LLVM_PROFILE_FILE=$TESTDIR/Inputs/c-general.profraw ./a.out
11
12RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - | FileCheck %s -check-prefix=CHECK
13RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - --function=switches | FileCheck %s -check-prefix=SWITCHES -check-prefix=CHECK
14
15SWITCHES-LABEL: Counters:
16SWITCHES-NEXT:   switches:
17SWITCHES-NEXT:     Hash: 0x2618e4f23f2e8daa
18SWITCHES-NEXT:     Counters: 19
19SWITCHES-NEXT:     Function count: 1
20SWITCHES-LABEL: Functions shown: 1
21
22CHECK-LABEL: Total functions: 12
23CHECK-NEXT: Maximum function count: 1
24CHECK-NEXT: Maximum internal block count: 100
25