]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
MdeModulePkg: Use new added Perf macros
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain / PeiMain.c
index 775bf18ce9386e3ab293353241432826999a801e..a52e6f020176811e0a4086db8e0a2f9fc2c44879 100644 (file)
@@ -352,18 +352,17 @@ PeiCore (
   // Update performance measurements \r
   //\r
   if (OldCoreData == NULL) {\r
-    PERF_START (NULL, "SEC", NULL, 1);\r
-    PERF_END   (NULL, "SEC", NULL, 0);\r
+    PERF_EVENT ("SEC"); // Means the end of SEC phase.\r
 \r
     //\r
     // If first pass, start performance measurement.\r
     //\r
-    PERF_START (NULL,"PEI",    NULL, 0);\r
-    PERF_START (NULL,"PreMem", NULL, 0);\r
+    PERF_CROSSMODULE_BEGIN ("PEI");\r
+    PERF_INMODULE_BEGIN ("PreMem");\r
 \r
   } else {\r
-    PERF_END   (NULL,"PreMem",  NULL, 0);\r
-    PERF_START (NULL,"PostMem", NULL, 0);\r
+    PERF_INMODULE_END ("PreMem");\r
+    PERF_INMODULE_BEGIN ("PostMem");\r
   }\r
 \r
   //\r
@@ -411,7 +410,7 @@ PeiCore (
     //\r
     // Alert any listeners that there is permanent memory available\r
     //\r
-    PERF_START (NULL,"DisMem", NULL, 0);\r
+    PERF_INMODULE_BEGIN ("DisMem");\r
     Status = PeiServicesInstallPpi (&mMemoryDiscoveredPpi);\r
 \r
     //\r
@@ -419,7 +418,7 @@ PeiCore (
     //\r
     ProcessNotifyList (&PrivateData);\r
 \r
-    PERF_END (NULL,"DisMem", NULL, 0);\r
+    PERF_INMODULE_END ("DisMem");\r
   }\r
 \r
   //\r
@@ -437,7 +436,7 @@ PeiCore (
   //\r
   // Measure PEI Core execution time.\r
   //\r
-  PERF_END (NULL, "PostMem", NULL, 0);\r
+  PERF_INMODULE_END ("PostMem");\r
 \r
   //\r
   // Lookup DXE IPL PPI\r