]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
Change the behavior of the HII Library function HiiGetHiiHandles() when the PackageLi...
[mirror_edk2.git] / MdeModulePkg / Library / PeiPerformanceLib / PeiPerformanceLib.c
index 64b488369a43100e31f7f3a44fd0d6bc7856afa2..0778527d1ed57792ed4c0d40784198bf451414de 100644 (file)
@@ -1,5 +1,10 @@
 /** @file\r
-  Performance Library\r
+  Performance library instance used in PEI phase.\r
+\r
+  This file implements all APIs in Performance Library class in MdePkg. It creates\r
+  performance logging GUIDed HOB on the first performance logging and then logs the\r
+  performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum\r
+  number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries.  \r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -15,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <PiPei.h>\r
 \r
-#include <Guid/PeiPerformanceHob.h>\r
+#include <Guid/Performance.h>\r
 \r
 #include <Library/PerformanceLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -52,7 +57,7 @@ InternalGetPerformanceHobLog (
   PEI_PERFORMANCE_LOG_HEADER  *PeiPerformanceLog;\r
   UINTN                       PeiPerformanceLogSize;\r
 \r
-  GuidHob = GetFirstGuidHob (&gPeiPerformanceHobGuid);\r
+  GuidHob = GetFirstGuidHob (&gPerformanceProtocolGuid);\r
 \r
   if (GuidHob != NULL) {\r
     //\r
@@ -65,7 +70,7 @@ InternalGetPerformanceHobLog (
     //\r
     PeiPerformanceLogSize = sizeof (PEI_PERFORMANCE_LOG_HEADER) +\r
                             sizeof (PEI_PERFORMANCE_LOG_ENTRY) * PcdGet8 (PcdMaxPeiPerformanceLogEntries);\r
-    PeiPerformanceLog     = BuildGuidHob (&gPeiPerformanceHobGuid, PeiPerformanceLogSize);\r
+    PeiPerformanceLog     = BuildGuidHob (&gPerformanceProtocolGuid, PeiPerformanceLogSize);\r
     PeiPerformanceLog     = ZeroMem (PeiPerformanceLog, PeiPerformanceLogSize);\r
   }\r
 \r
@@ -80,6 +85,8 @@ InternalGetPerformanceHobLog (
   and its end time stamp is zero, then the index of that log entry is returned;\r
   otherwise, the the number of log entries in the array is returned.\r
 \r
+  @param  PeiPerformanceLog       Pointer to the data structure containing PEI \r
+                                  performance data.\r
   @param  Handle                  Pointer to environment specific context used\r
                                   to identify the component being measured.\r
   @param  Token                   Pointer to a Null-terminated ASCII string\r