c-general.test 1.0 KB

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