diff options
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h b/EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h new file mode 100644 index 0000000000..5b86d838d4 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h @@ -0,0 +1,66 @@ +/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PeiPerf.h
+
+Abstract:
+
+ PeiPerf.h provides performance primitives for PEI modules
+
+
+--*/
+
+#ifndef _PEI_PERF_H_
+#define _PEI_PERF_H_
+
+VOID
+EFIAPI
+PeiPerfMeasure (
+ EFI_PEI_SERVICES **PeiServices,
+ IN UINT16 *Token,
+ IN EFI_FFS_FILE_HEADER *FileHeader,
+ IN BOOLEAN EntryExit,
+ IN UINT64 Value
+ )
+/*++
+
+Routine Description:
+
+ Log a timestamp count.
+
+Arguments:
+
+ PeiServices - Pointer to the PEI Core Services table
+
+ Token - Pointer to Token Name
+
+ FileHeader - Pointer to the file header
+
+ EntryExit - Indicates start or stop measurement
+
+ Value - The start time or the stop time
+
+Returns:
+
+--*/
+;
+
+#ifdef EFI_PEI_PERFORMANCE
+#define PEI_PERF_START(Ps, Token, FileHeader, Value) PeiPerfMeasure (Ps, Token, FileHeader, FALSE, Value)
+#define PEI_PERF_END(Ps, Token, FileHeader, Value) PeiPerfMeasure (Ps, Token, FileHeader, TRUE, Value)
+#else
+#define PEI_PERF_START(Ps, Token, FileHeader, Value)
+#define PEI_PERF_END(Ps, Token, FileHeader, Value)
+#endif
+
+#endif
|