[llvm] [MemProf] Add basic summary section support (PR #141805)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 11:47:07 PDT 2025
================
@@ -3312,6 +3313,19 @@ static int showMemProfProfile(ShowFormat SFormat, raw_fd_ostream &OS) {
auto Reader = std::move(ReaderOrErr.get());
memprof::AllMemProfData Data = Reader->getAllMemProfData();
+
+ // For v4 and above the summary is serialized in the indexed profile, and can
+ // be accessed from the reader. Earlier versions build the summary below.
+ // The summary is emitted as YAML comments at the start of the output.
+ auto *MemProfSum = Reader->getMemProfSummary();
+ if (MemProfSum) {
----------------
teresajohnson wrote:
done
https://github.com/llvm/llvm-project/pull/141805
More information about the llvm-commits
mailing list