diff options
author | Kazu Hirata <kazu@google.com> | 2024-11-15 15:37:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 15:37:00 -0800 |
commit | 0d38f64e7df94b062dde89627de28125f292b6bb (patch) | |
tree | c38810c7f84bcb6072d9a0e2256156327f5704ce /llvm/lib/ProfileData/InstrProfWriter.cpp | |
parent | 57ed628fb397c6427f820fb217c8a58e67f8e10a (diff) | |
download | llvm-0d38f64e7df94b062dde89627de28125f292b6bb.zip llvm-0d38f64e7df94b062dde89627de28125f292b6bb.tar.gz llvm-0d38f64e7df94b062dde89627de28125f292b6bb.tar.bz2 |
[memprof] Remove MemProf format Version 0 (#116442)
This patch removes MemProf format Version 0 now that version 2 and 3
seem to be working well.
I'm not touching version 1 for now because some tests still rely on
version 1.
Note that Version 0 is identical to Version 1 except that the MemProf
section of the indexed format has a MemProf version field.
Diffstat (limited to 'llvm/lib/ProfileData/InstrProfWriter.cpp')
-rw-r--r-- | llvm/lib/ProfileData/InstrProfWriter.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/llvm/lib/ProfileData/InstrProfWriter.cpp b/llvm/lib/ProfileData/InstrProfWriter.cpp index 4560147..47f4635 100644 --- a/llvm/lib/ProfileData/InstrProfWriter.cpp +++ b/llvm/lib/ProfileData/InstrProfWriter.cpp @@ -620,39 +620,6 @@ writeMemProfCallStackArray( return MemProfCallStackIndexes; } -// Write out MemProf Version0 as follows: -// uint64_t RecordTableOffset = RecordTableGenerator.Emit -// uint64_t FramePayloadOffset = Offset for the frame payload -// uint64_t FrameTableOffset = FrameTableGenerator.Emit -// uint64_t Num schema entries -// uint64_t Schema entry 0 -// uint64_t Schema entry 1 -// .... -// uint64_t Schema entry N - 1 -// OnDiskChainedHashTable MemProfRecordData -// OnDiskChainedHashTable MemProfFrameData -static Error writeMemProfV0(ProfOStream &OS, - memprof::IndexedMemProfData &MemProfData) { - uint64_t HeaderUpdatePos = OS.tell(); - OS.write(0ULL); // Reserve space for the memprof record table offset. - OS.write(0ULL); // Reserve space for the memprof frame payload offset. - OS.write(0ULL); // Reserve space for the memprof frame table offset. - - auto Schema = memprof::getFullSchema(); - writeMemProfSchema(OS, Schema); - - uint64_t RecordTableOffset = - writeMemProfRecords(OS, MemProfData.Records, &Schema, memprof::Version0); - - uint64_t FramePayloadOffset = OS.tell(); - uint64_t FrameTableOffset = writeMemProfFrames(OS, MemProfData.Frames); - - uint64_t Header[] = {RecordTableOffset, FramePayloadOffset, FrameTableOffset}; - OS.patch({{HeaderUpdatePos, Header}}); - - return Error::success(); -} - // Write out MemProf Version1 as follows: // uint64_t Version (NEW in V1) // uint64_t RecordTableOffset = RecordTableGenerator.Emit @@ -809,8 +776,6 @@ static Error writeMemProf(ProfOStream &OS, memprof::IndexedVersion MemProfVersionRequested, bool MemProfFullSchema) { switch (MemProfVersionRequested) { - case memprof::Version0: - return writeMemProfV0(OS, MemProfData); case memprof::Version1: return writeMemProfV1(OS, MemProfData); case memprof::Version2: |