]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro
authorDandan Bi <dandan.bi@intel.com>
Wed, 11 Jul 2018 04:47:45 +0000 (12:47 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 26 Jul 2018 05:38:24 +0000 (13:38 +0800)
Add an example case for the usage of
PERF_EVENT_SIGNAL_BEGIN/PERF_EVENT_SIGNAL_END

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c

index 6f8e13d21335268a92fbd30caa33cd13c4c7ce55..9ea88a399be4a3e12e958f36e66bd8dbb8b10b7d 100644 (file)
@@ -2,7 +2,7 @@
   Master header file for DxeIpl PEIM. All source files in this module should\r
   include this file for common definitions.\r
 \r
   Master header file for DxeIpl PEIM. All source files in this module should\r
   include this file for common definitions.\r
 \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\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
 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
@@ -48,6 +48,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/RecoveryLib.h>\r
 #include <Library/DebugAgentLib.h>\r
 #include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/RecoveryLib.h>\r
 #include <Library/DebugAgentLib.h>\r
 #include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/PerformanceLib.h>\r
 \r
 #define STACK_SIZE      0x20000\r
 #define BSP_STORE_SIZE  0x4000\r
 \r
 #define STACK_SIZE      0x20000\r
 #define BSP_STORE_SIZE  0x4000\r
index 7deeb8f27046ff0f184889284f5f07344a8bcf64..302934283a684ed05304444df5c80603747d3f6d 100644 (file)
@@ -79,6 +79,7 @@
   DebugLib\r
   DebugAgentLib\r
   PeiServicesTablePointerLib\r
   DebugLib\r
   DebugAgentLib\r
   PeiServicesTablePointerLib\r
+  PerformanceLib\r
 \r
 [LibraryClasses.ARM, LibraryClasses.AARCH64]\r
   ArmMmuLib\r
 \r
 [LibraryClasses.ARM, LibraryClasses.AARCH64]\r
   ArmMmuLib\r
index d5aa0474b0344c33e29e9726ac8ad9517279c433..8a939b6c24870f03f6e9ce0f7de633afc03e279b 100644 (file)
@@ -320,7 +320,9 @@ HandOffToDxeCore (
     //\r
     // End of PEI phase signal\r
     //\r
     //\r
     // End of PEI phase signal\r
     //\r
+    PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);\r
     Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
     Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
+    PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     AsmWriteCr3 (PageTables);\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     AsmWriteCr3 (PageTables);\r
@@ -437,7 +439,9 @@ HandOffToDxeCore (
     //\r
     // End of PEI phase signal\r
     //\r
     //\r
     // End of PEI phase signal\r
     //\r
+    PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);\r
     Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
     Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
+    PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     if (BuildPageTablesIa32Pae) {\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     if (BuildPageTablesIa32Pae) {\r