From eb115aa6c841c4a7fcd1e1ce4423955135c2ae51 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Thu, 23 Sep 2021 15:48:21 -0700 Subject: [PATCH] Revert "[compiler-rt][profile] Add padding after binary IDs" This reverts commit 6bc9c8dfe32cc4662f2ed9041af527f69dfff13b. Reverted because this broke some PPC buildbots. --- compiler-rt/lib/profile/InstrProfilingPlatformLinux.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c index 03cbd33..5d47083 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c @@ -142,9 +142,7 @@ static int WriteBinaryIdForNote(ProfDataWriter *Writer, /* * Helper function that iterates through notes section and find build ids. - * If writer is given, write binary ids into profiles. This also takes into - * account padding which may need to be added after the binary IDs to ensure - * 8-byte alignment. + * If writer is given, write binary ids into profiles. * If an error happens while writing, return -1. */ static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note, @@ -162,17 +160,7 @@ static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note, Note = (const ElfW(Nhdr) *)((const char *)(Note) + NoteOffset); } - uint8_t BinaryIdsPadding = - __llvm_profile_get_num_padding_bytes(TotalBinaryIdsSize); - if (Writer) { - ProfDataIOVec BinaryIdIOVec[] = { - {NULL, sizeof(uint8_t), BinaryIdsPadding, 1}}; - if (Writer->Write(Writer, BinaryIdIOVec, - sizeof(BinaryIdIOVec) / sizeof(*BinaryIdIOVec))) - return -1; - } - - return TotalBinaryIdsSize + BinaryIdsPadding; + return TotalBinaryIdsSize; } /* -- 2.7.4