diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-28 07:00:39 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-28 07:00:39 +0000 |
commit | 3eb9473ea9a949badfe06ae61d2d3fcfa53651c7 (patch) | |
tree | e9d8c368dbb1e58794b2c00acefe4bbad270f8c4 /EdkCompatibilityPkg/Foundation/Include/EfiPerf.h | |
parent | 30d4a0c7ec19938196b1308006b990e0945150da (diff) | |
download | edk2-platforms-3eb9473ea9a949badfe06ae61d2d3fcfa53651c7.tar.xz |
Add in the 1st version of ECP.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2832 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Include/EfiPerf.h')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/EfiPerf.h | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Include/EfiPerf.h b/EdkCompatibilityPkg/Foundation/Include/EfiPerf.h new file mode 100644 index 0000000000..55c743f7a7 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Include/EfiPerf.h @@ -0,0 +1,158 @@ +/*++
+
+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:
+
+ EfiPerf.h
+
+Abstract:
+ EfiPerf.h provides performance primitive for the DXE and Shell phase
+
+
+--*/
+
+#ifndef _EFI_PERF_H_
+#define _EFI_PERF_H_
+
+#include EFI_PROTOCOL_DEFINITION (Performance)
+
+EFI_STATUS
+InitializePerformanceInfrastructure (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable,
+ IN UINT64 Ticker
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ImageHandle - TODO: add argument description
+ SystemTable - TODO: add argument description
+ Ticker - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+EndMeasure (
+ IN EFI_HANDLE Handle,
+ IN UINT16 *Token,
+ IN UINT16 *Host,
+ IN UINT64 Ticker
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ Handle - TODO: add argument description
+ Token - TODO: add argument description
+ Host - TODO: add argument description
+ Ticker - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+StartMeasure (
+ IN EFI_HANDLE Handle,
+ IN UINT16 *Token,
+ IN UINT16 *Host,
+ IN UINT64 Ticker
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ Handle - TODO: add argument description
+ Token - TODO: add argument description
+ Host - TODO: add argument description
+ Ticker - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+UpdateMeasure (
+ IN EFI_HANDLE Handle,
+ IN UINT16 *Token,
+ IN UINT16 *Host,
+ IN EFI_HANDLE HandleNew,
+ IN UINT16 *TokenNew,
+ IN UINT16 *HostNew
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ Handle - TODO: add argument description
+ Token - TODO: add argument description
+ Host - TODO: add argument description
+ HandleNew - TODO: add argument description
+ TokenNew - TODO: add argument description
+ HostNew - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+#ifdef EFI_DXE_PERFORMANCE
+#define PERF_ENABLE(handle, table, ticker) InitializePerformanceInfrastructure (handle, table, ticker)
+#define PERF_START(handle, token, host, ticker) StartMeasure (handle, token, host, ticker)
+#define PERF_END(handle, token, host, ticker) EndMeasure (handle, token, host, ticker)
+#define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew) \
+ UpdateMeasure (handle, \
+ token, \
+ host, \
+ handlenew, \
+ tokennew, \
+ hostnew \
+ )
+#define PERF_CODE(code) code
+#else
+#define PERF_ENABLE(handle, table, ticker)
+#define PERF_START(handle, token, host, ticker)
+#define PERF_END(handle, token, host, ticker)
+#define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew)
+#define PERF_CODE(code)
+#endif
+
+#endif
|