TianoCore EDK2 master
Loading...
Searching...
No Matches
Performance.h File Reference

Go to the source code of this file.

Data Structures

struct  PERFORMANCE_PROPERTY
 
struct  PEI_PERFORMANCE_LOG_ENTRY
 
struct  PEI_PERFORMANCE_LOG_HEADER
 
struct  GAUGE_DATA_ENTRY
 
struct  GAUGE_DATA_ENTRY_EX
 
struct  GAUGE_DATA_HEADER
 
struct  SMM_PERF_COMMUNICATE
 
struct  SMM_PERF_COMMUNICATE_EX
 
struct  _PERFORMANCE_PROTOCOL
 
struct  _PERFORMANCE_EX_PROTOCOL
 

Macros

#define PERFORMANCE_PROPERTY_REVISION   0x1
 
#define PEI_PERFORMANCE_STRING_SIZE   8
 
#define PEI_PERFORMANCE_STRING_LENGTH   (PEI_PERFORMANCE_STRING_SIZE - 1)
 
#define PERFORMANCE_PROTOCOL_GUID    { 0x76b6bdfa, 0x2acd, 0x4462, { 0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }
 
#define PERFORMANCE_EX_PROTOCOL_GUID    { 0x1ea81bec, 0xf01a, 0x4d98, { 0xa2, 0x1, 0x4a, 0x61, 0xce, 0x2f, 0xc0, 0x22 } }
 
#define DXE_PERFORMANCE_STRING_SIZE   32
 
#define DXE_PERFORMANCE_STRING_LENGTH   (DXE_PERFORMANCE_STRING_SIZE - 1)
 
#define INIT_DXE_GAUGE_DATA_ENTRIES   800
 
#define SMM_PERFORMANCE_PROTOCOL_GUID    { 0xf866226a, 0xeaa5, 0x4f5a, { 0xa9, 0xa, 0x6c, 0xfb, 0xa5, 0x7c, 0x58, 0x8e } }
 
#define SMM_PERFORMANCE_EX_PROTOCOL_GUID    { 0x931fc048, 0xc71d, 0x4455, { 0x89, 0x30, 0x47, 0x6, 0x30, 0xe3, 0xe, 0xe5 } }
 
#define SMM_PERFORMANCE_STRING_SIZE   32
 
#define SMM_PERFORMANCE_STRING_LENGTH   (SMM_PERFORMANCE_STRING_SIZE - 1)
 
#define INIT_SMM_GAUGE_DATA_ENTRIES   200
 
#define SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER   1
 
#define SMM_PERF_FUNCTION_GET_GAUGE_DATA   2
 

Typedefs

typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL
 
typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * PERFORMANCE_START_GAUGE) (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp)
 
typedef EFI_STATUS(EFIAPI * PERFORMANCE_END_GAUGE) (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp)
 
typedef EFI_STATUS(EFIAPI * PERFORMANCE_GET_GAUGE) (IN UINTN LogEntryKey, OUT GAUGE_DATA_ENTRY **GaugeDataEntry)
 
typedef EFI_STATUS(EFIAPI * PERFORMANCE_START_GAUGE_EX) (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp, IN UINT32 Identifier)
 
typedef EFI_STATUS(EFIAPI * PERFORMANCE_END_GAUGE_EX) (IN CONST VOID *Handle OPTIONAL, IN CONST CHAR8 *Token OPTIONAL, IN CONST CHAR8 *Module OPTIONAL, IN UINT64 TimeStamp, IN UINT32 Identifier)
 
typedef EFI_STATUS(EFIAPI * PERFORMANCE_GET_GAUGE_EX) (IN UINTN LogEntryKey, OUT GAUGE_DATA_ENTRY_EX **GaugeDataEntryEx)
 

Variables

EFI_GUID gPerformanceProtocolGuid
 
EFI_GUID gSmmPerformanceProtocolGuid
 
EFI_GUID gPerformanceExProtocolGuid
 
EFI_GUID gSmmPerformanceExProtocolGuid
 

Detailed Description

This file defines performance-related definitions, including the format of: performance GUID HOB. performance protocol interfaces. performance variables.

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

Definition in file Performance.h.

Macro Definition Documentation

◆ DXE_PERFORMANCE_STRING_LENGTH

#define DXE_PERFORMANCE_STRING_LENGTH   (DXE_PERFORMANCE_STRING_SIZE - 1)

Definition at line 63 of file Performance.h.

