2 RUN: llvm-profdata show -sample %S/Inputs/unknown.section.extbin.profdata | FileCheck %s
3 RUN: llvm-profdata show -sample %S/Inputs/unknown.section.compressed.extbin.profdata | FileCheck %s
4 RUN: llvm-profdata show -sample -show-sec-info-only %S/Inputs/unknown.section.extbin.profdata | FileCheck %s -check-prefix=HDR
5 RUN: llvm-profdata show -sample -show-sec-info-only %S/Inputs/unknown.section.compressed.extbin.profdata | FileCheck %s -check-prefix=HDR-COMPRESS
7 # The input unknown.section.extbin.profdata contains an unknown section type
8 # which uses an enum value which won't be used in the near future. Check
9 # llvm-profdata can read it without problem. This is to ensure adding new
10 # section in extbinary format for SampleFDO won't cause forward compatibility
12 # unknown.section.compressed.extbin.profdata is the compressed version of
13 # unknown.section.extbin.profdata.
15 CHECK: Function: main: 366846, 0, 3 sampled lines
16 CHECK-NEXT: Samples collected in the function's body {
17 CHECK-NEXT: 2.1: 60401
22 HDR: ProfileSummarySection - Offset: 242, Size: 121, Flags: {}
23 HDR-NEXT: NameTableSection - Offset: 363, Size: 6, Flags: {}
24 HDR-NEXT: UnknownSection - Offset: 369, Size: 1, Flags: {}
25 HDR-NEXT: FuncOffsetTableSection - Offset: 391, Size: 3, Flags: {}
26 HDR-NEXT: LBRProfileSection - Offset: 370, Size: 21, Flags: {}
27 HDR-NEXT: ProfileSymbolListSection - Offset: 391, Size: 0, Flags: {}
28 HDR-NEXT: FunctionMetadata - Offset: 394, Size: 0, Flags: {}
29 HDR-NEXT: Header Size: 242
30 HDR-NEXT: Total Sections Size: 152
31 HDR-NEXT: File Size: 394
33 HDR-COMPRESS: ProfileSummarySection - Offset: 242, Size: 89, Flags: {compressed}
34 HDR-COMPRESS-NEXT: NameTableSection - Offset: 331, Size: 16, Flags: {compressed}
35 HDR-COMPRESS-NEXT: UnknownSection - Offset: 347, Size: 11, Flags: {compressed}
36 HDR-COMPRESS-NEXT: FuncOffsetTableSection - Offset: 388, Size: 13, Flags: {compressed}
37 HDR-COMPRESS-NEXT: LBRProfileSection - Offset: 358, Size: 30, Flags: {compressed}
38 HDR-COMPRESS-NEXT: ProfileSymbolListSection - Offset: 388, Size: 0, Flags: {compressed}
39 HDR-COMPRESS-NEXT: FunctionMetadata - Offset: 401, Size: 0, Flags: {compressed}
40 HDR-COMPRESS-NEXT: Header Size: 242
41 HDR-COMPRESS-NEXT: Total Sections Size: 159
42 HDR-COMPRESS-NEXT: File Size: 401