summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Guid/Performance.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Include/Guid/Performance.h')
-rw-r--r--MdeModulePkg/Include/Guid/Performance.h129
1 files changed, 64 insertions, 65 deletions
diff --git a/MdeModulePkg/Include/Guid/Performance.h b/MdeModulePkg/Include/Guid/Performance.h
index a4244b8a19..58e8f5ec5b 100644
--- a/MdeModulePkg/Include/Guid/Performance.h
+++ b/MdeModulePkg/Include/Guid/Performance.h
@@ -12,39 +12,38 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __PERFORMANCE_DATA_H__
#define __PERFORMANCE_DATA_H__
-#define PERFORMANCE_PROPERTY_REVISION 0x1
+#define PERFORMANCE_PROPERTY_REVISION 0x1
typedef struct {
- UINT32 Revision;
- UINT32 Reserved;
- UINT64 Frequency;
- UINT64 TimerStartValue;
- UINT64 TimerEndValue;
+ UINT32 Revision;
+ UINT32 Reserved;
+ UINT64 Frequency;
+ UINT64 TimerStartValue;
+ UINT64 TimerEndValue;
} PERFORMANCE_PROPERTY;
//
// PEI_PERFORMANCE_STRING_SIZE must be a multiple of 8.
//
-#define PEI_PERFORMANCE_STRING_SIZE 8
-#define PEI_PERFORMANCE_STRING_LENGTH (PEI_PERFORMANCE_STRING_SIZE - 1)
+#define PEI_PERFORMANCE_STRING_SIZE 8
+#define PEI_PERFORMANCE_STRING_LENGTH (PEI_PERFORMANCE_STRING_SIZE - 1)
typedef struct {
- EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
- CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; ///< Module string name.
- UINT64 StartTimeStamp; ///< Start time point.
- UINT64 EndTimeStamp; ///< End time point.
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
+ CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; ///< Module string name.
+ UINT64 StartTimeStamp; ///< Start time point.
+ UINT64 EndTimeStamp; ///< End time point.
} PEI_PERFORMANCE_LOG_ENTRY;
//
// The header must be aligned at 8 bytes.
//
typedef struct {
- UINT32 NumberOfEntries; ///< The number of all performance log entries.
- UINT32 Reserved;
+ UINT32 NumberOfEntries; ///< The number of all performance log entries.
+ UINT32 Reserved;
} PEI_PERFORMANCE_LOG_HEADER;
-
#define PERFORMANCE_PROTOCOL_GUID \
{ 0x76b6bdfa, 0x2acd, 0x4462, { 0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }
@@ -54,43 +53,43 @@ typedef struct {
//
// Forward reference for pure ANSI compatibility
//
-typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL;
-typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL;
+typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL;
+typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL;
//
// DXE_PERFORMANCE_STRING_SIZE must be a multiple of 8.
//
-#define DXE_PERFORMANCE_STRING_SIZE 32
-#define DXE_PERFORMANCE_STRING_LENGTH (DXE_PERFORMANCE_STRING_SIZE - 1)
+#define DXE_PERFORMANCE_STRING_SIZE 32
+#define DXE_PERFORMANCE_STRING_LENGTH (DXE_PERFORMANCE_STRING_SIZE - 1)
//
// The default guage entries number for DXE phase.
//
-#define INIT_DXE_GAUGE_DATA_ENTRIES 800
+#define INIT_DXE_GAUGE_DATA_ENTRIES 800
typedef struct {
- EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
- CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
- UINT64 StartTimeStamp; ///< Start time point.
- UINT64 EndTimeStamp; ///< End time point.
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
+ CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
+ UINT64 StartTimeStamp; ///< Start time point.
+ UINT64 EndTimeStamp; ///< End time point.
} GAUGE_DATA_ENTRY;
typedef struct {
- EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
- CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
- UINT64 StartTimeStamp; ///< Start time point.
- UINT64 EndTimeStamp; ///< End time point.
- UINT32 Identifier; ///< Identifier.
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
+ CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
+ UINT64 StartTimeStamp; ///< Start time point.
+ UINT64 EndTimeStamp; ///< End time point.
+ UINT32 Identifier; ///< Identifier.
} GAUGE_DATA_ENTRY_EX;
//
// The header must be aligned at 8 bytes
//
typedef struct {
- UINT32 NumberOfEntries; ///< The number of all performance gauge entries.
- UINT32 Reserved;
+ UINT32 NumberOfEntries; ///< The number of all performance gauge entries.
+ UINT32 Reserved;
} GAUGE_DATA_HEADER;
//
@@ -106,32 +105,32 @@ typedef struct {
//
// SMM_PERFORMANCE_STRING_SIZE.
//
-#define SMM_PERFORMANCE_STRING_SIZE 32
-#define SMM_PERFORMANCE_STRING_LENGTH (SMM_PERFORMANCE_STRING_SIZE - 1)
+#define SMM_PERFORMANCE_STRING_SIZE 32
+#define SMM_PERFORMANCE_STRING_LENGTH (SMM_PERFORMANCE_STRING_SIZE - 1)
//
// The default guage entries number for SMM phase.
//
-#define INIT_SMM_GAUGE_DATA_ENTRIES 200
+#define INIT_SMM_GAUGE_DATA_ENTRIES 200
typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINTN NumberOfEntries;
- UINTN LogEntryKey;
- GAUGE_DATA_ENTRY *GaugeData;
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINTN NumberOfEntries;
+ UINTN LogEntryKey;
+ GAUGE_DATA_ENTRY *GaugeData;
} SMM_PERF_COMMUNICATE;
typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINTN NumberOfEntries;
- UINTN LogEntryKey;
- GAUGE_DATA_ENTRY_EX *GaugeDataEx;
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINTN NumberOfEntries;
+ UINTN LogEntryKey;
+ GAUGE_DATA_ENTRY_EX *GaugeDataEx;
} SMM_PERF_COMMUNICATE_EX;
-#define SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER 1
-#define SMM_PERF_FUNCTION_GET_GAUGE_DATA 2
+#define SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER 1
+#define SMM_PERF_FUNCTION_GET_GAUGE_DATA 2
/**
Adds a record at the end of the performance measurement log
@@ -157,7 +156,7 @@ typedef struct {
**/
typedef
EFI_STATUS
-(EFIAPI * PERFORMANCE_START_GAUGE)(
+(EFIAPI *PERFORMANCE_START_GAUGE)(
IN CONST VOID *Handle OPTIONAL,
IN CONST CHAR8 *Token OPTIONAL,
IN CONST CHAR8 *Module OPTIONAL,
@@ -190,7 +189,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI * PERFORMANCE_END_GAUGE)(
+(EFIAPI *PERFORMANCE_END_GAUGE)(
IN CONST VOID *Handle OPTIONAL,
IN CONST CHAR8 *Token OPTIONAL,
IN CONST CHAR8 *Module OPTIONAL,
@@ -217,7 +216,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI * PERFORMANCE_GET_GAUGE)(
+(EFIAPI *PERFORMANCE_GET_GAUGE)(
IN UINTN LogEntryKey,
OUT GAUGE_DATA_ENTRY **GaugeDataEntry
);
@@ -248,7 +247,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI * PERFORMANCE_START_GAUGE_EX)(
+(EFIAPI *PERFORMANCE_START_GAUGE_EX)(
IN CONST VOID *Handle OPTIONAL,
IN CONST CHAR8 *Token OPTIONAL,
IN CONST CHAR8 *Module OPTIONAL,
@@ -284,7 +283,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI * PERFORMANCE_END_GAUGE_EX)(
+(EFIAPI *PERFORMANCE_END_GAUGE_EX)(
IN CONST VOID *Handle OPTIONAL,
IN CONST CHAR8 *Token OPTIONAL,
IN CONST CHAR8 *Module OPTIONAL,
@@ -312,26 +311,26 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI * PERFORMANCE_GET_GAUGE_EX)(
+(EFIAPI *PERFORMANCE_GET_GAUGE_EX)(
IN UINTN LogEntryKey,
OUT GAUGE_DATA_ENTRY_EX **GaugeDataEntryEx
);
struct _PERFORMANCE_PROTOCOL {
- PERFORMANCE_START_GAUGE StartGauge;
- PERFORMANCE_END_GAUGE EndGauge;
- PERFORMANCE_GET_GAUGE GetGauge;
+ PERFORMANCE_START_GAUGE StartGauge;
+ PERFORMANCE_END_GAUGE EndGauge;
+ PERFORMANCE_GET_GAUGE GetGauge;
};
struct _PERFORMANCE_EX_PROTOCOL {
- PERFORMANCE_START_GAUGE_EX StartGaugeEx;
- PERFORMANCE_END_GAUGE_EX EndGaugeEx;
- PERFORMANCE_GET_GAUGE_EX GetGaugeEx;
+ PERFORMANCE_START_GAUGE_EX StartGaugeEx;
+ PERFORMANCE_END_GAUGE_EX EndGaugeEx;
+ PERFORMANCE_GET_GAUGE_EX GetGaugeEx;
};
-extern EFI_GUID gPerformanceProtocolGuid;
-extern EFI_GUID gSmmPerformanceProtocolGuid;
-extern EFI_GUID gPerformanceExProtocolGuid;
-extern EFI_GUID gSmmPerformanceExProtocolGuid;
+extern EFI_GUID gPerformanceProtocolGuid;
+extern EFI_GUID gSmmPerformanceProtocolGuid;
+extern EFI_GUID gPerformanceExProtocolGuid;
+extern EFI_GUID gSmmPerformanceExProtocolGuid;
#endif