[compiler-rt] eb115aa - Revert "[compiler-rt][profile] Add padding after binary IDs"

Leonard Chan via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 15:49:12 PDT 2021


Author: Leonard Chan
Date: 2021-09-23T15:48:59-07:00
New Revision: eb115aa6c841c4a7fcd1e1ce4423955135c2ae51

URL: https://github.com/llvm/llvm-project/commit/eb115aa6c841c4a7fcd1e1ce4423955135c2ae51
DIFF: https://github.com/llvm/llvm-project/commit/eb115aa6c841c4a7fcd1e1ce4423955135c2ae51.diff

LOG: Revert "[compiler-rt][profile] Add padding after binary IDs"

This reverts commit 6bc9c8dfe32cc4662f2ed9041af527f69dfff13b.

Reverted because this broke some PPC buildbots.

Added: 
    

Modified: 
    compiler-rt/lib/profile/InstrProfilingPlatformLinux.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
index 03cbd3312df4..5d47083b8bfe 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;
 }
 
 /*


        


More information about the llvm-commits mailing list