◆ DXE_PERFORMANCE_STRING_SIZE

#define DXE_PERFORMANCE_STRING_SIZE   32

Definition at line 62 of file Performance.h.

◆ INIT_DXE_GAUGE_DATA_ENTRIES

#define INIT_DXE_GAUGE_DATA_ENTRIES   800

Definition at line 68 of file Performance.h.

◆ INIT_SMM_GAUGE_DATA_ENTRIES

#define INIT_SMM_GAUGE_DATA_ENTRIES   200

Definition at line 114 of file Performance.h.

◆ PEI_PERFORMANCE_STRING_LENGTH

#define PEI_PERFORMANCE_STRING_LENGTH   (PEI_PERFORMANCE_STRING_SIZE - 1)

Definition at line 29 of file Performance.h.

◆ PEI_PERFORMANCE_STRING_SIZE

#define PEI_PERFORMANCE_STRING_SIZE   8

Definition at line 28 of file Performance.h.

◆ PERFORMANCE_EX_PROTOCOL_GUID

#define PERFORMANCE_EX_PROTOCOL_GUID    { 0x1ea81bec, 0xf01a, 0x4d98, { 0xa2, 0x1, 0x4a, 0x61, 0xce, 0x2f, 0xc0, 0x22 } }

Definition at line 50 of file Performance.h.

◆ PERFORMANCE_PROPERTY_REVISION

#define PERFORMANCE_PROPERTY_REVISION   0x1

Definition at line 15 of file Performance.h.

◆ PERFORMANCE_PROTOCOL_GUID

#define PERFORMANCE_PROTOCOL_GUID    { 0x76b6bdfa, 0x2acd, 0x4462, { 0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }

Definition at line 47 of file Performance.h.

◆ SMM_PERF_FUNCTION_GET_GAUGE_DATA

#define SMM_PERF_FUNCTION_GET_GAUGE_DATA   2

Definition at line 133 of file Performance.h.

◆ SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER

#define SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER   1

Definition at line 132 of file Performance.h.

◆ SMM_PERFORMANCE_EX_PROTOCOL_GUID

#define SMM_PERFORMANCE_EX_PROTOCOL_GUID    { 0x931fc048, 0xc71d, 0x4455, { 0x89, 0x30, 0x47, 0x6, 0x30, 0xe3, 0xe, 0xe5 } }

Definition at line 102 of file Performance.h.

◆ SMM_PERFORMANCE_PROTOCOL_GUID

#define SMM_PERFORMANCE_PROTOCOL_GUID    { 0xf866226a, 0xeaa5, 0x4f5a, { 0xa9, 0xa, 0x6c, 0xfb, 0xa5, 0x7c, 0x58, 0x8e } }

Definition at line 99 of file Performance.h.

◆ SMM_PERFORMANCE_STRING_LENGTH

#define SMM_PERFORMANCE_STRING_LENGTH   (SMM_PERFORMANCE_STRING_SIZE - 1)

Definition at line 109 of file Performance.h.

◆ SMM_PERFORMANCE_STRING_SIZE

#define SMM_PERFORMANCE_STRING_SIZE   32

Definition at line 108 of file Performance.h.

Typedef Documentation

◆ PERFORMANCE_END_GAUGE

