]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c
• BaseMemoryLib:
[mirror_edk2.git] / MdePkg / Library / BasePerformanceLibNull / PerformanceLib.c
index 01226cbb02abadbf94783910bf555f4c23de4f50..406acb5ca07522c43a587ebc12313a3e03a30707 100644 (file)
   If TimeStamp is zero, then this function reads the current time stamp\r
   and adds that time stamp value to the record as the start time.\r
 \r
-       @param  Handle                  Pointer to environment specific context used\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
+  @param  Token                   Pointer to a Null-terminated ASCII string\r
                                   that identifies the component being measured.\r
-       @param  Module                  Pointer to a Null-terminated ASCII string\r
+  @param  Module                  Pointer to a Null-terminated ASCII string\r
                                   that identifies the module being measured.\r
-       @param  TimeStamp               64-bit time stamp.\r
+  @param  TimeStamp               64-bit time stamp.\r
 \r
   @retval RETURN_SUCCESS          The start of the measurement was recorded.\r
-       @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record the measurement.\r
+  @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record the measurement.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -57,16 +57,16 @@ StartPerformanceMeasurement (
   the current time stamp and adds that time stamp value to the record as the end time.\r
   If this function is called multiple times for the same record, then the end time is overwritten.\r
 \r
-       @param  Handle                  Pointer to environment specific context used\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
+  @param  Token                   Pointer to a Null-terminated ASCII string\r
                                   that identifies the component being measured.\r
-       @param  Module                  Pointer to a Null-terminated ASCII string\r
+  @param  Module                  Pointer to a Null-terminated ASCII string\r
                                   that identifies the module being measured.\r
-       @param  TimeStamp               64-bit time stamp.\r
+  @param  TimeStamp               64-bit time stamp.\r
 \r
   @retval RETURN_SUCCESS          The end of  the measurement was recorded.\r
-       @retval RETURN_NOT_FOUND        The specified measurement record could not be found.\r
+  @retval RETURN_NOT_FOUND        The specified measurement record could not be found.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -82,34 +82,46 @@ EndPerformanceMeasurement (
 }\r
 \r
 /**\r
-  Retrieves a previously logged performance measurement\r
+  Attempts to retrieve a performance measurement log entry from the performance measurement log\r
   \r
-  Retrieves the performance log entry from the performance log\r
-  that immediately follows the log entry specified by LogEntryKey.\r
-  If LogEntryKey is zero, then the first entry from the performance log is returned.\r
-  If the log entry specified by LogEntryKey is the last entry in the performance log,\r
-  then 0 is returned.  Otherwise, the performance log entry is returned in Handle,\r
-  Token, Module, StartTimeStamp, and EndTimeStamp.\r
-  The key for the current performance log entry is returned. \r
-\r
-  @param  LogEntryKey             The key for the previous performance measurement log entry.\r
-                                  If 0, then the first performance measurement log entry is retrieved.\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
-                                  that identifies the component being measured.\r
-  @param  Module                  Pointer to a Null-terminated ASCII string\r
-                                  that identifies the module being measured.\r
-  @param  StartTimeStamp          The 64-bit time stamp that was recorded when the measurement was started.\r
-  @param  EndTimeStamp            The 64-bit time stamp that was recorded when the measurement was ended.\r
-\r
-  @return The key for the current performance log entry.\r
+  Attempts to retrieve the performance log entry specified by LogEntryKey.  If LogEntryKey is\r
+  zero on entry, then an attempt is made to retrieve the first entry from the performance log,\r
+  and the key for the second entry in the log is returned.  If the performance log is empty,\r
+  then no entry is retrieved and zero is returned.  If LogEntryKey is not zero, then the performance\r
+  log entry associated with LogEntryKey is retrieved, and the key for the next entry in the log is\r
+  returned.  If LogEntryKey is the key for the last entry in the log, then the last log entry is\r
+  retrieved and an implementation specific non-zero key value that specifies the end of the performance\r
+  log is returned.  If LogEntryKey is equal this implementation specific non-zero key value, then no entry\r
+  is retrieved and zero is returned.  In the cases where a performance log entry can be returned,\r
+  the log entry is returned in Handle, Token, Module, StartTimeStamp, and EndTimeStamp.\r
+  If LogEntryKey is not a valid log entry key for the performance measurement log, then ASSERT().\r
+  If Handle is NULL, then ASSERT().\r
+  If Token is NULL, then ASSERT().\r
+  If Module is NULL, then ASSERT().\r
+  If StartTimeStamp is NULL, then ASSERT().\r
+  If EndTimeStamp is NULL, then ASSERT().\r
+\r
+  @param  LogEntryKey             On entry, the key of the performance measurement log entry to retrieve.\r
+                                  0, then the first performance measurement log entry is retrieved.\r
+                                  On exit, the key of the next performance lof entry entry.\r
+  @param  Handle                  Pointer to environment specific context used to identify the component\r
+                                  being measured.  \r
+  @param  Token                   Pointer to a Null-terminated ASCII string that identifies the component\r
+                                  being measured. \r
+  @param  Module                  Pointer to a Null-terminated ASCII string that identifies the module\r
+                                  being measured.\r
+  @param  StartTimeStamp          Pointer to the 64-bit time stamp that was recorded when the measurement\r
+                                  was started.\r
+  @param  EndTimeStamp            Pointer to the 64-bit time stamp that was recorded when the measurement\r
+                                  was ended.\r
+\r
+  @return The key for the next performance log entry (in general case).\r
 \r
 **/\r
 UINTN\r
 EFIAPI\r
 GetPerformanceMeasurement (\r
-  UINTN           LogEntryKey, \r
+  IN  UINTN       LogEntryKey, \r
   OUT CONST VOID  **Handle,\r
   OUT CONST CHAR8 **Token,\r
   OUT CONST CHAR8 **Module,\r
@@ -134,7 +146,7 @@ GetPerformanceMeasurement (
 \r
   @retval TRUE                    The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
                                   PcdPerformanceLibraryPropertyMask is set.\r
-       @retval FALSE                   The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
+  @retval FALSE                   The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
                                   PcdPerformanceLibraryPropertyMask is clear.\r
 \r
 **/\r