[llvm] [memprof] Add MemProf version (PR #86414)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 16:00:18 PDT 2024
================
@@ -570,12 +579,13 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
uint64_t FrameTableOffset = FrameTableGenerator.Emit(OS.OS, *FrameWriter);
- PatchItem PatchItems[] = {
- {MemProfSectionStart, &RecordTableOffset, 1},
- {MemProfSectionStart + sizeof(uint64_t), &FramePayloadOffset, 1},
- {MemProfSectionStart + 2 * sizeof(uint64_t), &FrameTableOffset, 1},
- };
- OS.patch(PatchItems);
+ uint64_t Header[] = {RecordTableOffset, FramePayloadOffset,
+ FrameTableOffset};
+ uint64_t HeaderUpdatePos = MemProfSectionStart;
+ if (MemProfVersionRequested == memprof::MemProfVersion1)
+ // The updates goes just after the version field.
----------------
teresajohnson wrote:
"updates go"
https://github.com/llvm/llvm-project/pull/86414
More information about the llvm-commits
mailing list