]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg MemoryProfile.h:two bytes of Reserved[4] as ActionStringOffset
authorStar Zeng <star.zeng@intel.com>
Fri, 8 Jul 2016 02:37:46 +0000 (10:37 +0800)
committerStar Zeng <star.zeng@intel.com>
Sat, 9 Jul 2016 02:35:28 +0000 (10:35 +0800)
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>
MdeModulePkg/Include/Guid/MemoryProfile.h

index 38a64945e36843d6be89d2d6c108db22e49b59a1..777f950db79a88b94b207981c48c3d57f4467d12 100644 (file)
@@ -146,13 +146,12 @@ typedef struct {
   MEMORY_PROFILE_COMMON_HEADER  Header;\r
   PHYSICAL_ADDRESS              CallerAddress;\r
   UINT32                        SequenceId;\r
-  UINT8                         Reserved[4];\r
+  UINT8                         Reserved[2];\r
+  UINT16                        ActionStringOffset;\r
   MEMORY_PROFILE_ACTION         Action;\r
   EFI_MEMORY_TYPE               MemoryType;\r
   PHYSICAL_ADDRESS              Buffer;\r
   UINT64                        Size;\r
-  UINT16                        ActionStringOffset;\r
-  UINT8                         Reserved2[6];\r
 //CHAR8                         ActionString[];\r
 } MEMORY_PROFILE_ALLOC_INFO;\r
 \r