TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeMemoryProfileLib.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI MemoryProfileLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI MemoryProfileLibRecord (IN PHYSICAL_ADDRESS CallerAddress, IN MEMORY_PROFILE_ACTION Action, IN EFI_MEMORY_TYPE MemoryType, IN VOID *Buffer, IN UINTN Size, IN CHAR8 *ActionString OPTIONAL)
 

Variables

EDKII_MEMORY_PROFILE_PROTOCOLmLibProfileProtocol
 

Detailed Description

Support routines for memory profile for Dxe phase drivers.

Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DxeMemoryProfileLib.c.

Function Documentation

◆ MemoryProfileLibConstructor()

EFI_STATUS EFIAPI MemoryProfileLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The constructor function initializes memory profile for DXE phase.

Parameters
ImageHandleThe firmware allocated handle for the EFI image.
SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe constructor always returns EFI_SUCCESS.

Definition at line 29 of file DxeMemoryProfileLib.c.

◆ MemoryProfileLibRecord()

EFI_STATUS EFIAPI MemoryProfileLibRecord ( IN PHYSICAL_ADDRESS  CallerAddress,
IN MEMORY_PROFILE_ACTION  Action,
IN EFI_MEMORY_TYPE  MemoryType,
IN VOID *  Buffer,
IN UINTN  Size,
IN CHAR8 *ActionString  OPTIONAL 
)

Record memory profile of multilevel caller.

Parameters
[in]CallerAddressAddress of caller.
[in]ActionMemory profile action.
[in]MemoryTypeMemory type. EfiMaxMemoryType means the MemoryType is unknown.
[in]BufferBuffer address.
[in]SizeBuffer size.
[in]ActionStringString for memory profile action. Only needed for user defined allocate action.
Returns
EFI_SUCCESS Memory profile is updated.
EFI_UNSUPPORTED Memory profile is unsupported, or memory profile for the image is not required, or memory profile for the memory type is not required.
EFI_ACCESS_DENIED It is during memory profile data getting.
EFI_ABORTED Memory profile recording is not enabled.
EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.
EFI_NOT_FOUND No matched allocate info found for free action.

Definition at line 72 of file DxeMemoryProfileLib.c.

Variable Documentation

◆ mLibProfileProtocol

EDKII_MEMORY_PROFILE_PROTOCOL* mLibProfileProtocol

Definition at line 16 of file DxeMemoryProfileLib.c.