1Basic test for option -showcs:
2RUN: llvm-profdata show %p/Inputs/cs.proftext | FileCheck  %s -check-prefix=ZEROSUMMARY
3RUN: llvm-profdata show %p/Inputs/noncs.proftext | FileCheck  %s -check-prefix=SUMMARY
4RUN: llvm-profdata show -showcs %p/Inputs/cs.proftext | FileCheck  %s -check-prefix=SUMMARY
5RUN: llvm-profdata show -showcs %p/Inputs/noncs.proftext | FileCheck  %s -check-prefix=ZEROSUMMARY
6ZEROSUMMARY: Instrumentation level: IR
7ZEROSUMMARY: Total functions: 0
8ZEROSUMMARY: Maximum function count: 0
9ZEROSUMMARY: Maximum internal block count: 0
10SUMMARY: Instrumentation level: IR
11SUMMARY: Total functions: 1
12SUMMARY: Maximum function count: 99938
13SUMMARY: Maximum internal block count: 62
14
15Basic tests for context sensitive profile dump functions:
16RUN: llvm-profdata merge -o %t-combined.profdata %p/Inputs/cs.proftext %p/Inputs/noncs.proftext
17
18RUN: llvm-profdata show --all-functions -counts -showcs %p/Inputs/cs.proftext > %t-text.csdump
19RUN: llvm-profdata show --all-functions -counts -showcs %t-combined.profdata > %t-index.csdump
20RUN: diff %t-text.csdump %t-index.csdump
21
22RUN: llvm-profdata show --all-functions -counts %p/Inputs/noncs.proftext > %t-text.noncsdump
23RUN: llvm-profdata show --all-functions -counts %t-combined.profdata > %t-index.noncsdump
24RUN: diff %t-text.noncsdump %t-index.noncsdump
25
26Roundtrip test:
27
28RUN: llvm-profdata merge -o %t.0.profdata %S/Inputs/CSIR_profile.proftext
29RUN: llvm-profdata merge -text -o %t.0.proftext %t.0.profdata
30RUN: diff %t.0.proftext %S/Inputs/CSIR_profile.proftext
31
32