[PATCH] D16388: [PGO] Enable profile name compression

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 17:43:04 PST 2016


davidxl created this revision.
davidxl added reviewers: vsk, bogner, silvas.
davidxl added a subscriber: llvm-commits.
Herald added a subscriber: emaste.

As discussed in RFC, this patch does the following
1) Changes the raw format to support compression
2) Keeps the indexed format version 
3) change the coverage map format but in backward compatible way.

There is no user level tool interface/usability change.

The impact of this patch -- for clang build with -fprofile-instr-generate -fcoverage-mapping and GC ,

1) Instrumented clang size is reduced from 273M to 201M -- a 72 MB reduction (in text and data)
2) Total input object size to linker is reduced from 1187 MB to 913 MB -- a 274 MB reduction
3) Raw profile size is reduced from 147 MB to 75 MB


This patch only include the LLVM change.

1) the main compile-rt change just need to update InstrProfData.inc
2) there are about 4 test cases that need to update raw profile data (binary)
3) there are  a few expected .ll file change

4) For platforms (not linux, freebsd, nor mach-o) that do not support finding section start/end with special symbols, compiler runtime change is needed to add a name section registration -- It will be in a different patch.



http://reviews.llvm.org/D16388

Files:
  include/llvm/ProfileData/CoverageMapping.h
  include/llvm/ProfileData/InstrProf.h
  include/llvm/ProfileData/InstrProfData.inc
  include/llvm/ProfileData/InstrProfReader.h
  lib/ProfileData/CoverageMappingReader.cpp
  lib/ProfileData/InstrProf.cpp
  lib/ProfileData/InstrProfReader.cpp
  lib/Transforms/Instrumentation/InstrProfiling.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16388.45467.patch
Type: text/x-patch
Size: 14570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160121/c2b2838e/attachment.bin>


More information about the llvm-commits mailing list