[all-commits] [llvm/llvm-project] f97c61: [memprof] Add MemProfReader::takeMemProfData (#116...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Tue Nov 19 19:33:48 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f97c610d1f824bcd3e078560c836aaaffaaf69b0
https://github.com/llvm/llvm-project/commit/f97c610d1f824bcd3e078560c836aaaffaaf69b0
Author: Kazu Hirata <kazu at google.com>
Date: 2024-11-19 (Tue, 19 Nov 2024)
Changed paths:
M llvm/include/llvm/ProfileData/MemProfReader.h
M llvm/lib/ProfileData/InstrProfWriter.cpp
M llvm/tools/llvm-profdata/llvm-profdata.cpp
Log Message:
-----------
[memprof] Add MemProfReader::takeMemProfData (#116769)
This patch adds MemProfReader::takeMemProfData, a function to return
the complete MemProf profile from the reader. We can directly pass
its return value to InstrProfWriter::addMemProfData without having to
deal with the indivual components of the MemProf profile. The new
function is named "take", but it doesn't do std::move yet because of
type differences (DenseMap v.s. MapVector).
The end state I'm trying to get to is roughly as follows:
- MemProfReader accepts IndexedMemProfData as a parameter as opposed
to the three individual components (frames, call stacks, and
records).
- MemProfReader keeps IndexedMemProfData as a class member without
decomposing it into its individual components.
- MemProfReader returns IndexedMemProfData like:
IndexedMemProfData takeMemProfData() {
return std::move(MemProfData);
}
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list