]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Extend memory profile definitions for memory leak detection
authorStar Zeng <star.zeng@intel.com>
Tue, 31 May 2016 05:40:24 +0000 (13:40 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 1 Jul 2016 01:39:50 +0000 (09:39 +0800)
commit94092aa60341a3e4b1e1ea7c362781b8404ac538
tree183585754b26fe579ad27010bc5a85ae66968699
parent10e4e4f6277decbc58038cd54b38732fc167e369
MdeModulePkg: Extend memory profile definitions for memory leak detection

Current memory profile feature:
1. Shows which line of code calls gBS->AllocateXXX(). But most entries
are from MemoryAllocationLib.
2. Records at the start.
3. Records all modules.

Enhanced memory profile feature:
1. User can know which line of code calls AllocateXXX() API instead of
gBS->Allocate().
2. User can know which line of code calls a specific API that will call
AllocateXXX().
3. User can know total memory allocated by a specific line of code.
4. User can configure to record single module.
5. User can configure when to enable recording.
6. User can know RVA<->Symbol (Function, Source, Line).

For the enhanced memory profile feature,
1. Extend MEMORY_PROFILE_DRIVER_INFO to include PdbString.
2. Extend MEMORY_PROFILE_ALLOC_INFO to include ActionString.
3. Extend MEMORY_PROFILE_ACTION to indicate action in memory allocation
lib and user defined action.
4. Extend memory profile protocol to include GetRecordingState/
SetRecordingState/Record.
5. Define SMM memory profile protocol.
6. Extend PcdMemoryProfilePropertyMask to support disable recording at
the start.
7. Introduce new PCD PcdMemoryProfileDriverPath to control which drivers
need memory profile data.

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
MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/MdeModulePkg.uni