TianoCore EDK2 master
|
#include "DxeCorePerformanceLibInternal.h"
Go to the source code of this file.
Data Structures | |
struct | HANDLE_GUID_MAP |
Macros | |
#define | SMM_BOOT_RECORD_COMM_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data) + sizeof(SMM_BOOT_RECORD_COMMUNICATE)) |
#define | STRING_SIZE (FPDT_STRING_EVENT_RECORD_NAME_LENGTH * sizeof (CHAR8)) |
#define | FIRMWARE_RECORD_BUFFER 0x10000 |
#define | CACHE_HANDLE_GUID_COUNT 0x800 |
Functions | |
EFI_STATUS | GetFpdtRecordPtr (IN UINT8 RecordSize, IN OUT FPDT_RECORD_PTR *FpdtRecordPtr) |
BOOLEAN | IsKnownTokens (IN CONST CHAR8 *Token) |
BOOLEAN | IsKnownID (IN UINT32 Identifier) |
VOID | InternalGetSmmPerfData (OUT VOID **SmmPerfData, OUT UINTN *SmmPerfDataSize, IN BOOLEAN SkipGetPerfData) |
EFI_STATUS | AllocateBootPerformanceTable (VOID) |
EFI_STATUS | GetModuleInfoFromHandle (IN EFI_HANDLE Handle, OUT CHAR8 *NameString, IN UINTN BufferSize, OUT EFI_GUID *ModuleGuid OPTIONAL) |
EFI_STATUS | GetFpdtRecordId (IN PERF_MEASUREMENT_ATTRIBUTE Attribute, IN CONST VOID *Handle, IN CONST CHAR8 *String, OUT UINT16 *ProgressID) |
VOID | CopyStringIntoPerfRecordAndUpdateLength (IN OUT CHAR8 *Destination, IN CONST CHAR8 *Source, IN OUT UINT8 *Length) |
EFI_STATUS | GetDeviceInfoFromHandleAndUpdateLength (IN CONST VOID *Handle, IN EFI_HANDLE ControllerHandle, OUT CHAR8 *ComponentNameString, IN OUT UINT8 *Length) |
EFI_STATUS | InsertFpdtRecord (IN CONST VOID *CallerIdentifier OPTIONAL, IN CONST VOID *Guid OPTIONAL, IN CONST CHAR8 *String OPTIONAL, IN UINT64 Ticker, IN UINT64 Address OPTIONAL, IN UINT16 PerfId, IN PERF_MEASUREMENT_ATTRIBUTE Attribute) |
VOID | InternalGetPeiPerformance (VOID *HobStart) |
VOID EFIAPI | ReportFpdtRecordBuffer (IN EFI_EVENT Event, IN VOID *Context) |
VOID EFIAPI | UpdateBootPerformanceTable (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | DxeCorePerformanceLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
EFI_STATUS EFIAPI | CreatePerformanceMeasurement (IN CONST VOID *CallerIdentifier, IN CONST VOID *Guid OPTIONAL, IN CONST CHAR8 *String OPTIONAL, IN UINT64 TimeStamp, IN UINT64 Address OPTIONAL, IN UINT32 Identifier, IN PERF_MEASUREMENT_ATTRIBUTE Attribute) |
RETURN_STATUS EFIAPI | StartPerformanceMeasurementEx (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp, IN UINT32 Identifier) |
RETURN_STATUS EFIAPI | EndPerformanceMeasurementEx (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp, IN UINT32 Identifier) |
UINTN EFIAPI | GetPerformanceMeasurementEx (IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, OUT UINT64 *StartTimeStamp, OUT UINT64 *EndTimeStamp, OUT UINT32 *Identifier) |
RETURN_STATUS EFIAPI | StartPerformanceMeasurement (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp) |
RETURN_STATUS EFIAPI | EndPerformanceMeasurement (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp) |
UINTN EFIAPI | GetPerformanceMeasurement (IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, OUT UINT64 *StartTimeStamp, OUT UINT64 *EndTimeStamp) |
BOOLEAN EFIAPI | PerformanceMeasurementEnabled (VOID) |
RETURN_STATUS EFIAPI | LogPerformanceMeasurement (IN CONST VOID *CallerIdentifier, IN CONST VOID *Guid OPTIONAL, IN CONST CHAR8 *String OPTIONAL, IN UINT64 Address OPTIONAL, IN UINT32 Identifier) |
BOOLEAN EFIAPI | LogPerformanceMeasurementEnabled (IN CONST UINTN Type) |
Variables | |
BOOT_PERFORMANCE_TABLE * | mAcpiBootPerformanceTable = NULL |
BOOT_PERFORMANCE_TABLE | mBootPerformanceTableTemplate |
HANDLE_GUID_MAP | mCacheHandleGuidTable [CACHE_HANDLE_GUID_COUNT] |
UINTN | mCachePairCount = 0 |
UINT32 | mLoadImageCount = 0 |
UINT32 | mPerformanceLength = 0 |
UINT32 | mMaxPerformanceLength = 0 |
UINT32 | mBootRecordSize = 0 |
UINTN | mBootRecordMaxSize = 0 |
UINT32 | mCachedLength = 0 |
BOOLEAN | mFpdtBufferIsReported = FALSE |
BOOLEAN | mLackSpaceIsReported = FALSE |
CHAR8 * | mPlatformLanguage = NULL |
UINT8 * | mPerformancePointer = NULL |
UINT8 * | mBootRecordBuffer = NULL |
BOOLEAN | mLockInsertRecord = FALSE |
CHAR8 * | mDevicePathString = NULL |
UINTN | mSmmBootRecordOffset = 0 |
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL * | mDevicePathToText = NULL |
EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL | mPerformanceMeasurementInterface |
PERFORMANCE_PROPERTY | mPerformanceProperty |
Performance library instance mainly used by DxeCore.
This library provides the performance measurement interfaces and initializes performance logging for DXE phase. It first initializes its private global data structure for performance logging and saves the performance GUIDed HOB passed from PEI phase. It initializes DXE phase performance logging by publishing the Performance and PerformanceEx Protocol, which are consumed by DxePerformanceLib to logging performance data in DXE phase.
This library is mainly used by DxeCore to start performance logging to ensure that Performance Protocol is installed at the very beginning of DXE phase.
Copyright (c) 2006 - 2023, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxeCorePerformanceLib.c.
#define CACHE_HANDLE_GUID_COUNT 0x800 |
Definition at line 27 of file DxeCorePerformanceLib.c.
#define FIRMWARE_RECORD_BUFFER 0x10000 |
Definition at line 26 of file DxeCorePerformanceLib.c.
#define SMM_BOOT_RECORD_COMM_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data) + sizeof(SMM_BOOT_RECORD_COMMUNICATE)) |
Definition at line 24 of file DxeCorePerformanceLib.c.
#define STRING_SIZE (FPDT_STRING_EVENT_RECORD_NAME_LENGTH * sizeof (CHAR8)) |
Definition at line 25 of file DxeCorePerformanceLib.c.
EFI_STATUS AllocateBootPerformanceTable | ( | VOID | ) |
Allocate buffer for Boot Performance table.
Definition at line 343 of file DxeCorePerformanceLib.c.
VOID CopyStringIntoPerfRecordAndUpdateLength | ( | IN OUT CHAR8 * | Destination, |
IN CONST CHAR8 * | Source, | ||
IN OUT UINT8 * | Length | ||
) |
Copies the string from Source into Destination and updates Length with the size of the string.
Destination | - destination of the string copy |
Source | - pointer to the source string which will get copied |
Length | - pointer to a length variable to be updated |
Definition at line 791 of file DxeCorePerformanceLib.c.
EFI_STATUS EFIAPI CreatePerformanceMeasurement | ( | IN CONST VOID * | CallerIdentifier, |
IN CONST VOID *Guid | OPTIONAL, | ||
IN CONST CHAR8 *String | OPTIONAL, | ||
IN UINT64 | TimeStamp, | ||
IN UINT64 Address | OPTIONAL, | ||
IN UINT32 | Identifier, | ||
IN PERF_MEASUREMENT_ATTRIBUTE | Attribute | ||
) |
Create performance record with event description and a timestamp.
CallerIdentifier | - Image handle or pointer to caller ID GUID. |
Guid | - Pointer to a GUID. |
String | - Pointer to a string describing the measurement. |
TimeStamp | - 64-bit time stamp. |
Address | - Pointer to a location in memory relevant to the measurement. |
Identifier | - Performance identifier describing the type of measurement. |
Attribute | - The attribute of the measurement. According to attribute can create a start record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX, or a general record for other Perf macros. |
EFI_SUCCESS | - Successfully created performance record. |
EFI_OUT_OF_RESOURCES | - Ran out of space to store the records. |
EFI_INVALID_PARAMETER | - Invalid parameter passed to function - NULL pointer or invalid PerfId. |
Definition at line 1581 of file DxeCorePerformanceLib.c.
EFI_STATUS EFIAPI DxeCorePerformanceLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The constructor function initializes Performance infrastructure for DXE phase.
The constructor function publishes Performance and PerformanceEx protocol, allocates memory to log DXE performance and merges PEI performance data to DXE performance log. It will ASSERT() if one of these operations fails and it will always return EFI_SUCCESS.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The constructor always returns EFI_SUCCESS. |
Definition at line 1482 of file DxeCorePerformanceLib.c.
RETURN_STATUS EFIAPI EndPerformanceMeasurement | ( | IN CONST VOID *Handle | OPTIONAL, |
IN CONST CHAR8 *Token | OPTIONAL, | ||
IN CONST CHAR8 *Module | OPTIONAL, | ||
IN UINT64 | TimeStamp | ||
) |
Searches the performance measurement log from the beginning of the log for the first matching record that contains a zero end time and fills in a valid end time.
Searches the performance measurement log from the beginning of the log for the first record that matches Handle, Token, and Module and has an end time value of zero. If the record can not be found then return RETURN_NOT_FOUND. If the record is found and TimeStamp is not zero, then the end time in the record is filled in with the value specified by TimeStamp. If the record is found and TimeStamp is zero, then the end time in the matching record is filled in with the current time stamp value.
Handle | Pointer to environment specific context used to identify the component being measured. |
Token | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
Module | Pointer to a Null-terminated ASCII string that identifies the module being measured. |
TimeStamp | 64-bit time stamp. |
RETURN_SUCCESS | The end of the measurement was recorded. |
RETURN_NOT_FOUND | The specified measurement record could not be found. |
Definition at line 1825 of file DxeCorePerformanceLib.c.
RETURN_STATUS EFIAPI EndPerformanceMeasurementEx | ( | IN CONST VOID *Handle | OPTIONAL, |
IN CONST CHAR8 *Token | OPTIONAL, | ||
IN CONST CHAR8 *Module | OPTIONAL, | ||
IN UINT64 | TimeStamp, | ||
IN UINT32 | Identifier | ||
) |
Searches the performance measurement log from the beginning of the log for the first matching record that contains a zero end time and fills in a valid end time.
Searches the performance measurement log from the beginning of the log for the first record that matches Handle, Token, Module and Identifier and has an end time value of zero. If the record can not be found then return RETURN_NOT_FOUND. If the record is found and TimeStamp is not zero, then the end time in the record is filled in with the value specified by TimeStamp. If the record is found and TimeStamp is zero, then the end time in the matching record is filled in with the current time stamp value.
Handle | Pointer to environment specific context used to identify the component being measured. |
Token | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
Module | Pointer to a Null-terminated ASCII string that identifies the module being measured. |
TimeStamp | 64-bit time stamp. |
Identifier | 32-bit identifier. If the value is 0, the found record is same as the one found by EndPerformanceMeasurement. |
RETURN_SUCCESS | The end of the measurement was recorded. |
RETURN_NOT_FOUND | The specified measurement record could not be found. |
Definition at line 1684 of file DxeCorePerformanceLib.c.
EFI_STATUS GetDeviceInfoFromHandleAndUpdateLength | ( | IN CONST VOID * | Handle, |
IN EFI_HANDLE | ControllerHandle, | ||
OUT CHAR8 * | ComponentNameString, | ||
IN OUT UINT8 * | Length | ||
) |
Get a string description for device for the given controller handle and update record length. If ComponentName2 GetControllerName is supported, the value is included in the string, followed by device path, otherwise just device path.
Handle | - Image handle |
ControllerHandle | - Controller handle. |
ComponentNameString | - Pointer to a location where the string will be saved |
Length | - Pointer to record length to be updated |
EFI_SUCCESS | - Successfully got string description for device |
EFI_UNSUPPORTED | - Neither ComponentName2 ControllerName nor DevicePath were found |
Definition at line 837 of file DxeCorePerformanceLib.c.
EFI_STATUS GetFpdtRecordId | ( | IN PERF_MEASUREMENT_ATTRIBUTE | Attribute, |
IN CONST VOID * | Handle, | ||
IN CONST CHAR8 * | String, | ||
OUT UINT16 * | ProgressID | ||
) |
Get the FPDT record identifier.
Attribute | The attribute of the Record. PerfStartEntry: Start Record. PerfEndEntry: End Record. |
Handle | Pointer to environment specific context used to identify the component being measured. |
String | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
ProgressID | On return, pointer to the ProgressID. |
EFI_SUCCESS | Get record info successfully. |
EFI_INVALID_PARAMETER | No matched FPDT record. |
Definition at line 696 of file DxeCorePerformanceLib.c.
EFI_STATUS GetFpdtRecordPtr | ( | IN UINT8 | RecordSize, |
IN OUT FPDT_RECORD_PTR * | FpdtRecordPtr | ||
) |
Return the pointer to the FPDT record in the allocated memory.
RecordSize | The size of FPDT record. |
FpdtRecordPtr | Pointer the FPDT record in the allocated memory. |
EFI_SUCCESS | Successfully get the pointer to the FPDT record. |
EFI_OUT_OF_RESOURCES | Ran out of space to store the records. |
Definition at line 99 of file DxeCorePerformanceLib.c.
EFI_STATUS GetModuleInfoFromHandle | ( | IN EFI_HANDLE | Handle, |
OUT CHAR8 * | NameString, | ||
IN UINTN | BufferSize, | ||
OUT EFI_GUID *ModuleGuid | OPTIONAL | ||
) |
Get a human readable module name and module guid for the given image handle. If module name can't be found, "" string will return. If module guid can't be found, Zero Guid will return.
Handle | Image handle or Controller handle. |
NameString | The ascii string will be filled into it. If not found, null string will return. |
BufferSize | Size of the input NameString buffer. |
ModuleGuid | Point to the guid buffer to store the got module guid value. |
EFI_SUCCESS | Successfully get module name and guid. |
EFI_INVALID_PARAMETER | The input parameter NameString is NULL. |
other | value Module Name can't be got. |
Definition at line 455 of file DxeCorePerformanceLib.c.
UINTN EFIAPI GetPerformanceMeasurement | ( | IN UINTN | LogEntryKey, |
OUT CONST VOID ** | Handle, | ||
OUT CONST CHAR8 ** | Token, | ||
OUT CONST CHAR8 ** | Module, | ||
OUT UINT64 * | StartTimeStamp, | ||
OUT UINT64 * | EndTimeStamp | ||
) |
Attempts to retrieve a performance measurement log entry from the performance measurement log. It can also retrieve the log created by StartPerformanceMeasurementEx and EndPerformanceMeasurementEx, and then eliminate the Identifier.
!!! Not support!!!
Attempts to retrieve the performance log entry specified by LogEntryKey. If LogEntryKey is zero on entry, then an attempt is made to retrieve the first entry from the performance log, and the key for the second entry in the log is returned. If the performance log is empty, then no entry is retrieved and zero is returned. If LogEntryKey is not zero, then the performance log entry associated with LogEntryKey is retrieved, and the key for the next entry in the log is returned. If LogEntryKey is the key for the last entry in the log, then the last log entry is retrieved and an implementation specific non-zero key value that specifies the end of the performance log is returned. If LogEntryKey is equal this implementation specific non-zero key value, then no entry is retrieved and zero is returned. In the cases where a performance log entry can be returned, the log entry is returned in Handle, Token, Module, StartTimeStamp, and EndTimeStamp. If LogEntryKey is not a valid log entry key for the performance measurement log, then ASSERT(). If Handle is NULL, then ASSERT(). If Token is NULL, then ASSERT(). If Module is NULL, then ASSERT(). If StartTimeStamp is NULL, then ASSERT(). If EndTimeStamp is NULL, then ASSERT().
LogEntryKey | On entry, the key of the performance measurement log entry to retrieve. 0, then the first performance measurement log entry is retrieved. On exit, the key of the next performance log entry. |
Handle | Pointer to environment specific context used to identify the component being measured. |
Token | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
Module | Pointer to a Null-terminated ASCII string that identifies the module being measured. |
StartTimeStamp | Pointer to the 64-bit time stamp that was recorded when the measurement was started. |
EndTimeStamp | Pointer to the 64-bit time stamp that was recorded when the measurement was ended. |
Definition at line 1878 of file DxeCorePerformanceLib.c.
UINTN EFIAPI GetPerformanceMeasurementEx | ( | IN UINTN | LogEntryKey, |
OUT CONST VOID ** | Handle, | ||
OUT CONST CHAR8 ** | Token, | ||
OUT CONST CHAR8 ** | Module, | ||
OUT UINT64 * | StartTimeStamp, | ||
OUT UINT64 * | EndTimeStamp, | ||
OUT UINT32 * | Identifier | ||
) |
Attempts to retrieve a performance measurement log entry from the performance measurement log. It can also retrieve the log created by StartPerformanceMeasurement and EndPerformanceMeasurement, and then assign the Identifier with 0.
!!! Not support!!!
Attempts to retrieve the performance log entry specified by LogEntryKey. If LogEntryKey is zero on entry, then an attempt is made to retrieve the first entry from the performance log, and the key for the second entry in the log is returned. If the performance log is empty, then no entry is retrieved and zero is returned. If LogEntryKey is not zero, then the performance log entry associated with LogEntryKey is retrieved, and the key for the next entry in the log is returned. If LogEntryKey is the key for the last entry in the log, then the last log entry is retrieved and an implementation specific non-zero key value that specifies the end of the performance log is returned. If LogEntryKey is equal this implementation specific non-zero key value, then no entry is retrieved and zero is returned. In the cases where a performance log entry can be returned, the log entry is returned in Handle, Token, Module, StartTimeStamp, EndTimeStamp and Identifier. If LogEntryKey is not a valid log entry key for the performance measurement log, then ASSERT(). If Handle is NULL, then ASSERT(). If Token is NULL, then ASSERT(). If Module is NULL, then ASSERT(). If StartTimeStamp is NULL, then ASSERT(). If EndTimeStamp is NULL, then ASSERT(). If Identifier is NULL, then ASSERT().
LogEntryKey | On entry, the key of the performance measurement log entry to retrieve. 0, then the first performance measurement log entry is retrieved. On exit, the key of the next performance log entry. |
Handle | Pointer to environment specific context used to identify the component being measured. |
Token | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
Module | Pointer to a Null-terminated ASCII string that identifies the module being measured. |
StartTimeStamp | Pointer to the 64-bit time stamp that was recorded when the measurement was started. |
EndTimeStamp | Pointer to the 64-bit time stamp that was recorded when the measurement was ended. |
Identifier | Pointer to the 32-bit identifier that was recorded when the measurement was ended. |
Definition at line 1751 of file DxeCorePerformanceLib.c.
EFI_STATUS InsertFpdtRecord | ( | IN CONST VOID *CallerIdentifier | OPTIONAL, |
IN CONST VOID *Guid | OPTIONAL, | ||
IN CONST CHAR8 *String | OPTIONAL, | ||
IN UINT64 | Ticker, | ||
IN UINT64 Address | OPTIONAL, | ||
IN UINT16 | PerfId, | ||
IN PERF_MEASUREMENT_ATTRIBUTE | Attribute | ||
) |
Create performance record with event description and a timestamp.
CallerIdentifier | - Image handle or pointer to caller ID GUID. |
Guid | - Pointer to a GUID. |
String | - Pointer to a string describing the measurement. |
Ticker | - 64-bit time stamp. |
Address | - Pointer to a location in memory relevant to the measurement. |
PerfId | - Performance identifier describing the type of measurement. |
Attribute | - The attribute of the measurement. According to attribute can create a start record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX, or a general record for other Perf macros. |
EFI_SUCCESS | - Successfully created performance record. |
EFI_OUT_OF_RESOURCES | - Ran out of space to store the records. |
EFI_INVALID_PARAMETER | - Invalid parameter passed to function - NULL pointer or invalid PerfId. |
EFI_SUCCESS | - Successfully created performance record |
EFI_OUT_OF_RESOURCES | - Ran out of space to store the records |
EFI_INVALID_PARAMETER | - Invalid parameter passed to function - NULL pointer or invalid PerfId |
Definition at line 970 of file DxeCorePerformanceLib.c.
VOID InternalGetPeiPerformance | ( | VOID * | HobStart | ) |
Dumps all the PEI performance.
HobStart | A pointer to a Guid. |
This internal function dumps all the PEI performance log to the DXE performance gauge array. It retrieves the optional GUID HOB for PEI performance and then saves the performance data to DXE performance data structures.
Definition at line 1339 of file DxeCorePerformanceLib.c.
VOID InternalGetSmmPerfData | ( | OUT VOID ** | SmmPerfData, |
OUT UINTN * | SmmPerfDataSize, | ||
IN BOOLEAN | SkipGetPerfData | ||
) |
This internal function dumps all the SMM performance data and size.
SmmPerfData | Smm Performance data. The buffer contain the SMM perf data is allocated by this function and caller needs to free it. |
SmmPerfDataSize | Smm Performance data size. |
SkipGetPerfData | Skip to get performance data, just get the size. |
Definition at line 222 of file DxeCorePerformanceLib.c.
BOOLEAN IsKnownID | ( | IN UINT32 | Identifier | ) |
Check whether the ID is a known one which map to the known Token.
Identifier | 32-bit identifier. |
TRUE | Is a known one used by core. |
FALSE | Not a known one. |
Definition at line 192 of file DxeCorePerformanceLib.c.
Check whether the Token is a known one which is uesed by core.
Token | Pointer to a Null-terminated ASCII string |
TRUE | Is a known one used by core. |
FALSE | Not a known one. |
Definition at line 157 of file DxeCorePerformanceLib.c.
RETURN_STATUS EFIAPI LogPerformanceMeasurement | ( | IN CONST VOID * | CallerIdentifier, |
IN CONST VOID *Guid | OPTIONAL, | ||
IN CONST CHAR8 *String | OPTIONAL, | ||
IN UINT64 Address | OPTIONAL, | ||
IN UINT32 | Identifier | ||
) |
Create performance record with event description and a timestamp.
CallerIdentifier | - Image handle or pointer to caller ID GUID |
Guid | - Pointer to a GUID |
String | - Pointer to a string describing the measurement |
Address | - Pointer to a location in memory relevant to the measurement |
Identifier | - Performance identifier describing the type of measurement |
RETURN_SUCCESS | - Successfully created performance record |
RETURN_OUT_OF_RESOURCES | - Ran out of space to store the records |
RETURN_INVALID_PARAMETER | - Invalid parameter passed to function - NULL pointer or invalid PerfId |
Definition at line 1928 of file DxeCorePerformanceLib.c.
Check whether the specified performance measurement can be logged.
This function returns TRUE when the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set and the Type disable bit in PcdPerformanceLibraryPropertyMask is not set.
Type | - Type of the performance measurement entry. |
TRUE | The performance measurement can be logged. |
FALSE | The performance measurement can NOT be logged. |
Definition at line 1953 of file DxeCorePerformanceLib.c.
BOOLEAN EFIAPI PerformanceMeasurementEnabled | ( | VOID | ) |
Returns TRUE if the performance measurement macros are enabled.
This function returns TRUE if the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set. Otherwise FALSE is returned.
TRUE | The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set. |
FALSE | The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is clear. |
Definition at line 1904 of file DxeCorePerformanceLib.c.
Report Boot Perforamnce table address as report status code.
Event | The event of notify protocol. |
Context | Notify event context. |
Definition at line 1391 of file DxeCorePerformanceLib.c.
RETURN_STATUS EFIAPI StartPerformanceMeasurement | ( | IN CONST VOID *Handle | OPTIONAL, |
IN CONST CHAR8 *Token | OPTIONAL, | ||
IN CONST CHAR8 *Module | OPTIONAL, | ||
IN UINT64 | TimeStamp | ||
) |
Adds a record at the end of the performance measurement log that records the start time of a performance measurement.
Adds a record to the end of the performance measurement log that contains the Handle, Token, and Module. The end time of the new record must be set to zero. If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record. If TimeStamp is zero, the start time in the record is filled in with the value read from the current time stamp.
Handle | Pointer to environment specific context used to identify the component being measured. |
Token | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
Module | Pointer to a Null-terminated ASCII string that identifies the module being measured. |
TimeStamp | 64-bit time stamp. |
RETURN_SUCCESS | The start of the measurement was recorded. |
RETURN_OUT_OF_RESOURCES | There are not enough resources to record the measurement. |
Definition at line 1789 of file DxeCorePerformanceLib.c.
RETURN_STATUS EFIAPI StartPerformanceMeasurementEx | ( | IN CONST VOID *Handle | OPTIONAL, |
IN CONST CHAR8 *Token | OPTIONAL, | ||
IN CONST CHAR8 *Module | OPTIONAL, | ||
IN UINT64 | TimeStamp, | ||
IN UINT32 | Identifier | ||
) |
Adds a record at the end of the performance measurement log that records the start time of a performance measurement.
Adds a record to the end of the performance measurement log that contains the Handle, Token, Module and Identifier. The end time of the new record must be set to zero. If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record. If TimeStamp is zero, the start time in the record is filled in with the value read from the current time stamp.
Handle | Pointer to environment specific context used to identify the component being measured. |
Token | Pointer to a Null-terminated ASCII string that identifies the component being measured. |
Module | Pointer to a Null-terminated ASCII string that identifies the module being measured. |
TimeStamp | 64-bit time stamp. |
Identifier | 32-bit identifier. If the value is 0, the created record is same as the one created by StartPerformanceMeasurement. |
RETURN_SUCCESS | The start of the measurement was recorded. |
RETURN_OUT_OF_RESOURCES | There are not enough resources to record the measurement. |
Definition at line 1635 of file DxeCorePerformanceLib.c.
Update Boot Performance table.
Event | The event of notify protocol. |
Context | Notify event context. |
Definition at line 1432 of file DxeCorePerformanceLib.c.
BOOT_PERFORMANCE_TABLE* mAcpiBootPerformanceTable = NULL |
Definition at line 29 of file DxeCorePerformanceLib.c.
BOOT_PERFORMANCE_TABLE mBootPerformanceTableTemplate |
Definition at line 30 of file DxeCorePerformanceLib.c.
UINT8* mBootRecordBuffer = NULL |
Definition at line 73 of file DxeCorePerformanceLib.c.
UINTN mBootRecordMaxSize = 0 |
Definition at line 66 of file DxeCorePerformanceLib.c.
UINT32 mBootRecordSize = 0 |
Definition at line 65 of file DxeCorePerformanceLib.c.
UINT32 mCachedLength = 0 |
Definition at line 67 of file DxeCorePerformanceLib.c.
HANDLE_GUID_MAP mCacheHandleGuidTable[CACHE_HANDLE_GUID_COUNT] |
Definition at line 59 of file DxeCorePerformanceLib.c.
UINTN mCachePairCount = 0 |
Definition at line 60 of file DxeCorePerformanceLib.c.
CHAR8* mDevicePathString = NULL |
Definition at line 75 of file DxeCorePerformanceLib.c.
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* mDevicePathToText = NULL |
Definition at line 78 of file DxeCorePerformanceLib.c.
BOOLEAN mFpdtBufferIsReported = FALSE |
Definition at line 69 of file DxeCorePerformanceLib.c.
BOOLEAN mLackSpaceIsReported = FALSE |
Definition at line 70 of file DxeCorePerformanceLib.c.
UINT32 mLoadImageCount = 0 |
Definition at line 62 of file DxeCorePerformanceLib.c.
BOOLEAN mLockInsertRecord = FALSE |
Definition at line 74 of file DxeCorePerformanceLib.c.
UINT32 mMaxPerformanceLength = 0 |
Definition at line 64 of file DxeCorePerformanceLib.c.
UINT32 mPerformanceLength = 0 |
Definition at line 63 of file DxeCorePerformanceLib.c.
EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL mPerformanceMeasurementInterface |
Definition at line 83 of file DxeCorePerformanceLib.c.
UINT8* mPerformancePointer = NULL |
Definition at line 72 of file DxeCorePerformanceLib.c.
PERFORMANCE_PROPERTY mPerformanceProperty |
Definition at line 87 of file DxeCorePerformanceLib.c.
CHAR8* mPlatformLanguage = NULL |
Definition at line 71 of file DxeCorePerformanceLib.c.
UINTN mSmmBootRecordOffset = 0 |
Definition at line 76 of file DxeCorePerformanceLib.c.