diff --git a/compiler-rt/test/profile/Darwin/instrprof-debug-info-correlate.c b/compiler-rt/test/profile/Darwin/instrprof-debug-info-correlate.c --- a/compiler-rt/test/profile/Darwin/instrprof-debug-info-correlate.c +++ b/compiler-rt/test/profile/Darwin/instrprof-debug-info-correlate.c @@ -1,5 +1,3 @@ -// REQUIRES: zlib - // Value profiling is currently not supported in lightweight mode. // RUN: %clang_pgogen -o %t -g -mllvm --debug-info-correlate -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp // RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t diff --git a/compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c b/compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c --- a/compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c +++ b/compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c @@ -1,5 +1,3 @@ -// REQUIRES: zlib - // Value profiling is currently not supported in lightweight mode. // RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal diff --git a/llvm/include/llvm/ProfileData/InstrProfCorrelator.h b/llvm/include/llvm/ProfileData/InstrProfCorrelator.h --- a/llvm/include/llvm/ProfileData/InstrProfCorrelator.h +++ b/llvm/include/llvm/ProfileData/InstrProfCorrelator.h @@ -83,14 +83,11 @@ /// Return the number of ProfileData elements. size_t getDataSize() const { return Data.size(); } - /// Return a pointer to the compressed names string that this class - /// constructs. - const char *getCompressedNamesPointer() const { - return CompressedNames.c_str(); - } + /// Return a pointer to the names string that this class constructs. + const char *getNamesPointer() const { return Names.c_str(); } - /// Return the number of bytes in the compressed names string. - size_t getCompressedNamesSize() const { return CompressedNames.size(); } + /// Return the number of bytes in the names string. + size_t getNamesSize() const { return Names.size(); } static llvm::Expected>> get(std::unique_ptr Ctx, @@ -98,7 +95,7 @@ protected: std::vector> Data; - std::string CompressedNames; + std::string Names; Error correlateProfileData() override; virtual void correlateProfileDataImpl() = 0; @@ -110,7 +107,7 @@ InstrProfCorrelatorImpl(InstrProfCorrelatorKind Kind, std::unique_ptr Ctx) : InstrProfCorrelator(Kind, std::move(Ctx)){}; - std::vector Names; + std::vector NamesVec; llvm::DenseSet CounterOffsets; // Byte-swap the value if necessary. @@ -140,7 +137,7 @@ static bool isDIEOfProbe(const DWARFDie &Die); /// Iterate over DWARF DIEs to find those that symbolize instrumentation - /// probes and construct the ProfileData vector and CompressedNames string. + /// probes and construct the ProfileData vector and Names string. /// /// Here is some example DWARF for an instrumentation probe we are looking /// for: diff --git a/llvm/lib/ProfileData/InstrProfCorrelator.cpp b/llvm/lib/ProfileData/InstrProfCorrelator.cpp --- a/llvm/lib/ProfileData/InstrProfCorrelator.cpp +++ b/llvm/lib/ProfileData/InstrProfCorrelator.cpp @@ -125,12 +125,12 @@ template Error InstrProfCorrelatorImpl::correlateProfileData() { - assert(Data.empty() && CompressedNames.empty() && Names.empty()); + assert(Data.empty() && Names.empty() && NamesVec.empty()); correlateProfileDataImpl(); auto Result = - collectPGOFuncNameStrings(Names, /*doCompression=*/true, CompressedNames); + collectPGOFuncNameStrings(NamesVec, /*doCompression=*/false, Names); CounterOffsets.clear(); - Names.clear(); + NamesVec.clear(); return Result; } @@ -155,7 +155,7 @@ maybeSwap(NumCounters), /*NumValueSites=*/{maybeSwap(0), maybeSwap(0)}, }); - Names.push_back(FunctionName.str()); + NamesVec.push_back(FunctionName.str()); } template diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -411,8 +411,8 @@ assert(CountersDelta == 0 && NamesDelta == 0); Data = Correlator->getDataPointer(); DataEnd = Data + Correlator->getDataSize(); - NamesStart = Correlator->getCompressedNamesPointer(); - NamesEnd = NamesStart + Correlator->getCompressedNamesSize(); + NamesStart = Correlator->getNamesPointer(); + NamesEnd = NamesStart + Correlator->getNamesSize(); } else { Data = reinterpret_cast *>( Start + DataOffset);