1d3289544SWenlei He# Make sure "llvm-profdata show" works for sample profile in binary compact format
2d3289544SWenlei He
3d3289544SWenlei He# RUN: llvm-profdata show -sample %S/Inputs/compat-sample.profdata | FileCheck %s
4d3289544SWenlei He
5d3289544SWenlei He# CHECK: Function: 15822663052811949562: 17, 0, 6 sampled lines
6d3289544SWenlei He# CHECK-NEXT: Samples collected in the function's body {
7d3289544SWenlei He# CHECK: Samples collected in inlined callsites {
8d3289544SWenlei He# CHECK-NEXT: 1: inlined callee: 6309742469962978389: 17, 0, 1
9*a8b8a937Swlei
10*a8b8a937Swlei# RUN: llvm-profdata show -hot-func-list -sample %S/Inputs/compat-sample.profdata | FileCheck %s --check-prefix=HOTFUNC
11*a8b8a937Swlei# HOTFUNC:      24753993 out of 24754010 profile counts (100.00%) are from hot functions.
12*a8b8a937Swlei# HOTFUNC:       Total sample (%)       Max sample        Entry sample    Function name
13*a8b8a937Swlei# HOTFUNC-NEXT:  24753993 (100.00%)     1284671           1284671         16429767378996342100
14*a8b8a937Swlei
15*a8b8a937Swlei# Make sure "llvm-profdata overlap" works for sample profile in binary compact format
16*a8b8a937Swlei# RUN: llvm-profdata overlap -sample %S/Inputs/compat-sample.profdata %S/Inputs/compat-sample.profdata | FileCheck %s --check-prefix=OVERLAP
17*a8b8a937Swlei
18*a8b8a937Swlei# OVERLAP:      Program level:
19*a8b8a937Swlei# OVERLAP-NEXT:   Whole program profile similarity: 100.000%
20*a8b8a937Swlei# OVERLAP-NEXT:   Whole program sample overlap: 100.000%
21