]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/PerformanceLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Library / PerformanceLib.h
index 100fd8d0cadc94e6a846480c920398db37504f25..34ec956b9c0ee94586dd7a1e12a8cd03f4027e2a 100644 (file)
@@ -2,13 +2,7 @@
   Provides services to log the execution times and retrieve them later.\r
 \r
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -23,41 +17,41 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Public Progress Identifiers for Event Records.\r
 //\r
-#define PERF_EVENT_ID                   0x00\r
-\r
-#define MODULE_START_ID                 0x01\r
-#define MODULE_END_ID                   0x02\r
-#define MODULE_LOADIMAGE_START_ID       0x03\r
-#define MODULE_LOADIMAGE_END_ID         0x04\r
-#define MODULE_DB_START_ID              0x05\r
-#define MODULE_DB_END_ID                0x06\r
-#define MODULE_DB_SUPPORT_START_ID      0x07\r
-#define MODULE_DB_SUPPORT_END_ID        0x08\r
-#define MODULE_DB_STOP_START_ID         0x09\r
-#define MODULE_DB_STOP_END_ID           0x0A\r
-\r
-#define PERF_EVENTSIGNAL_START_ID       0x10\r
-#define PERF_EVENTSIGNAL_END_ID         0x11\r
-#define PERF_CALLBACK_START_ID          0x20\r
-#define PERF_CALLBACK_END_ID            0x21\r
-#define PERF_FUNCTION_START_ID          0x30\r
-#define PERF_FUNCTION_END_ID            0x31\r
-#define PERF_INMODULE_START_ID          0x40\r
-#define PERF_INMODULE_END_ID            0x41\r
-#define PERF_CROSSMODULE_START_ID       0x50\r
-#define PERF_CROSSMODULE_END_ID         0x51\r
+#define PERF_EVENT_ID  0x00\r
+\r
+#define MODULE_START_ID             0x01\r
+#define MODULE_END_ID               0x02\r
+#define MODULE_LOADIMAGE_START_ID   0x03\r
+#define MODULE_LOADIMAGE_END_ID     0x04\r
+#define MODULE_DB_START_ID          0x05\r
+#define MODULE_DB_END_ID            0x06\r
+#define MODULE_DB_SUPPORT_START_ID  0x07\r
+#define MODULE_DB_SUPPORT_END_ID    0x08\r
+#define MODULE_DB_STOP_START_ID     0x09\r
+#define MODULE_DB_STOP_END_ID       0x0A\r
+\r
+#define PERF_EVENTSIGNAL_START_ID  0x10\r
+#define PERF_EVENTSIGNAL_END_ID    0x11\r
+#define PERF_CALLBACK_START_ID     0x20\r
+#define PERF_CALLBACK_END_ID       0x21\r
+#define PERF_FUNCTION_START_ID     0x30\r
+#define PERF_FUNCTION_END_ID       0x31\r
+#define PERF_INMODULE_START_ID     0x40\r
+#define PERF_INMODULE_END_ID       0x41\r
+#define PERF_CROSSMODULE_START_ID  0x50\r
+#define PERF_CROSSMODULE_END_ID    0x51\r
 \r
 //\r
 // Declare bits for PcdPerformanceLibraryPropertyMask and\r
 // also used as the Type parameter of LogPerformanceMeasurementEnabled().\r
 //\r
-#define PERF_CORE_START_IMAGE            0x0002\r
-#define PERF_CORE_LOAD_IMAGE             0x0004\r
-#define PERF_CORE_DB_SUPPORT             0x0008\r
-#define PERF_CORE_DB_START               0x0010\r
-#define PERF_CORE_DB_STOP                0x0020\r
+#define PERF_CORE_START_IMAGE  0x0002\r
+#define PERF_CORE_LOAD_IMAGE   0x0004\r
+#define PERF_CORE_DB_SUPPORT   0x0008\r
+#define PERF_CORE_DB_START     0x0010\r
+#define PERF_CORE_DB_STOP      0x0020\r
 \r
