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 <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
diff --git a/MdeModulePkg/Include/Guid/MemoryProfile.h b/MdeModulePkg/Include/Guid/MemoryProfile.h
index 38a6494..777f950 100644
--- a/MdeModulePkg/Include/Guid/MemoryProfile.h
+++ b/MdeModulePkg/Include/Guid/MemoryProfile.h
@@ -146,13 +146,12 @@
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;