diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h --- a/llvm/include/llvm/ProfileData/MemProf.h +++ b/llvm/include/llvm/ProfileData/MemProf.h @@ -138,7 +138,7 @@ // 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 @@ return sizeof(Frame::Function) + sizeof(Frame::LineOffset) + sizeof(Frame::Column) + sizeof(Frame::IsInlineFrame); } - }); + }; // The dynamic calling context for the allocation. std::vector CallStack; @@ -208,7 +208,8 @@ 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. }