From 072a3ca1d36a42aec97f871c808776ee7038ca06 Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Fri, 8 Jul 2016 10:37:46 +0800 Subject: MdeModulePkg MemoryProfile.h:two bytes of Reserved[4] as ActionStringOffset At 94092aa60341a3e4b1e1ea7c362781b8404ac538, we extended MEMORY_PROFILE_ALLOC_INFO to add ActionStringOffset and Reserved2[6] fields, that was not aware the Reserved[4] field can be reused to have better memory profile database size efficiency. With the patch, PcdMemoryProfilePropertyMask|0x3 and PcdMemoryProfileMemoryType|0xffff, the memory profile database size can be reduced as below on my sample platform. UefiMemoryProfileSize - 0x1597A8 -> UefiMemoryProfileSize - 0x12AB28 SmramProfileSize - 0xCF68 -> SmramProfileSize - 0xB8E8 Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao --- MdeModulePkg/Include/Guid/MemoryProfile.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Include/Guid/MemoryProfile.h b/MdeModulePkg/Include/Guid/MemoryProfile.h index 38a64945e3..777f950db7 100644 --- a/MdeModulePkg/Include/Guid/MemoryProfile.h +++ b/MdeModulePkg/Include/Guid/MemoryProfile.h @@ -146,13 +146,12 @@ typedef struct { MEMORY_PROFILE_COMMON_HEADER Header; PHYSICAL_ADDRESS CallerAddress; UINT32 SequenceId; - UINT8 Reserved[4]; + UINT8 Reserved[2]; + UINT16 ActionStringOffset; MEMORY_PROFILE_ACTION Action; EFI_MEMORY_TYPE MemoryType; PHYSICAL_ADDRESS Buffer; UINT64 Size; - UINT16 ActionStringOffset; - UINT8 Reserved2[6]; //CHAR8 ActionString[]; } MEMORY_PROFILE_ALLOC_INFO; -- cgit v1.2.3