[llvm] 3c8fc21 - [memprof] Remove packed qualifier for MemprofRecord::Frame.
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 18 14:08:42 PST 2022
Author: Snehasish Kumar
Date: 2022-02-18T14:08:36-08:00
New Revision: 3c8fc215cc28533c52212037dcb7b8028b0aeae5
URL: https://github.com/llvm/llvm-project/commit/3c8fc215cc28533c52212037dcb7b8028b0aeae5
DIFF: https://github.com/llvm/llvm-project/commit/3c8fc215cc28533c52212037dcb7b8028b0aeae5.diff
LOG: [memprof] Remove packed qualifier for MemprofRecord::Frame.
Now that we use dedicated serialize and deserialize methods in order to
ensure consistency across big and small endian systems. The packed
qualifier on the Frame struct can be removed.
Reviewed By: davidxl, tejohnson
Differential Revision: https://reviews.llvm.org/D120147
Added:
Modified:
llvm/include/llvm/ProfileData/MemProf.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index 784927e4805d..a18033f93633 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -138,7 +138,7 @@ struct MemProfRecord {
// Describes a call frame for a dynamic allocation context. The contents of
// the frame are populated by symbolizing the stack depot call frame from the
// compiler runtime.
- PACKED(struct Frame {
+ struct Frame {
// A uuid (uint64_t) identifying the function. It is obtained by
// llvm::md5(FunctionName) which returns the lower 64 bits.
GlobalValue::GUID Function;
@@ -194,7 +194,7 @@ struct MemProfRecord {
return sizeof(Frame::Function) + sizeof(Frame::LineOffset) +
sizeof(Frame::Column) + sizeof(Frame::IsInlineFrame);
}
- });
+ };
// The dynamic calling context for the allocation.
std::vector<Frame> CallStack;
@@ -208,7 +208,8 @@ struct MemProfRecord {
size_t serializedSize() const {
return sizeof(uint64_t) + // The number of frames to serialize.
- sizeof(Frame) * CallStack.size() + // The contents of the frames.
+ Frame::serializedSize() *
+ CallStack.size() + // The contents of the frames.
PortableMemInfoBlock::serializedSize(); // The size of the payload.
}
More information about the llvm-commits
mailing list