Skip to content

Commit cd093c2

Browse files
[memprof] Make InstrProfwriter::addMemProfRecord and its friends private (NFC) (#119831)
This patch makes the following functions private: - InstrProfWriter::addMemProfRecord - InstrProfWriter::addMemProfFrame - InstrProfWriter::addMemProfCallStack These days, we add MemProf profile to the writer context via addMemProfData. We no longer add individual items.
1 parent ab07c51 commit cd093c2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

llvm/include/llvm/ProfileData/InstrProfWriter.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,6 @@ class InstrProfWriter {
115115
void addTemporalProfileTraces(SmallVectorImpl<TemporalProfTraceTy> &SrcTraces,
116116
uint64_t SrcStreamSize);
117117

118-
/// Add a memprof record for a function identified by its \p Id.
119-
void addMemProfRecord(const GlobalValue::GUID Id,
120-
const memprof::IndexedMemProfRecord &Record);
121-
122-
/// Add a memprof frame identified by the hash of the contents of the frame in
123-
/// \p FrameId.
124-
bool addMemProfFrame(const memprof::FrameId, const memprof::Frame &F,
125-
function_ref<void(Error)> Warn);
126-
127-
/// Add a call stack identified by the hash of the contents of the call stack
128-
/// in \p CallStack.
129-
bool addMemProfCallStack(const memprof::CallStackId CSId,
130-
const llvm::SmallVector<memprof::FrameId> &CallStack,
131-
function_ref<void(Error)> Warn);
132-
133118
/// Add the entire MemProfData \p Incoming to the writer context.
134119
bool addMemProfData(memprof::IndexedMemProfData Incoming,
135120
function_ref<void(Error)> Warn);
@@ -229,6 +214,21 @@ class InstrProfWriter {
229214
/// Add \p Trace using reservoir sampling.
230215
void addTemporalProfileTrace(TemporalProfTraceTy Trace);
231216

217+
/// Add a memprof record for a function identified by its \p Id.
218+
void addMemProfRecord(const GlobalValue::GUID Id,
219+
const memprof::IndexedMemProfRecord &Record);
220+
221+
/// Add a memprof frame identified by the hash of the contents of the frame in
222+
/// \p FrameId.
223+
bool addMemProfFrame(const memprof::FrameId, const memprof::Frame &F,
224+
function_ref<void(Error)> Warn);
225+
226+
/// Add a call stack identified by the hash of the contents of the call stack
227+
/// in \p CallStack.
228+
bool addMemProfCallStack(const memprof::CallStackId CSId,
229+
const llvm::SmallVector<memprof::FrameId> &CallStack,
230+
function_ref<void(Error)> Warn);
231+
232232
Error writeImpl(ProfOStream &OS);
233233

234234
// Writes known header fields and reserves space for fields whose value are

0 commit comments

Comments
 (0)