1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/tools/llvm-profdata/show-prof-info.test
Wei Mi 0ca1ed2836 Recommit [SampleFDO] Add flag for partial profile.
Fix the error of show-prof-info.test on some platforms without zlib.

The common profile usage is to collect profile from a target and then use the profile to guide the optimized build for the same target. There are some cases that no profile can be collected for a target. In those cases, although no full profile is available, it is possible to have some partial profile collected from other targets to optimize common libraries and utilities. A flag is needed to tell the partial profile from the full profile apart, so compiler can use different strategy for them.

Differential Revision: https://reviews.llvm.org/D77426
2020-04-07 14:28:25 -07:00

13 lines
734 B
Plaintext

REQUIRES: zlib
; RUN: llvm-profdata merge -sample -extbinary -use-md5 -compress-all-sections -partial-profile -prof-sym-list=%S/Inputs/profile-symbol-list-1.text %S/Inputs/sample-profile.proftext -o %t.1.output
; RUN: wc -c < %t.1.output > %t.txt
; RUN: llvm-profdata show -sample -show-sec-info-only %t.1.output >> %t.txt
; RUN: FileCheck %s --input-file=%t.txt
; CHECK: [[FILESIZE:.*]]
; To check llvm-profdata shows the correct flags for ProfileSummarySection.
; CHECK: ProfileSummarySection {{.*}} Flags: {compressed,partial}
; To check llvm-profdata shows the correct flags for NameTableSection.
; CHECK: NameTableSection {{.*}} Flags: {compressed,md5}
; To check llvm-profdata shows the correct file size.
; CHECK: [[FILESIZE]]