[llvm] cd093c2 - [memprof] Make InstrProfwriter::addMemProfRecord and its friends private (NFC) (#119831)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 13:59:28 PST 2024
Author: Kazu Hirata
Date: 2024-12-13T13:59:24-08:00
New Revision: cd093c2e1bac35dd2c6b914d0b64ce56683cb50a
URL: https://github.com/llvm/llvm-project/commit/cd093c2e1bac35dd2c6b914d0b64ce56683cb50a
DIFF: https://github.com/llvm/llvm-project/commit/cd093c2e1bac35dd2c6b914d0b64ce56683cb50a.diff
LOG: [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.
Added:
Modified:
llvm/include/llvm/ProfileData/InstrProfWriter.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/InstrProfWriter.h b/llvm/include/llvm/ProfileData/InstrProfWriter.h
index 117fddb5729e40..67d85daa816237 100644
--- a/llvm/include/llvm/ProfileData/InstrProfWriter.h
+++ b/llvm/include/llvm/ProfileData/InstrProfWriter.h
@@ -115,21 +115,6 @@ class InstrProfWriter {
void addTemporalProfileTraces(SmallVectorImpl<TemporalProfTraceTy> &SrcTraces,
uint64_t SrcStreamSize);
- /// Add a memprof record for a function identified by its \p Id.
- void addMemProfRecord(const GlobalValue::GUID Id,
- const memprof::IndexedMemProfRecord &Record);
-
- /// Add a memprof frame identified by the hash of the contents of the frame in
- /// \p FrameId.
- bool addMemProfFrame(const memprof::FrameId, const memprof::Frame &F,
- function_ref<void(Error)> Warn);
-
- /// Add a call stack identified by the hash of the contents of the call stack
- /// in \p CallStack.
- bool addMemProfCallStack(const memprof::CallStackId CSId,
- const llvm::SmallVector<memprof::FrameId> &CallStack,
- function_ref<void(Error)> Warn);
-
/// Add the entire MemProfData \p Incoming to the writer context.
bool addMemProfData(memprof::IndexedMemProfData Incoming,
function_ref<void(Error)> Warn);
@@ -229,6 +214,21 @@ class InstrProfWriter {
/// Add \p Trace using reservoir sampling.
void addTemporalProfileTrace(TemporalProfTraceTy Trace);
+ /// Add a memprof record for a function identified by its \p Id.
+ void addMemProfRecord(const GlobalValue::GUID Id,
+ const memprof::IndexedMemProfRecord &Record);
+
+ /// Add a memprof frame identified by the hash of the contents of the frame in
+ /// \p FrameId.
+ bool addMemProfFrame(const memprof::FrameId, const memprof::Frame &F,
+ function_ref<void(Error)> Warn);
+
+ /// Add a call stack identified by the hash of the contents of the call stack
+ /// in \p CallStack.
+ bool addMemProfCallStack(const memprof::CallStackId CSId,
+ const llvm::SmallVector<memprof::FrameId> &CallStack,
+ function_ref<void(Error)> Warn);
+
Error writeImpl(ProfOStream &OS);
// Writes known header fields and reserves space for fields whose value are
More information about the llvm-commits
mailing list