X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FMem%2FMemoryProfileRecord.c;h=a91a719b4de5593b1d21f0aaf0951ace256e5f5e;hb=bd40dd27aaf926a34c51d9d7369c6145a1f72323;hp=30c0df46d682560e1a6cd498aebea3034e86e2df;hpb=9cda0af7ecfcfc5446da13e63b1930a0d83c0f3f;p=mirror_edk2.git diff --git a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c index 30c0df46d6..a91a719b4d 100644 --- a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c +++ b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c @@ -63,11 +63,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_PROFILE_CONTEXT_DATA mMemoryProfileContext }; GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_PROFILE_CONTEXT_DATA *mMemoryProfileContextPtr = NULL; -EFI_LOCK mMemoryProfileLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY); -BOOLEAN mMemoryProfileGettingStatus = FALSE; -BOOLEAN mMemoryProfileRecordingEnable = MEMORY_PROFILE_RECORDING_DISABLE; -EFI_DEVICE_PATH_PROTOCOL *mMemoryProfileDriverPath; -UINTN mMemoryProfileDriverPathSize; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_LOCK mMemoryProfileLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY); +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mMemoryProfileGettingStatus = FALSE; +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mMemoryProfileRecordingEnable = MEMORY_PROFILE_RECORDING_DISABLE; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_PROTOCOL *mMemoryProfileDriverPath; +GLOBAL_REMOVE_IF_UNREFERENCED UINTN mMemoryProfileDriverPathSize; /** Get memory profile data. @@ -209,7 +209,7 @@ ProfileProtocolRecord ( IN CHAR8 *ActionString OPTIONAL ); -EDKII_MEMORY_PROFILE_PROTOCOL mProfileProtocol = { +GLOBAL_REMOVE_IF_UNREFERENCED EDKII_MEMORY_PROFILE_PROTOCOL mProfileProtocol = { ProfileProtocolGetData, ProfileProtocolRegisterImage, ProfileProtocolUnregisterImage, @@ -442,6 +442,7 @@ BuildDriverInfo ( if (EFI_ERROR (Status)) { return NULL; } + ASSERT (DriverInfoData != NULL); ZeroMem (DriverInfoData, sizeof (*DriverInfoData));