Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class PGOCtxProfileWriter final : public ctx_profile::ProfileWriter {
void endContextSection() override;

void startFlatSection();
void writeFlatSection(ctx_profile::GUID Guid, const uint64_t *Buffer,
size_t BufferSize);
void writeFlat(ctx_profile::GUID Guid, const uint64_t *Buffer,
size_t BufferSize);
void endFlatSection();

// constants used in writing which a reader may find useful.
Expand Down
7 changes: 3 additions & 4 deletions llvm/lib/ProfileData/PGOCtxProfWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ void PGOCtxProfileWriter::writeContextual(const ContextNode &RootNode) {
writeImpl(std::nullopt, RootNode);
}

void PGOCtxProfileWriter::writeFlatSection(ctx_profile::GUID Guid,
const uint64_t *Buffer,
size_t Size) {
void PGOCtxProfileWriter::writeFlat(ctx_profile::GUID Guid,
const uint64_t *Buffer, size_t Size) {
Writer.EnterSubblock(PGOCtxProfileBlockIDs::FlatProfileBlockID, CodeLen);
writeGuid(Guid);
writeCounters({Buffer, Size});
Expand Down Expand Up @@ -240,7 +239,7 @@ Error llvm::createCtxProfFromYAML(StringRef Profile, raw_ostream &Out) {
if (!SPR.FlatProfiles.empty()) {
Writer.startFlatSection();
for (const auto &[Guid, Counters] : SPR.FlatProfiles)
Writer.writeFlatSection(Guid, Counters.data(), Counters.size());
Writer.writeFlat(Guid, Counters.data(), Counters.size());
Writer.endFlatSection();
}
if (EC)
Expand Down
Loading