Revert "[llvm-profgen] Clean up unnecessary memory reservations between phases."

This reverts commit 057e784b09.
This commit is contained in:
Hongtao Yu 2022-02-01 14:44:37 -08:00
parent 039e55d618
commit fec57e5b17
2 changed files with 0 additions and 4 deletions

View File

@ -1212,7 +1212,6 @@ void PerfScriptReader::parsePerfTraces() {
warnTruncatedStack();
warnInvalidRange();
generateUnsymbolizedProfile();
AggregatedSamples.clear();
if (SkipSymbolization)
writeUnsymbolizedProfile(OutputFilename);

View File

@ -158,9 +158,6 @@ int main(int argc, const char *argv[]) {
ProfileGeneratorBase::create(Binary.get(), Reader->getSampleCounters(),
Reader->profileIsCSFlat());
Generator->generateProfile();
// The Reader object, espcially its SampleCounters field, is not needed at
// this point, so releasing it to reduce peak memory usage.
Reader.release();
Generator->write();
return EXIT_SUCCESS;