MdeModulePkg MemoryProfile.h:two bytes of Reserved[4] as ActionStringOffset

At 94092aa603, 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>
This commit is contained in:
Star Zeng 2016-07-08 10:37:46 +08:00
parent 2a3a91eb9d
commit 072a3ca1d3
1 changed files with 2 additions and 3 deletions

View File

@ -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;