/** @file\r
Base Performance Library which provides no service.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2006 - 2008, 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
http://opensource.org/licenses/bsd-license.php\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- Module Name: PerformanceLib.c\r
-\r
**/\r
\r
+\r
+#include <Base.h>\r
+\r
+\r
+#include <Library/PerformanceLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
/**\r
Creates a record for the beginning of a performance measurement. \r
\r
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
+ @retval RETURN_DEVICE_ERROR A device error reading the time stamp.\r
\r
**/\r
RETURN_STATUS\r
EFIAPI\r
StartPerformanceMeasurement (\r
IN CONST VOID *Handle, OPTIONAL\r
- IN CONST CHAR8 *Token,\r
- IN CONST CHAR8 *Module,\r
+ IN CONST CHAR8 *Token, OPTIONAL\r
+ IN CONST CHAR8 *Module, OPTIONAL\r
IN UINT64 TimeStamp\r
)\r
{\r
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
+ @retval RETURN_DEVICE_ERROR A device error reading the time stamp.\r
\r
**/\r
RETURN_STATUS\r
EFIAPI\r
EndPerformanceMeasurement (\r
IN CONST VOID *Handle, OPTIONAL\r
- IN CONST CHAR8 *Token,\r
- IN CONST CHAR8 *Module,\r
+ IN CONST CHAR8 *Token, OPTIONAL\r
+ IN CONST CHAR8 *Module, OPTIONAL\r
IN UINT64 TimeStamp\r
)\r
{\r
\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
VOID\r
)\r
{\r
- return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
+ return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
}\r