@param DriverEntry Image info.\r
@param FileType Image file type.\r
\r
- @retval TRUE Register success.\r
- @retval FALSE Register fail.\r
+ @return EFI_SUCCESS Register successfully.\r
+ @return EFI_UNSUPPORTED Memory profile unsupported,\r
+ or memory profile for the image is not required.\r
+ @return EFI_OUT_OF_RESOURCES No enough resource for this register.\r
\r
**/\r
-BOOLEAN\r
+EFI_STATUS\r
RegisterMemoryProfileImage (\r
IN LOADED_IMAGE_PRIVATE_DATA *DriverEntry,\r
IN EFI_FV_FILETYPE FileType\r
\r
@param DriverEntry Image info.\r
\r
- @retval TRUE Unregister success.\r
- @retval FALSE Unregister fail.\r
+ @return EFI_SUCCESS Unregister successfully.\r
+ @return EFI_UNSUPPORTED Memory profile unsupported,\r
+ or memory profile for the image is not required.\r
+ @return EFI_NOT_FOUND The image is not found.\r
\r
**/\r
-BOOLEAN\r
+EFI_STATUS\r
UnregisterMemoryProfileImage (\r
IN LOADED_IMAGE_PRIVATE_DATA *DriverEntry\r
);\r
@param CallerAddress Address of caller who call Allocate or Free.\r
@param Action This Allocate or Free action.\r
@param MemoryType Memory type.\r
+ EfiMaxMemoryType means the MemoryType is unknown.\r
@param Size Buffer size.\r
@param Buffer Buffer address.\r
+ @param ActionString String for memory profile action.\r
+ Only needed for user defined allocate action.\r
\r
- @retval TRUE Profile udpate success.\r
- @retval FALSE Profile update fail.\r
+ @return EFI_SUCCESS Memory profile is updated.\r
+ @return EFI_UNSUPPORTED Memory profile is unsupported,\r
+ or memory profile for the image is not required,\r
+ or memory profile for the memory type is not required.\r
+ @return EFI_ACCESS_DENIED It is during memory profile data getting.\r
+ @return EFI_ABORTED Memory profile recording is not enabled.\r
+ @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.\r
+ @return EFI_NOT_FOUND No matched allocate info found for free action.\r
\r
**/\r
-BOOLEAN\r
+EFI_STATUS\r
+EFIAPI\r
CoreUpdateProfile (\r
IN EFI_PHYSICAL_ADDRESS CallerAddress,\r
IN MEMORY_PROFILE_ACTION Action,\r
IN EFI_MEMORY_TYPE MemoryType,\r
IN UINTN Size, // Valid for AllocatePages/FreePages/AllocatePool\r
- IN VOID *Buffer\r
+ IN VOID *Buffer,\r
+ IN CHAR8 *ActionString OPTIONAL\r
);\r
\r
/**\r