diff --git a/llvm/include/llvm/ProfileData/SampleProf.h b/llvm/include/llvm/ProfileData/SampleProf.h index e5cc494b92c32..157c79f6772fc 100644 --- a/llvm/include/llvm/ProfileData/SampleProf.h +++ b/llvm/include/llvm/ProfileData/SampleProf.h @@ -637,7 +637,7 @@ class ProfileSymbolList { // Determine whether or not to compress the symbol list when // writing it into profile. The variable is unused when the symbol // list is read from an existing profile. - bool ToCompress = true; + bool ToCompress = false; DenseSet Syms; BumpPtrAllocator Allocator; }; diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp index 36c39c1243203..e94848df24e20 100644 --- a/llvm/lib/ProfileData/SampleProf.cpp +++ b/llvm/lib/ProfileData/SampleProf.cpp @@ -211,7 +211,8 @@ std::error_code ProfileSymbolList::read(uint64_t CompressSize, StringRef CompressedStrings(reinterpret_cast(Data), CompressSize); char *Buffer = Allocator.Allocate(UncompressSize); - llvm::Error E = zlib::uncompress(CompressedStrings, Buffer, UncompressSize); + size_t UCSize = UncompressSize; + llvm::Error E = zlib::uncompress(CompressedStrings, Buffer, UCSize); if (E) return sampleprof_error::uncompress_failed; ListStart = Buffer; diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index d3b7c2b2c800d..a894d10c9c749 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -637,7 +637,7 @@ static int merge_main(int argc, const char *argv[]) { cl::desc("Path to file containing the list of function symbols " "used to populate profile symbol list")); cl::opt CompressProfSymList( - "compress-prof-sym-list", cl::init(true), cl::Hidden, + "compress-prof-sym-list", cl::init(false), cl::Hidden, cl::desc("Compress profile symbol list before write it into profile. ")); cl::ParseCommandLineOptions(argc, argv, "LLVM profile data merger\n");