Hi MT
Just to understand better.
Do you have access to the BIOS code so you can compile the BIOS with support to MemoryProfile?
As far as I can see it seems you have added the needed libraries to your .dsc file, but to make memoryprofile working you need to have a BIOS capable of doing that. At the BIOS you are running the required protocols are not detected, this indicates you don't have the BIOS code compiled with support to MemoryProfile.
In case you don’t have access to a real BIOS code or CRB, maybe you can try using OVMF with MemoryProfile enabled (not sure if this already works, but it may be a way).
Hope this can help.
Thanks
Hello groupI'm looking for some help with MemoryProfile to catch some memory leaks in a custom uefi application.I followed the instructions found on: https://github.com/tianocore/tianocore.github.io/wiki/Memory-leak-detection-with-memory-profile-featureHowever I can't seem to get this to work, let me paint a more complete picture.My uefi app is standalone, it is not a part of any other package and has its own .dsc file and this is where I make all the changes to enable Memory Profiler.The memory I want to watch for is UEFI_APPLICATION, any calls to Allocate* functions to make sure everything has been freed accordingly, I suspect it has not hence the leak.So my debug build has the following Libs:MemoryAllocationLib|MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocationProfileLib.inf
MemoryProfileLib|MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocationProfileLib.infPCDs are set like this:gEfiMdeModulePkgTokenSpaceGuid.PcdMemoryProfilePropertyMask|0x1gEfiMdeModulePkgTokenSpaceGuid.PcdMemoryProfileMemoryType|0x60gEfiMdeModulePkgTokenSpaceGuid.PcdMemoryProfileDriverPath|{0x04, 0x06, 0x14, 0x00, 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1, 0x7F, 0xFF, 0x04, 0x00}In Components I added:MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.infThis also required that I add DxeServiceLibEverything builds without issues, my app runs as expected, however when I try to runMemoryProfileInfo.efi, I only get the following:UefiMemoryProfile: Locate MemoryProfile protocol - Not Found
GetUefiMemoryProfileData - Not Found
SmramProfile: Locate SmmCommunication protocol - Not Found
GetSmramProfileData - Not FoundCouple of questions about this:Is MemoryProfileInfo.efi supposed to be run after my app exits?Or is it more like a wrapper for my app (ie. valgrind)?The errors seem to indicate that the libs are still missing, are they supposedto be linked into the OVMF image as well perhaps, or anywhere else aside for my app?Appreciate any help, debugging third party libs has become a major headache and I hopememoryProfiler can help with this.Cheersmt