]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Pei/PeiMain/PeiMain.c
Add pair of performance macro function to measure the whole PEI phase's performance.
[mirror_edk2.git] / EdkModulePkg / Core / Pei / PeiMain / PeiMain.c
index c94331c010f6474da094c7e1b3329d0a23ab8619..924336b22d47025d9b8e16839f04afc3285767e5 100644 (file)
@@ -107,11 +107,11 @@ Returns:
 \r
   mTick = 0;\r
 \r
-#ifdef EFI_PEI_PERFORMANCE\r
-  if (OldCoreData == NULL) {\r
-    mTick = GetPerformanceCounter ();\r
+  if (PerformanceMeasurementEnabled()) {\r
+    if (OldCoreData == NULL) {\r
+      mTick = GetPerformanceCounter ();\r
+    }\r
   }\r
-#endif\r
 \r
   //\r
   // For IPF in CAR mode the real memory access is uncached,in InstallPeiMemory()\r
@@ -178,6 +178,7 @@ Returns:
     //\r
     // Alert any listeners that there is permanent memory available\r
     //\r
+    PERF_START (NULL,"PEI", NULL, mTick);\r
     PERF_START (NULL,"DisMem", NULL, 0);\r
     Status = PeiServicesInstallPpi (&mMemoryDiscoveredPpi);\r
     PERF_END (NULL,"DisMem", NULL, 0);\r