typedef EFI_STATUS(EFIAPI * PERFORMANCE_END_GAUGE) (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 EFI_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.

Parameters
HandleThe pointer to environment specific context used to identify the component being measured.
TokenThe pointer to a Null-terminated ASCII string that identifies the component being measured.
ModuleThe pointer to a Null-terminated ASCII string that identifies the module being measured.
TimeStampThe 64-bit time stamp.
Return values
EFI_SUCCESSThe end of the measurement was recorded.
EFI_NOT_FOUNDThe specified measurement record could not be found.

Definition at line 191 of file Performance.h.

◆ PERFORMANCE_END_GAUGE_EX

typedef EFI_STATUS(EFIAPI * PERFORMANCE_END_GAUGE_EX) (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 EFI_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.

Parameters
HandleThe pointer to environment specific context used to identify the component being measured.
TokenThe pointer to a Null-terminated ASCII string that identifies the component being measured.
ModuleThe pointer to a Null-terminated ASCII string that identifies the module being measured.
TimeStampThe 64-bit time stamp.
Identifier32-bit identifier. If the value is 0, the found record is same as the one found by EndGauge of PERFORMANCE_PROTOCOL.
Return values
EFI_SUCCESSThe end of the measurement was recorded.
EFI_NOT_FOUNDThe specified measurement record could not be found.

Definition at line 285 of file Performance.h.

◆ PERFORMANCE_EX_PROTOCOL

Definition at line 57 of file Performance.h.

◆ PERFORMANCE_GET_GAUGE

typedef EFI_STATUS(EFIAPI * PERFORMANCE_GET_GAUGE) (IN UINTN LogEntryKey, OUT GAUGE_DATA_ENTRY **GaugeDataEntry)

Retrieves a previously logged performance measurement. It can also retrieve the log created by StartGaugeEx and EndGaugeEx of PERFORMANCE_EX_PROTOCOL, and then eliminate the Identifier.

Retrieves the performance log entry from the performance log specified by LogEntryKey. If it stands for a valid entry, then EFI_SUCCESS is returned and GaugeDataEntry stores the pointer to that entry.

Parameters
LogEntryKeyThe key for the previous performance measurement log entry. If 0, then the first performance measurement log entry is retrieved.
GaugeDataEntryOut parameter for the indirect pointer to the gauge data entry specified by LogEntryKey.
Return values
EFI_SUCCESSThe GuageDataEntry is successfully found based on LogEntryKey.
EFI_NOT_FOUNDThere is no entry after the measurement referred to by LogEntryKey.
EFI_INVALID_PARAMETERThe LogEntryKey is not a valid entry, or GaugeDataEntry is NULL.

Definition at line 218 of file Performance.h.

◆ PERFORMANCE_GET_GAUGE_EX

typedef EFI_STATUS(EFIAPI * PERFORMANCE_GET_GAUGE_EX) (IN UINTN LogEntryKey, OUT GAUGE_DATA_ENTRY_EX **GaugeDataEntryEx)

Retrieves a previously logged performance measurement. It can also retrieve the log created by StartGauge and EndGauge of PERFORMANCE_PROTOCOL, and then assign the Identifier with 0.

Retrieves the performance log entry from the performance log specified by LogEntryKey. If it stands for a valid entry, then EFI_SUCCESS is returned and GaugeDataEntryEx stores the pointer to that entry.

Parameters
LogEntryKeyThe key for the previous performance measurement log entry. If 0, then the first performance measurement log entry is retrieved.
GaugeDataEntryExOut parameter for the indirect pointer to the extented gauge data entry specified by LogEntryKey.
Return values
EFI_SUCCESSThe GuageDataEntryEx is successfully found based on LogEntryKey.
EFI_NOT_FOUNDThere is no entry after the measurement referred to by LogEntryKey.
EFI_INVALID_PARAMETERThe LogEntryKey is not a valid entry, or GaugeDataEntryEx is NULL.

Definition at line 313 of file Performance.h.

◆ PERFORMANCE_PROTOCOL

Definition at line 56 of file Performance.h.

◆ PERFORMANCE_START_GAUGE

typedef EFI_STATUS(EFIAPI * PERFORMANCE_START_GAUGE) (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.

The added record contains the Handle, Token, and Module. The end time of the new record is not recorded, so it is 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.

Parameters
HandleThe pointer to environment specific context used to identify the component being measured.
TokenThe pointer to a Null-terminated ASCII string that identifies the component being measured.
ModuleThe pointer to a Null-terminated ASCII string that identifies the module being measured.
TimeStampThe 64-bit time stamp.
Return values
EFI_SUCCESSThe data was read correctly from the device.
EFI_OUT_OF_RESOURCESThere are not enough resources to record the measurement.

Definition at line 158 of file Performance.h.

◆ PERFORMANCE_START_GAUGE_EX

typedef EFI_STATUS(EFIAPI * PERFORMANCE_START_GAUGE_EX) (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.

The added record contains the Handle, Token, Module and Identifier. The end time of the new record is not recorded, so it is 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.

Parameters
HandleThe pointer to environment specific context used to identify the component being measured.
TokenThe pointer to a Null-terminated ASCII string that identifies the component being measured.
ModuleThe pointer to a Null-terminated ASCII string that identifies the module being measured.
TimeStampThe 64-bit time stamp.
Identifier32-bit identifier. If the value is 0, the created record is same as the one created by StartGauge of PERFORMANCE_PROTOCOL.
Return values
EFI_SUCCESSThe data was read correctly from the device.
EFI_OUT_OF_RESOURCESThere are not enough resources to record the measurement.

Definition at line 249 of file Performance.h.