diff options
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
|