-#define PERF_GENERAL_TYPE                0x0040\r
+#define PERF_GENERAL_TYPE  0x0040\r
 \r
 /**\r
   Creates a record for the beginning of a performance measurement.\r
@@ -83,9 +77,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 RETURN_STATUS\r
 EFIAPI\r
 StartPerformanceMeasurement (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
+  IN CONST VOID   *Handle   OPTIONAL,\r
+  IN CONST CHAR8  *Token    OPTIONAL,\r
+  IN CONST CHAR8  *Module   OPTIONAL,\r
   IN UINT64       TimeStamp\r
   );\r
 \r
@@ -115,9 +109,9 @@ StartPerformanceMeasurement (
 RETURN_STATUS\r
 EFIAPI\r
 EndPerformanceMeasurement (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
+  IN CONST VOID   *Handle   OPTIONAL,\r
+  IN CONST CHAR8  *Token    OPTIONAL,\r
+  IN CONST CHAR8  *Module   OPTIONAL,\r
   IN UINT64       TimeStamp\r
   );\r
 \r
@@ -163,12 +157,12 @@ EndPerformanceMeasurement (
 UINTN\r
 EFIAPI\r
 GetPerformanceMeasurement (\r
-  IN  UINTN       LogEntryKey,\r
-  OUT CONST VOID  **Handle,\r
-  OUT CONST CHAR8 **Token,\r
-  OUT CONST CHAR8 **Module,\r
-  OUT UINT64      *StartTimeStamp,\r
-  OUT UINT64      *EndTimeStamp\r
+  IN  UINTN        LogEntryKey,\r
+  OUT CONST VOID   **Handle,\r
+  OUT CONST CHAR8  **Token,\r
+  OUT CONST CHAR8  **Module,\r
+  OUT UINT64       *StartTimeStamp,\r
+  OUT UINT64       *EndTimeStamp\r
   );\r
 \r
 /**\r
@@ -197,9 +191,9 @@ GetPerformanceMeasurement (
 RETURN_STATUS\r
 EFIAPI\r
 StartPerformanceMeasurementEx (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
+  IN CONST VOID   *Handle   OPTIONAL,\r
+  IN CONST CHAR8  *Token    OPTIONAL,\r
+  IN CONST CHAR8  *Module   OPTIONAL,\r
   IN UINT64       TimeStamp,\r
   IN UINT32       Identifier\r
   );\r
@@ -232,9 +226,9 @@ StartPerformanceMeasurementEx (
 RETURN_STATUS\r
 EFIAPI\r
 EndPerformanceMeasurementEx (\r
-  IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,   OPTIONAL\r
-  IN CONST CHAR8  *Module,  OPTIONAL\r
+  IN CONST VOID   *Handle   OPTIONAL,\r
+  IN CONST CHAR8  *Token    OPTIONAL,\r
+  IN CONST CHAR8  *Module   OPTIONAL,\r
   IN UINT64       TimeStamp,\r
   IN UINT32       Identifier\r
   );\r
@@ -283,13 +277,13 @@ EndPerformanceMeasurementEx (
 UINTN\r
 EFIAPI\r
 GetPerformanceMeasurementEx (\r
-  IN  UINTN       LogEntryKey,\r
-  OUT CONST VOID  **Handle,\r
-  OUT CONST CHAR8 **Token,\r
-  OUT CONST CHAR8 **Module,\r
-  OUT UINT64      *StartTimeStamp,\r
-  OUT UINT64      *EndTimeStamp,\r
-  OUT UINT32      *Identifier\r
+  IN  UINTN        LogEntryKey,\r
+  OUT CONST VOID   **Handle,\r
+  OUT CONST CHAR8  **Token,\r
+  OUT CONST CHAR8  **Module,\r
+  OUT UINT64       *StartTimeStamp,\r
+  OUT UINT64       *EndTimeStamp,\r
+  OUT UINT32       *Identifier\r
   );\r
 \r
 /**\r
@@ -310,7 +304,6 @@ PerformanceMeasurementEnabled (
   VOID\r
   );\r
 \r
-\r
 /**\r
   Check whether the specified performance measurement can be logged.\r
 \r
@@ -326,7 +319,7 @@ PerformanceMeasurementEnabled (
 BOOLEAN\r
 EFIAPI\r
 LogPerformanceMeasurementEnabled (\r
-  IN  CONST UINTN        Type\r
+  IN  CONST UINTN  Type\r
   );\r
 \r
 /**\r
@@ -348,10 +341,10 @@ LogPerformanceMeasurementEnabled (
 RETURN_STATUS\r
 EFIAPI\r
 LogPerformanceMeasurement (\r
-  IN CONST VOID   *CallerIdentifier, OPTIONAL\r
-  IN CONST VOID   *Guid,    OPTIONAL\r
-  IN CONST CHAR8  *String,  OPTIONAL\r
-  IN UINT64       Address,  OPTIONAL\r
+  IN CONST VOID   *CallerIdentifier  OPTIONAL,\r
+  IN CONST VOID   *Guid     OPTIONAL,\r
+  IN CONST CHAR8  *String   OPTIONAL,\r
+  IN UINT64       Address   OPTIONAL,\r
   IN UINT32       Identifier\r
   );\r
 \r
@@ -359,7 +352,7 @@ LogPerformanceMeasurement (
   Begin Macro to measure the performance of StartImage in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT1(dsiable PERF_CORE_START_IMAGE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT1 (disable PERF_CORE_START_IMAGE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -374,7 +367,7 @@ LogPerformanceMeasurement (
   End Macro to measure the performance of StartImage in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT1 (dsiable PERF_CORE_START_IMAGE)of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT1 (disable PERF_CORE_START_IMAGE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -389,7 +382,7 @@ LogPerformanceMeasurement (
   Begin Macro to measure the performance of LoadImage in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT2 (dsiable PERF_CORE_LOAD_IAMGE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT2 (disable PERF_CORE_LOAD_IMAGE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -404,7 +397,7 @@ LogPerformanceMeasurement (
   End Macro to measure the performance of LoadImage in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT2 (dsiable PERF_CORE_LOAD_IAMGE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT2 (disable PERF_CORE_LOAD_IMAGE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -419,7 +412,7 @@ LogPerformanceMeasurement (
   Start Macro to measure the performance of DriverBinding Support in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT3 (dsiable PERF_CORE_DB_SUPPORT) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT3 (disable PERF_CORE_DB_SUPPORT) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -434,7 +427,7 @@ LogPerformanceMeasurement (
   End Macro to measure the performance of DriverBinding Support in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT3 (dsiable PERF_CORE_DB_SUPPORT) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT3 (disable PERF_CORE_DB_SUPPORT) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -449,7 +442,7 @@ LogPerformanceMeasurement (
   Begin Macro to measure the performance of DriverBinding Start in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT4 (dsiable PERF_CORE_DB_START) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT4 (disable PERF_CORE_DB_START) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -464,7 +457,7 @@ LogPerformanceMeasurement (
   End Macro to measure the performance of DriverBinding Start in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT4 (dsiable PERF_CORE_DB_START) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT4 (disable PERF_CORE_DB_START) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -479,7 +472,7 @@ LogPerformanceMeasurement (
   Start Macro to measure the performance of DriverBinding Stop in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT5 (dsiable PERF_CORE_DB_STOP) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT5 (disable PERF_CORE_DB_STOP) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -494,7 +487,7 @@ LogPerformanceMeasurement (
   End Macro to measure the performance of DriverBinding Stop in core.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT5 (dsiable PERF_CORE_DB_STOP) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT5 (disable PERF_CORE_DB_STOP) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -510,7 +503,7 @@ LogPerformanceMeasurement (
   It can be used to log a meaningful thing which happens at a time point.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -522,11 +515,11 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  Begin Macro to measure the perofrmance of evnent signal behavior in any module.\r
+  Begin Macro to measure the performance of evnent signal behavior in any module.\r
   The event guid will be passed with this macro.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -538,11 +531,11 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  End Macro to measure the perofrmance of evnent signal behavior in any module.\r
+  End Macro to measure the performance of evnent signal behavior in any module.\r
   The event guid will be passed with this macro.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -554,11 +547,11 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  Begin Macro to measure the perofrmance of a callback function in any module.\r
+  Begin Macro to measure the performance of a callback function in any module.\r
   The event guid which trigger the callback function will be passed with this macro.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -570,11 +563,11 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  End Macro to measure the perofrmance of a callback function in any module.\r
+  End Macro to measure the performance of a callback function in any module.\r
   The event guid which trigger the callback function will be passed with this macro.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -586,10 +579,10 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  Begin Macro to measure the perofrmance of a general function in any module.\r
+  Begin Macro to measure the performance of a general function in any module.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -601,10 +594,10 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  End Macro to measure the perofrmance of a general function in any module.\r
+  End Macro to measure the performance of a general function in any module.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -616,10 +609,10 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  Begin Macro to measure the perofrmance of a behavior within one module.\r
+  Begin Macro to measure the performance of a behavior within one module.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -631,10 +624,10 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  End Macro to measure the perofrmance of a behavior within one module.\r
+  End Macro to measure the performance of a behavior within one module.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -646,11 +639,11 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  Begin Macro to measure the perofrmance of a behavior in different modules.\r
+  Begin Macro to measure the performance of a behavior in different modules.\r
   Such as the performance of PEI phase, DXE phase, BDS phase.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -662,11 +655,11 @@ LogPerformanceMeasurement (
   } while (FALSE)\r
 \r
 /**\r
-  End Macro to measure the perofrmance of a behavior in different modules.\r
+  End Macro to measure the performance of a behavior in different modules.\r
   Such as the performance of PEI phase, DXE phase, BDS phase.\r
 \r
   If the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of PcdPerformanceLibraryPropertyMask is set,\r
-  and the BIT6 (dsiable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set.\r
+  and the BIT6 (disable PERF_GENERAL_TYPE) of PcdPerformanceLibraryPropertyMask is not set,\r
   then LogPerformanceMeasurement() is called.\r
 \r
 **/\r
@@ -751,7 +744,7 @@ LogPerformanceMeasurement (
   Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module.\r
 \r
 **/\r
-#define PERF_CODE_END()    __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE)\r
+#define PERF_CODE_END()  __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE)\r
 \r
 /**\r
   Macro that declares a section of performance measurement source code.\r
@@ -768,5 +761,4 @@ LogPerformanceMeasurement (
   Expression                   \\r
   PERF_CODE_END ()\r
 \r
-\r
 #endif\r