summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-07-08 10:37:46 +0800
committerStar Zeng <star.zeng@intel.com>2016-07-09 10:35:28 +0800
commit072a3ca1d36a42aec97f871c808776ee7038ca06 (patch)
tree83193e092190ada76551d7f7d3b3ea8ed8a3dac8 /MdeModulePkg
parent2a3a91eb9dd9c45bce2647988519bf3754fe8a5d (diff)
downloadedk2-072a3ca1d36a42aec97f871c808776ee7038ca06.tar.gz
edk2-072a3ca1d36a42aec97f871c808776ee7038ca06.tar.bz2
edk2-072a3ca1d36a42aec97f871c808776ee7038ca06.zip
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Include/Guid/MemoryProfile.h5
1 files changed, 2 insertions, 3 deletions
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;