mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
2b916be8fe
MD5 is used. Currently during sample profile loading, NameTable has to be loaded entirely up front before any name string is retrieved. That is because NameTable is stored using ULEB128 encoding and cannot be directly accessed like an array. However, if MD5 is used to represent name in the NameTable, it has fixed length. If MD5 names are stored in uint64_t type instead of ULEB128, NameTable can be accessed like an array then in many cases only part of the NameTable has to be read. This is helpful for reducing compile time especially when small source file is compiled. We find that after this change, the elapsed time to build a large application distributively is reduced by 5% and the accumulative cpu time used for building is also reduced by 5%. The size of the profile is slightly reduced with this change by ~0.2%, and that also indicates encoding MD5 in ULEB128 doesn't save the storage space. Differential Revision: https://reviews.llvm.org/D92621
13 lines
744 B
Plaintext
13 lines
744 B
Plaintext
REQUIRES: zlib
|
|
; RUN: llvm-profdata merge -sample -extbinary -use-md5 -compress-all-sections -gen-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,fixlenmd5}
|
|
; To check llvm-profdata shows the correct file size.
|
|
; CHECK: [[FILESIZE]]
|